-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathUDPSettings.pas
More file actions
65 lines (49 loc) · 1.28 KB
/
Copy pathUDPSettings.pas
File metadata and controls
65 lines (49 loc) · 1.28 KB
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
unit UDPSettings;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, SettingsForm, AdvSmoothButton,
AdvOfficeButtons, Vcl.StdCtrls, Vcl.ExtCtrls, AdvPanel, Miscellaneous;
type
TfrmUDPSettings = class(TfrmSettings)
Label2: TLabel;
edtPortList: TEdit;
procedure edtHostChange(Sender: TObject);
private
{ Private declarations }
protected
procedure ApplyChanges; override;
procedure LoadFields; override;
procedure SaveFields; override;
public
{ Public declarations }
end;
implementation
{$R *.dfm}
uses Data, Misc;
procedure TfrmUDPSettings.ApplyChanges;
begin
// Send settings to source
SetSettingString(Group, 'Port', edtPortList.Text);
// Tell source things have changed
inherited;
end;
procedure TfrmUDPSettings.edtHostChange(Sender: TObject);
begin
btnSave.Enabled := True;
end;
procedure TfrmUDPSettings.LoadFields;
begin
inherited;
with DataModule1.tblSources do begin
edtPortList.Text := FieldByName('Port').AsString;
end;
end;
procedure TfrmUDPSettings.SaveFields;
begin
inherited;
with DataModule1.tblSources do begin
FieldByName('Port').AsString := edtPortList.Text;
end;
end;
end.