-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12a9979
commit a81f649
Showing
42 changed files
with
990,163 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program MakeScreenshot; | ||
|
||
uses | ||
System.StartUpCopy, | ||
FMX.Forms, | ||
Unit1 in 'Unit1.pas' {Form1}; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
Application.Initialize; | ||
Application.CreateForm(TForm1, Form1); | ||
Application.Run; | ||
end. |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
unit Unit1; | ||
|
||
interface | ||
|
||
uses | ||
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, | ||
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, | ||
FMX.Layouts, FMX.ExtCtrls, FMX.TabControl, FMX.StdCtrls, FMX.Effects, | ||
FMX.Controls.Presentation; | ||
|
||
type | ||
TForm1 = class(TForm) | ||
MaterialOxfordBlueSB: TStyleBook; | ||
ToolBar1: TToolBar; | ||
Label1: TLabel; | ||
ShadowEffect4: TShadowEffect; | ||
Layout1: TLayout; | ||
Button1: TButton; | ||
TabControl1: TTabControl; | ||
TabItem1: TTabItem; | ||
TabItem2: TTabItem; | ||
ImageViewer1: TImageViewer; | ||
Image1: TImage; | ||
procedure Button1Click(Sender: TObject); | ||
private | ||
{ Private declarations } | ||
public | ||
{ Public declarations } | ||
end; | ||
|
||
var | ||
Form1: TForm1; | ||
|
||
implementation | ||
|
||
{$R *.fmx} | ||
|
||
procedure TForm1.Button1Click(Sender: TObject); | ||
begin | ||
ImageViewer1.Bitmap.Assign(Layout1.MakeScreenshot); | ||
TabControl1.GotoVisibleTab(1); | ||
end; | ||
|
||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program Ping; | ||
|
||
uses | ||
System.StartUpCopy, | ||
FMX.Forms, | ||
Unit1 in 'Unit1.pas' {Form1}; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
Application.Initialize; | ||
Application.CreateForm(TForm1, Form1); | ||
Application.Run; | ||
end. |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
unit Unit1; | ||
|
||
interface | ||
|
||
uses | ||
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, | ||
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Effects, | ||
FMX.StdCtrls, FMX.Controls.Presentation, FMXTee.Engine, FMXTee.Procs, | ||
FMXTee.Chart, FMX.Edit, FMX.Layouts, FMX.ScrollBox, FMX.Memo, FMX.TabControl, | ||
IdBaseComponent, IdComponent, IdRawBase, IdRawClient, IdIcmpClient, | ||
FMXTee.Series; | ||
|
||
type | ||
TForm1 = class(TForm) | ||
MaterialOxfordBlueSB: TStyleBook; | ||
ToolBar1: TToolBar; | ||
Label1: TLabel; | ||
ShadowEffect4: TShadowEffect; | ||
Layout1: TLayout; | ||
Edit1: TEdit; | ||
Button1: TButton; | ||
Chart1: TChart; | ||
IdIcmpClient1: TIdIcmpClient; | ||
TabControl1: TTabControl; | ||
TabItem1: TTabItem; | ||
TabItem2: TTabItem; | ||
Memo1: TMemo; | ||
Series1: TBarSeries; | ||
procedure Button1Click(Sender: TObject); | ||
private | ||
{ Private declarations } | ||
public | ||
{ Public declarations } | ||
end; | ||
|
||
var | ||
Form1: TForm1; | ||
|
||
implementation | ||
|
||
{$R *.fmx} | ||
|
||
uses | ||
System.Threading; | ||
|
||
procedure TForm1.Button1Click(Sender: TObject); | ||
begin | ||
// Requires a RAW socket. | ||
// Requires root on IOS and Android. Will error with Socket Error #1 without it. | ||
Chart1.Title.Text[0] := Edit1.Text; | ||
IdIcmpClient1.Host := Edit1.Text; | ||
Chart1.Series[0].Clear; | ||
Memo1.Lines.Append('Pinging '+Edit1.Text+' with 32 bytes of data:'); | ||
TTask.Run(procedure var I: Integer; begin | ||
for I := 0 to 5 do | ||
begin | ||
idICMPClient1.Ping('DelphiIsAwesome! FireMonkey!'); | ||
TThread.Synchronize(nil,procedure begin | ||
Memo1.Lines.Add('Reply from '+Edit1.Text+': bytes=' + IntToStr(idICMPClient1.ReplyStatus.BytesReceived) + ' time=' + idICMPClient1.ReplyStatus.MsRoundTripTime.ToString + 'ms TTL='+idICMPClient1.ReplyStatus.TimeToLive.ToString); | ||
Chart1.Series[0].Add(idICMPClient1.ReplyStatus.MsRoundTripTime,idICMPClient1.ReplyStatus.MsRoundTripTime.ToString + ' ms'); | ||
end); | ||
end; | ||
end); | ||
end; | ||
|
||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program HTTPPost; | ||
|
||
uses | ||
System.StartUpCopy, | ||
FMX.Forms, | ||
Unit1 in 'Unit1.pas' {Form1}; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
Application.Initialize; | ||
Application.CreateForm(TForm1, Form1); | ||
Application.Run; | ||
end. |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
unit Unit1; | ||
|
||
interface | ||
|
||
uses | ||
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, | ||
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Effects, | ||
FMX.StdCtrls, FMX.Controls.Presentation, System.Net.URLClient, | ||
System.Net.HttpClient, System.Net.HttpClientComponent, System.Rtti, | ||
FMX.Grid.Style, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Param, | ||
FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, FireDAC.DApt.Intf, | ||
Data.Bind.EngExt, Fmx.Bind.DBEngExt, Fmx.Bind.Grid, System.Bindings.Outputs, | ||
Fmx.Bind.Editors, Data.Bind.Controls, FMX.Edit, FMX.Layouts, | ||
Fmx.Bind.Navigator, Data.Bind.Components, Data.Bind.Grid, Data.Bind.DBScope, | ||
Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client, FMX.ScrollBox, FMX.Grid, | ||
FMX.Memo, FMX.TabControl, FireDAC.Stan.StorageBin; | ||
|
||
type | ||
TForm1 = class(TForm) | ||
MaterialOxfordBlueSB: TStyleBook; | ||
ToolBar1: TToolBar; | ||
Label1: TLabel; | ||
ShadowEffect4: TShadowEffect; | ||
NetHTTPClient1: TNetHTTPClient; | ||
NetHTTPRequest1: TNetHTTPRequest; | ||
Button1: TButton; | ||
StringGrid1: TStringGrid; | ||
FDMemTable1: TFDMemTable; | ||
BindSourceDB1: TBindSourceDB; | ||
BindingsList1: TBindingsList; | ||
LinkGridToDataSourceBindSourceDB1: TLinkGridToDataSource; | ||
BindNavigator1: TBindNavigator; | ||
Layout1: TLayout; | ||
Edit1: TEdit; | ||
TabControl1: TTabControl; | ||
TabItem1: TTabItem; | ||
TabItem2: TTabItem; | ||
Memo1: TMemo; | ||
procedure Button1Click(Sender: TObject); | ||
private | ||
{ Private declarations } | ||
public | ||
{ Public declarations } | ||
end; | ||
|
||
var | ||
Form1: TForm1; | ||
|
||
implementation | ||
|
||
{$R *.fmx} | ||
|
||
uses | ||
System.Threading, System.Net.Mime; | ||
|
||
procedure TForm1.Button1Click(Sender: TObject); | ||
begin | ||
TTask.Run(procedure | ||
var | ||
LMultipartFormData: TMultipartFormData; | ||
LMS: TMemoryStream; | ||
begin | ||
|
||
LMultipartFormData := TMultipartFormData.Create; | ||
FDMemTable1.DisableControls; | ||
FDMemTable1.First; | ||
while not FDMemTable1.Eof do | ||
begin | ||
LMultipartFormData.AddField(FDMemTable1.FieldByName('Name').AsString, | ||
FDMemTable1.FieldByName('Value').AsString); | ||
FDMemTable1.Next; | ||
end; | ||
FDMemTable1.EnableControls; | ||
|
||
LMS := TMemoryStream.Create; | ||
|
||
NetHTTPRequest1.Post(Edit1.Text,LMultiPartFormData,LMS); | ||
|
||
TThread.Synchronize(nil, procedure begin | ||
Memo1.Lines.LoadFromStream(LMS); | ||
TabControl1.GotoVisibleTab(1) | ||
end); | ||
|
||
LMS.Free; | ||
|
||
LMultipartFormData.Free; | ||
end); | ||
|
||
end; | ||
|
||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[Button1] | ||
Coordinates=104,10,53,51 | ||
|
||
[NetHTTPRequest1] | ||
Coordinates=161,1,104,33 | ||
|
||
[ShadowEffect4] | ||
Coordinates=303,53,88,33 | ||
|
||
[MaterialOxfordBlueSB] | ||
Coordinates=161,53,123,33 | ||
|
||
[Label1] | ||
Coordinates=10,107,46,51 | ||
|
||
[FDMemTable1] | ||
Coordinates=10,10,84,33 | ||
Visible=True | ||
|
||
[StringGrid1] | ||
Coordinates=167,10,70,51 | ||
|
||
[NetHTTPClient1] | ||
Coordinates=322,105,92,33 | ||
|
||
[ToolBar1] | ||
Coordinates=66,107,58,33 | ||
|
||
[] | ||
Coordinates=303,1,82,33 | ||
|
||
[BindSourceDB1] | ||
Coordinates=104,10,92,123 | ||
|
||
[BindingsList1] | ||
Coordinates=15,62,82,33 | ||
|
||
[BindNavigator1] | ||
Coordinates=322,1,90,51 | ||
Visible=True | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program TextFileSaveLoad; | ||
|
||
uses | ||
System.StartUpCopy, | ||
FMX.Forms, | ||
Unit1 in 'Unit1.pas' {Form1}; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
Application.Initialize; | ||
Application.CreateForm(TForm1, Form1); | ||
Application.Run; | ||
end. |
Oops, something went wrong.