-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuFrmSettings.pas
70 lines (59 loc) · 1.47 KB
/
uFrmSettings.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
unit uFrmSettings;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, sEdit, sLabel, sGroupBox, sButton, sSpinEdit,
uDM, Vcl.ExtCtrls, sPanel, System.Generics.Collections, sCheckBox;
type
TfrmSettings = class(TForm)
sGroupBox1: TsGroupBox;
sLabel1: TsLabel;
sLabel2: TsLabel;
txtHost: TsEdit;
txtUsername: TsEdit;
sLabel3: TsLabel;
txtPassword: TsEdit;
txtPort: TsSpinEdit;
sLabel4: TsLabel;
sPanel1: TsPanel;
btnCancel: TsButton;
btnApply: TsButton;
txtFolder: TsEdit;
sLabel5: TsLabel;
sLabel6: TsLabel;
chkPassive: TsCheckBox;
procedure FormShow(Sender: TObject);
procedure btnApplyClick(Sender: TObject);
procedure WriteIniFile;
private
public
{ Public declarations }
end;
var
frmSettings: TfrmSettings;
implementation
{$R *.dfm}
uses
IdFTPList;
procedure TfrmSettings.btnApplyClick(Sender: TObject);
begin
WriteIniFile;
end;
procedure TfrmSettings.FormShow(Sender: TObject);
begin
txtHost.Text := dm.Host;
txtUsername.Text := dm.Username;
txtPassword.Text := dm.Password;
txtPort.Value := dm.Port;
chkPassive.Checked := dm.Passive;
end;
procedure TfrmSettings.WriteIniFile;
begin
dm.Host := txtHost.Text;
dm.Username := txtUsername.Text;
dm.Password := txtPassword.Text;
dm.Port := txtPort.Value;
dm.Passive := chkPassive.Checked;
dm.WriteIniFile;
end;
end.