source: trunk/Forms/UFormCheckout.pas

Last change on this file was 9, checked in by chronos, 10 years ago
  • Added: Simple Bazaar backend.\n* Added: Support for backends dynamic registration.\n* Added: Backend selection in checkout form.
File size: 1.2 KB
Line 
1unit UFormCheckout;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
9 Menus, ExtCtrls;
10
11type
12
13 { TFormCheckout }
14
15 TFormCheckout = class(TForm)
16 Button1: TButton;
17 ButtonCancel: TButton;
18 ButtonOk: TButton;
19 ComboBox1: TComboBox;
20 EditURL: TEdit;
21 EditDir: TEdit;
22 GroupBox1: TGroupBox;
23 GroupBox2: TGroupBox;
24 Label1: TLabel;
25 Label2: TLabel;
26 Label3: TLabel;
27 Panel1: TPanel;
28 procedure Button1Click(Sender: TObject);
29 procedure FormShow(Sender: TObject);
30 private
31 { private declarations }
32 public
33 { public declarations }
34 end;
35
36var
37 FormCheckout: TFormCheckout;
38
39implementation
40
41{$R *.lfm}
42
43uses
44 UCore, UBackend;
45
46{ TFormCheckout }
47
48procedure TFormCheckout.Button1Click(Sender: TObject);
49var
50 NewDir: string;
51begin
52 if SelectDirectory('Select directory', EditDir.Text, NewDir) then
53 EditDir.Text := NewDir;
54end;
55
56procedure TFormCheckout.FormShow(Sender: TObject);
57var
58 I: Integer;
59begin
60 ComboBox1.Clear;
61 for I := 0 to Core.Backends.Count - 1 do
62 ComboBox1.AddItem(TBackend(Core.Backends[I]).Name, Core.Backends[I]);
63 if ComboBox1.Items.Count > 0 then
64 ComboBox1.ItemIndex := 0;
65end;
66
67end.
68
Note: See TracBrowser for help on using the repository browser.