|
Last change
on this file was 139, checked in by chronos, 3 years ago |
- Fixed: Better handle invalid not found pages including correct HTTP code.
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | unit UFormMain;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
|---|
| 7 | ActnList, UPDClient;
|
|---|
| 8 |
|
|---|
| 9 | type
|
|---|
| 10 |
|
|---|
| 11 | { TFormMain }
|
|---|
| 12 |
|
|---|
| 13 | TFormMain = class(TForm)
|
|---|
| 14 | AClientActive: TAction;
|
|---|
| 15 | ActionList1: TActionList;
|
|---|
| 16 | Button1: TButton;
|
|---|
| 17 | ComboBox1: TComboBox;
|
|---|
| 18 | Label1: TLabel;
|
|---|
| 19 | procedure AClientActiveExecute(Sender: TObject);
|
|---|
| 20 | procedure ComboBox1Change(Sender: TObject);
|
|---|
| 21 | procedure FormShow(Sender: TObject);
|
|---|
| 22 | public
|
|---|
| 23 | Client: TPDClient;
|
|---|
| 24 | end;
|
|---|
| 25 |
|
|---|
| 26 | var
|
|---|
| 27 | FormMain: TFormMain;
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 | implementation
|
|---|
| 31 |
|
|---|
| 32 | {$R *.lfm}
|
|---|
| 33 |
|
|---|
| 34 | uses
|
|---|
| 35 | UPersistentData;
|
|---|
| 36 |
|
|---|
| 37 | { TFormMain }
|
|---|
| 38 |
|
|---|
| 39 | procedure TFormMain.FormShow(Sender: TObject);
|
|---|
| 40 | begin
|
|---|
| 41 | DefaultManager.LoadToStrings(ComboBox1.Items);
|
|---|
| 42 | if ComboBox1.Items.Count > 0 then ComboBox1.ItemIndex := 0;
|
|---|
| 43 | end;
|
|---|
| 44 |
|
|---|
| 45 | procedure TFormMain.AClientActiveExecute(Sender: TObject);
|
|---|
| 46 | begin
|
|---|
| 47 | AClientActive.Checked := not AClientActive.Checked;
|
|---|
| 48 | Client.Connected := AClientActive.Checked;
|
|---|
| 49 | end;
|
|---|
| 50 |
|
|---|
| 51 | procedure TFormMain.ComboBox1Change(Sender: TObject);
|
|---|
| 52 | begin
|
|---|
| 53 | FreeAndNil(Client);
|
|---|
| 54 | Client := TPDClientClass(ComboBox1.Items.Objects[ComboBox1.ItemIndex]).Create(Self);
|
|---|
| 55 | end;
|
|---|
| 56 |
|
|---|
| 57 | end.
|
|---|
| 58 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.