Last change
on this file was 149, checked in by chronos, 13 months ago |
- Modified: Use TFormEx class from Common package.
|
File size:
1.2 KB
|
Line | |
---|
1 | unit FormCompileMultiple;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls,
|
---|
7 | Target, FormEx;
|
---|
8 |
|
---|
9 | type
|
---|
10 |
|
---|
11 | { TFormCompileMultiple }
|
---|
12 |
|
---|
13 | TFormCompileMultiple = class(TFormEx)
|
---|
14 | ButtonCompile: TButton;
|
---|
15 | ButtonCancel: TButton;
|
---|
16 | ListViewTargets: TListView;
|
---|
17 | procedure ButtonCompileClick(Sender: TObject);
|
---|
18 | procedure FormShow(Sender: TObject);
|
---|
19 | private
|
---|
20 | FTargets: TTargets;
|
---|
21 | public
|
---|
22 | procedure ReloadList;
|
---|
23 | property Targets: TTargets read FTargets write FTargets;
|
---|
24 | end;
|
---|
25 |
|
---|
26 |
|
---|
27 | implementation
|
---|
28 |
|
---|
29 | {$R *.lfm}
|
---|
30 |
|
---|
31 | procedure TFormCompileMultiple.ButtonCompileClick(Sender: TObject);
|
---|
32 | var
|
---|
33 | I: Integer;
|
---|
34 | begin
|
---|
35 | for I := 0 to ListViewTargets.Items.Count - 1 do
|
---|
36 | TTarget(ListViewTargets.Items[I].Data).Selected :=
|
---|
37 | ListViewTargets.Items[I].Checked;
|
---|
38 | end;
|
---|
39 |
|
---|
40 | procedure TFormCompileMultiple.FormShow(Sender: TObject);
|
---|
41 | begin
|
---|
42 | ReloadList;
|
---|
43 | end;
|
---|
44 |
|
---|
45 | procedure TFormCompileMultiple.ReloadList;
|
---|
46 | var
|
---|
47 | I: Integer;
|
---|
48 | ListItem: TListItem;
|
---|
49 | begin
|
---|
50 | if Assigned(Targets) then
|
---|
51 | for I := 0 to Targets.Count - 1 do
|
---|
52 | with Targets[I] do begin
|
---|
53 | ListItem := ListViewTargets.Items.Add;
|
---|
54 | ListItem.Caption := Name;
|
---|
55 | ListItem.Checked := Selected;
|
---|
56 | ListItem.Data := Targets[I];
|
---|
57 | end;
|
---|
58 | end;
|
---|
59 |
|
---|
60 | end.
|
---|
61 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.