-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCheckUnit.pas
112 lines (99 loc) · 2.28 KB
/
CheckUnit.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
unit CheckUnit;
interface
uses
System.SysUtils,
System.Types,
System.UITypes,
System.Classes,
System.Variants,
System.IniFiles,
Data.DB,
FMX.Types,
FMX.Controls,
FMX.Forms,
FMX.Dialogs,
FMX.Objects,
FMX.Menus,
FMX.Grid,
FMX.ExtCtrls,
FMX.ListBox,
FMX.TreeView,
FMX.Memo,
FMX.TabControl,
FMX.Layouts,
FMX.Edit,
FMX.Platform,
FMX.Bind.DBEngExt,
FMX.Bind.Editors,
FMX.Bind.DBLinks,
FMX.Bind.Navigator,
Data.Bind.EngExt,
Data.Bind.Components,
Data.Bind.DBScope,
Data.Bind.DBLinks,
Datasnap.DBClient,
Fmx.Bind.Grid,
System.Rtti,
System.Bindings.Outputs,
Data.Bind.Grid,
Fmx.StdCtrls,
FMX.Header,
FMX.Graphics;
type
TCheckForm = class(TForm)
Memo: TMemo;
Panel1: TPanel;
btClose: TButton;
btStop: TButton;
btSave: TButton;
SaveDialog: TSaveDialog;
pbCheckQuest: TProgressBar;
Label1: TLabel;
procedure btStopClick(Sender: TObject);
procedure btCloseClick(Sender: TObject);
procedure btSaveClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
isStopped: boolean;
end;
var
CheckForm: TCheckForm;
implementation
uses MainUnit, MyDataModule;
{$R *.FMX}
procedure TCheckForm.btStopClick(Sender: TObject);
begin
Label1.Caption:=dmMain.Text[22]; // 'Terminating check. Please wait.'
Application.ProcessMessages;
MainForm.StopThread;
Label1.Caption:=dmMain.Text[23]; //'Terminated'
end;
procedure TCheckForm.btCloseClick(Sender: TObject);
begin
close;
end;
procedure TCheckForm.btSaveClick(Sender: TObject);
begin
if SaveDialog.Execute then
Memo.Lines.SaveToFile(SaveDialog.FileName);
end;
procedure TCheckForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Label1.Caption:=dmMain.Text[22]; // 'Terminating check. Please wait.'
Application.ProcessMessages;
MainForm.StopThread;
Label1.Caption:=dmMain.Text[23]; //'Terminated'
end;
procedure TCheckForm.FormCreate(Sender: TObject);
begin
if not MainForm.MyTrinityConnection.Connected then Exit;
dmMain.Translate.CreateDefaultTranslation(TForm(Self));
dmMain.Translate.TranslateForm(TForm(Self));
MainForm.Show;
MainForm.SplashForm.Free;
end;
end.