-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathUFrmCustomization.pas
57 lines (42 loc) · 1.21 KB
/
UFrmCustomization.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
unit UFrmCustomization;
interface
uses Vcl.Forms, Vcl.StdCtrls, Vcl.Controls, Vcl.ExtCtrls, System.Classes;
type
TFrmCustomization = class(TForm)
CkCheckForNewVersion: TCheckBox;
BottomLine: TBevel;
BtnOK: TButton;
BtnCancel: TButton;
CkSecureMode: TCheckBox;
CkWriteLogFile: TCheckBox;
procedure FormCreate(Sender: TObject);
procedure BtnOKClick(Sender: TObject);
end;
var
FrmCustomization: TFrmCustomization;
procedure DoCustomization;
implementation
{$R *.dfm}
uses UConfig, UFrmMain;
procedure DoCustomization;
begin
FrmCustomization := TFrmCustomization.Create(Application);
FrmCustomization.ShowModal;
FrmCustomization.Free;
end;
procedure TFrmCustomization.FormCreate(Sender: TObject);
begin
Width := Width+8; //fix theme behavior
CkCheckForNewVersion.Checked := Config.CheckForNewVersion;
CkWriteLogFile.Checked := Config.WriteLogFile;
CkSecureMode.Checked := Config.SecureMode;
end;
procedure TFrmCustomization.BtnOKClick(Sender: TObject);
begin
Config.CheckForNewVersion := CkCheckForNewVersion.Checked;
Config.WriteLogFile := CkWriteLogFile.Checked;
Config.SecureMode := CkSecureMode.Checked;
FrmMain.UpdSecureMode;
ModalResult := mrOk;
end;
end.