-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunit1.pas
More file actions
90 lines (68 loc) · 1.75 KB
/
unit1.pas
File metadata and controls
90 lines (68 loc) · 1.75 KB
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
unit Unit1;
{$mode ObjFPC}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons;
type
{TF_Switch_Pages}
TF_Switch_Pages=class(TForm)
BB_Prev: TBitBtn;
BB_Next: TBitBtn;
procedure BB_PrevClick ( Sender :TObject);
procedure BB_NextClick ( Sender :TObject);
procedure FormClose ( Sender :TObject;
var CloseAction:TCloseAction);
procedure FormCreate ( Sender :TObject);
procedure FormMouseLeave( Sender :TObject);
procedure FormResize ( Sender :TObject);
end;
var
F_Switch_Pages: TF_Switch_Pages;
implementation
uses
main;
{TF_Switch_Pages}
procedure TF_Switch_Pages.FormCreate (Sender:TObject);
begin
PageInd:=0;
Width :=F_AstrillVPN.Width;
end;
procedure TF_Switch_Pages.FormResize (Sender:TObject);
begin
BB_Next.Left:=F_Switch_Pages.Width>>1;
end;
procedure TF_Switch_Pages.FormMouseLeave(Sender:TObject);
begin
DefocusControl(ActiveControl,True);
BB_Prev.Enabled:=False;
BB_Next.Enabled:=False;
BB_Prev.Enabled:=True;
BB_Next.Enabled:=True;
end;
procedure TF_Switch_Pages.FormClose (Sender:TObject; var CloseAction:TCloseAction);
begin
F_AstrillVPN.Close;
//Halt;
end;
procedure TF_Switch_Pages.BB_PrevClick (Sender:TObject);
begin
with F_AstrillVPN do
case PageInd of
0: Exit;
1: ShowPage(0);
2: ShowPage(1);
end;
end;
procedure TF_Switch_Pages.BB_NextClick (Sender:TObject);
begin
with F_AstrillVPN do
case PageInd of
0: ShowPage(1);
1: ShowPage(2);
2: Exit;
end;
end;
initialization
{$I unit1.lrs}
end.