forked from JOGAsoft/EBC-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.pas
76 lines (56 loc) · 1.42 KB
/
settings.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
unit settings;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,
EditBtn, JLabeledIntegerEdit;
const
cAutoLoad = 0;
cRememberSaveDir = 1;
cRememberAutoLog = 2;
cRememberStepDir = 3;
cForceMon = 4;
cCaptureSettings = 5;
type
{ TfrmSettings }
TfrmSettings = class(TForm)
Button1: TButton;
cgSettings: TCheckGroup;
edtProgFile: TFileNameEdit;
grpParam: TGroupBox;
edtIntTime: TJLabeledIntegerEdit;
rgStart: TRadioGroup;
procedure Button1Click(Sender: TObject);
procedure cgSettingsClick(Sender: TObject);
procedure cgSettingsItemClick(Sender: TObject; Index: integer);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
private
public
end;
var
frmSettings: TfrmSettings;
implementation
{$R *.lfm}
{ TfrmSettings }
procedure TfrmSettings.cgSettingsClick(Sender: TObject);
begin
edtProgFile.Enabled := cgSettings.Checked[cAutoLoad];
end;
procedure TfrmSettings.Button1Click(Sender: TObject);
begin
if edtIntTime.Value < 2 then edtIntTime.Value := 2;
end;
procedure TfrmSettings.cgSettingsItemClick(Sender: TObject; Index: integer);
begin
cgSettingsClick(Sender);
end;
procedure TfrmSettings.FormCreate(Sender: TObject);
begin
cgSettings.CheckEnabled[cCaptureSettings] := False;
end;
procedure TfrmSettings.FormShow(Sender: TObject);
begin
cgSettingsClick(Sender);
end;
end.