-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathmodulesettings.pas
83 lines (64 loc) · 1.44 KB
/
modulesettings.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 modulesettings;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
ComCtrls;
type
{ TForm3 }
TForm3 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
ListView1: TListView;
RadioGroup1: TRadioGroup;
procedure ModuleActionClick(Sender: TObject);
procedure Button3Click({%H-}Sender: TObject);
procedure FormCreate({%H-}Sender: TObject);
private
FModuleName:string;
public
property ModuleName:string read FModuleName;
end;
var
Form3: TForm3;
implementation
{$R *.lfm}
uses
IniFiles,
installerUniversal,
fpcuputil;
{ TForm3 }
procedure TForm3.ModuleActionClick(Sender: TObject);
var
aResult:TModalResult;
begin
aResult:=mrCancel;
if Assigned(ListView1.Selected) then
begin
FModuleName:=ListView1.Selected.Caption;
if Sender=Button1 then aResult:=mrYes;
if Sender=Button2 then aResult:=mrNo;
end;
Self.ModalResult:=aResult;
end;
procedure TForm3.Button3Click(Sender: TObject);
begin
Self.ModalResult:=mrCancel;
end;
procedure TForm3.FormCreate(Sender: TObject);
var
Item:TListItem;
begin
FModuleName:='unknown';
Item := ListView1.Items.Add;
Item.Caption := 'Name';
Item.Subitems.Add('Surname');
Item.Subitems.Add('Birthfghfghdfgdfghdghdhggfhdfhdhgday');
with TIniFile.Create(SafeGetApplicationPath+installerUniversal.DELUXEFILENAME) do
try
finally
Free;
end;
end;
end.