This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
/
CheckUnit.pas
76 lines (63 loc) · 1.76 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
unit CheckUnit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Buttons, ComCtrls;
type
TCheckForm = class(TForm)
Memo: TMemo;
Panel1: TPanel;
btClose: TButton;
btStop: TBitBtn;
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 *.dfm}
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.