|
Last change
on this file was 23, checked in by chronos, 7 months ago |
- Modified: All unit renamed to names without U prefix.
- Modified: Removed global form variables.
- Modified: Code cleanup.
|
|
File size:
890 bytes
|
| Line | |
|---|
| 1 | unit FormSettings;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
|---|
| 7 | XMLConf;
|
|---|
| 8 |
|
|---|
| 9 | type
|
|---|
| 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 |
|
|---|
| 27 | implementation
|
|---|
| 28 |
|
|---|
| 29 | {$R *.lfm}
|
|---|
| 30 |
|
|---|
| 31 | uses
|
|---|
| 32 | Core;
|
|---|
| 33 |
|
|---|
| 34 | { TFormSettings }
|
|---|
| 35 |
|
|---|
| 36 | procedure TFormSettings.FormCreate(Sender: TObject);
|
|---|
| 37 | begin
|
|---|
| 38 |
|
|---|
| 39 | end;
|
|---|
| 40 |
|
|---|
| 41 | procedure TFormSettings.Load(XMLConfig: TXMLConfig);
|
|---|
| 42 | begin
|
|---|
| 43 | EditUserName.Text := Core.Core.UserName;
|
|---|
| 44 | EditEmail.Text := Core.Core.Email;
|
|---|
| 45 | end;
|
|---|
| 46 |
|
|---|
| 47 | procedure TFormSettings.Save(XMLConfig: TXMLConfig);
|
|---|
| 48 | begin
|
|---|
| 49 | Core.Core.UserName := EditUserName.Text;
|
|---|
| 50 | Core.Core.Email := EditEmail.Text;
|
|---|
| 51 | end;
|
|---|
| 52 |
|
|---|
| 53 | end.
|
|---|
| 54 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.