-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathunit_exit.pas
81 lines (63 loc) · 1.46 KB
/
unit_exit.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
unit unit_exit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, uETilePanel, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, ExtCtrls, ComCtrls;
type
{ TFHalt }
TFHalt = class(TForm)
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Label1: TLabel;
autorun: TTimer;
stat: TProgressBar;
uETilePanel1: TuETilePanel;
procedure autorunTimer(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
wylaczenie: boolean;
end;
var
FHalt: TFHalt;
implementation
{$R *.lfm}
{ TFHalt }
procedure TFHalt.FormCreate(Sender: TObject);
begin
wylaczenie:=true;
end;
procedure TFHalt.autorunTimer(Sender: TObject);
begin
stat.StepIt;
if stat.Position=stat.Max then
begin
enabled:=false;
close;
end;
end;
procedure TFHalt.BitBtn1Click(Sender: TObject);
begin
close;
end;
procedure TFHalt.BitBtn2Click(Sender: TObject);
begin
wylaczenie:=false;
close;
end;
procedure TFHalt.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
autorun.Enabled:=false;
end;
procedure TFHalt.FormShow(Sender: TObject);
begin
autorun.Enabled:=true;
end;
end.