-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuFieldSelection.pas
82 lines (69 loc) · 1.79 KB
/
uFieldSelection.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
82
unit uFieldSelection;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, ComCtrls, StdCtrls, CheckLst, Menus, DynamicSkinForm, SkinCtrls,
SkinBoxCtrls;
type
TfrmFieldSelection = class(TForm)
ButtonsPnl: TPanel;
MainPnl: TPanel;
SelectAllBtn: TButton;
UnselectAllBtn: TButton;
OkBtn: TButton;
CancelBtn: TButton;
ExportLimitCB: TComboBox;
OptionsMenu: TPopupMenu;
Invertselection1: TMenuItem;
spDynamicSkinForm1: TspDynamicSkinForm;
FieldList: TspSkinCheckListBox;
spSkinStdLabel1: TspSkinStdLabel;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure SelectAllBtnClick(Sender: TObject);
procedure UnselectAllBtnClick(Sender: TObject);
procedure Invertselection1Click(Sender: TObject);
private
{ Private declarations }
procedure SetChecks( status : integer );
public
{ Public declarations }
end;
var
frmFieldSelection: TfrmFieldSelection;
implementation
{$R *.DFM}
Uses Main;
procedure TfrmFieldSelection.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
// KrqSetFormPosition(self, fp_ALL);
end;
procedure TfrmFieldSelection.SetChecks( status : integer );
var
HlpCnt : integer;
Stat : boolean;
begin
for HlpCnt := 0 to FieldList.Items.Count-1 do
begin
Stat := FieldList.Checked[HlpCnt];
case status of
0 : Stat := True;
1 : Stat := False;
2 : Stat := not(Stat);
end;
FieldList.Checked[HlpCnt] := Stat;
end;
end;
procedure TfrmFieldSelection.SelectAllBtnClick(Sender: TObject);
begin
SetChecks(0);
end;
procedure TfrmFieldSelection.UnselectAllBtnClick(Sender: TObject);
begin
SetChecks(1);
end;
procedure TfrmFieldSelection.Invertselection1Click(Sender: TObject);
begin
SetChecks(2);
end;
end.