source upload
This commit is contained in:
57
contrib/CoreCipher/Samples/FMX/Unit1.pas
Normal file
57
contrib/CoreCipher/Samples/FMX/Unit1.pas
Normal file
@@ -0,0 +1,57 @@
|
||||
unit Unit1;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
|
||||
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, CoreCipher,
|
||||
FMX.StdCtrls, FMX.Controls.Presentation, FMX.Memo,
|
||||
DoStatusIO, FMX.Layouts;
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
Memo1: TMemo;
|
||||
Button1: TButton;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
procedure DoStatusNear(AText: string; const ID: Integer = 0);
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.fmx}
|
||||
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
Button1.Visible:=False;
|
||||
TestCoreCipher;
|
||||
Button1.Visible:=True;
|
||||
end;
|
||||
|
||||
procedure TForm1.DoStatusNear(AText: string; const ID: Integer);
|
||||
begin
|
||||
Memo1.Lines.Add(AText);
|
||||
Memo1.GoToTextEnd;
|
||||
Application.ProcessMessages;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
AddDoStatusHook(Self, DoStatusNear);
|
||||
end;
|
||||
|
||||
procedure TForm1.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
DeleteDoStatusHook(Self);
|
||||
end;
|
||||
|
||||
end.
|
Reference in New Issue
Block a user