source: trunk/Forms/FormSettings.pas

Last change on this file was 23, checked in by chronos, 4 weeks ago
  • Modified: All unit renamed to names without U prefix.
  • Modified: Removed global form variables.
  • Modified: Code cleanup.
File size: 890 bytes
Line 
1unit FormSettings;
2
3interface
4
5uses
6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
7 XMLConf;
8
9type
10
11 { TFormSettings }
12
13 TFormSettings = class(TForm)
14 ButtonCancel: TButton;
15 ButtonOk: TButton;
16 EditUserName: TEdit;
17 EditEmail: TEdit;
18 Label1: TLabel;
19 Label2: TLabel;
20 procedure FormCreate(Sender: TObject);
21 public
22 procedure Load(XMLConfig: TXMLConfig);
23 procedure Save(XMLConfig: TXMLConfig);
24 end;
25
26
27implementation
28
29{$R *.lfm}
30
31uses
32 Core;
33
34{ TFormSettings }
35
36procedure TFormSettings.FormCreate(Sender: TObject);
37begin
38
39end;
40
41procedure TFormSettings.Load(XMLConfig: TXMLConfig);
42begin
43 EditUserName.Text := Core.Core.UserName;
44 EditEmail.Text := Core.Core.Email;
45end;
46
47procedure TFormSettings.Save(XMLConfig: TXMLConfig);
48begin
49 Core.Core.UserName := EditUserName.Text;
50 Core.Core.Email := EditEmail.Text;
51end;
52
53end.
54
Note: See TracBrowser for help on using the repository browser.