Ignore:
Timestamp:
May 18, 2015, 11:49:39 PM (10 years ago)
Author:
chronos
Message:
  • Added: Simple Bazaar backend.\n* Added: Support for backends dynamic registration.\n* Added: Backend selection in checkout form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormCheckout.pas

    r8 r9  
    66
    77uses
    8   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
     8  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
     9  Menus, ExtCtrls;
    910
    1011type
     
    1617    ButtonCancel: TButton;
    1718    ButtonOk: TButton;
     19    ComboBox1: TComboBox;
    1820    EditURL: TEdit;
    1921    EditDir: TEdit;
     
    2224    Label1: TLabel;
    2325    Label2: TLabel;
     26    Label3: TLabel;
     27    Panel1: TPanel;
    2428    procedure Button1Click(Sender: TObject);
     29    procedure FormShow(Sender: TObject);
    2530  private
    2631    { private declarations }
     
    3641{$R *.lfm}
    3742
     43uses
     44  UCore, UBackend;
     45
    3846{ TFormCheckout }
    3947
     
    4654end;
    4755
     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
    4867end.
    4968
Note: See TracChangeset for help on using the changeset viewer.