|
Last change
on this file was 41, checked in by george, 16 years ago |
- Přidáno: Zdrojové kódy ukázkového programu pro plnění údajů v Delphi.
|
|
File size:
1.5 KB
|
| Line | |
|---|
| 1 | unit UOptionsForm;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|---|
| 7 | Dialogs, StdCtrls, Mask;
|
|---|
| 8 |
|
|---|
| 9 | type
|
|---|
| 10 | TOptionsForm = class(TForm)
|
|---|
| 11 | Button1: TButton;
|
|---|
| 12 | Button2: TButton;
|
|---|
| 13 | Label1: TLabel;
|
|---|
| 14 | Edit1: TEdit;
|
|---|
| 15 | Label2: TLabel;
|
|---|
| 16 | Edit2: TEdit;
|
|---|
| 17 | Label3: TLabel;
|
|---|
| 18 | Edit3: TEdit;
|
|---|
| 19 | Label4: TLabel;
|
|---|
| 20 | Edit4: TEdit;
|
|---|
| 21 | Label5: TLabel;
|
|---|
| 22 | MaskEdit1: TMaskEdit;
|
|---|
| 23 | procedure Button2Click(Sender: TObject);
|
|---|
| 24 | procedure Button1Click(Sender: TObject);
|
|---|
| 25 | procedure FormShow(Sender: TObject);
|
|---|
| 26 | private
|
|---|
| 27 | { Private declarations }
|
|---|
| 28 | public
|
|---|
| 29 | { Public declarations }
|
|---|
| 30 | end;
|
|---|
| 31 |
|
|---|
| 32 | var
|
|---|
| 33 | OptionsForm: TOptionsForm;
|
|---|
| 34 |
|
|---|
| 35 | implementation
|
|---|
| 36 |
|
|---|
| 37 | uses UMainForm;
|
|---|
| 38 |
|
|---|
| 39 | {$R *.dfm}
|
|---|
| 40 |
|
|---|
| 41 | procedure TOptionsForm.Button2Click(Sender: TObject);
|
|---|
| 42 | begin
|
|---|
| 43 | Close;
|
|---|
| 44 | end;
|
|---|
| 45 |
|
|---|
| 46 | procedure TOptionsForm.Button1Click(Sender: TObject);
|
|---|
| 47 | begin
|
|---|
| 48 | MainForm.StatServerUrl := Edit1.Text;
|
|---|
| 49 | MainForm.DatabaseHostname := Edit2.Text;
|
|---|
| 50 | MainForm.DatabaseDatabase := Edit3.Text;
|
|---|
| 51 | MainForm.DatabaseUserName := Edit4.Text;
|
|---|
| 52 | MainForm.DatabasePassword := MaskEdit1.Text;
|
|---|
| 53 | // MainForm.MangosFailure := Edit5.Text;
|
|---|
| 54 | Close;
|
|---|
| 55 | end;
|
|---|
| 56 |
|
|---|
| 57 | procedure TOptionsForm.FormShow(Sender: TObject);
|
|---|
| 58 | begin
|
|---|
| 59 | Edit1.Text := MainForm.StatServerUrl;
|
|---|
| 60 | Edit2.Text := MainForm.DatabaseHostname;
|
|---|
| 61 | Edit3.Text := MainForm.DatabaseDatabase;
|
|---|
| 62 | Edit4.Text := MainForm.DatabaseUserName;
|
|---|
| 63 | // Edit5.Text := MainForm.MangosFailure;
|
|---|
| 64 | MaskEdit1.Text := MainForm.DatabasePassword;
|
|---|
| 65 | end;
|
|---|
| 66 |
|
|---|
| 67 | end.
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.