Ignore:
Timestamp:
Jun 29, 2024, 7:58:36 AM (5 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from units names.
  • Modified: Use TFormEx for all forms.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormConnect.pas

    r31 r32  
    1 unit UFormConnect;
     1unit FormConnect;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    7   ComCtrls, Spin, UDatabase;
     7  ComCtrls, Spin, DbEngine, FormEx;
    88
    99type
     
    1111  { TFormConnect }
    1212
    13   TFormConnect = class(TForm)
     13  TFormConnect = class(TFormEx)
    1414    ButtonXmlBrowse: TButton;
    1515    ButtonOk: TButton;
     
    3333    procedure ButtonXmlBrowseClick(Sender: TObject);
    3434    procedure ComboBoxDbEnginesChange(Sender: TObject);
    35     procedure FormCreate(Sender: TObject);
     35  private
     36    FDbManager: TDbManager;
     37    procedure SetDbManager(AValue: TDbManager);
    3638  public
    3739    procedure Load(ConnectProfile: TDbConnectProfile);
     
    3941    procedure ReloadDbEngines;
    4042    procedure UpdateInterface;
     43    property DbManager: TDbManager read FDbManager write SetDbManager;
    4144  end;
    4245
     
    4750
    4851uses
    49   UCore, UEngineXML, UEngineMySQL;
     52  EngineXML, EngineMySQL;
    5053
    5154resourcestring
     
    6972end;
    7073
    71 procedure TFormConnect.FormCreate(Sender: TObject);
     74procedure TFormConnect.SetDbManager(AValue: TDbManager);
    7275begin
     76  if FDbManager = AValue then Exit;
     77  FDbManager := AValue;
    7378  ReloadDbEngines;
    7479end;
     
    110115  try
    111116    ComboBoxDbEngines.Items.Clear;
    112     for I := 0 to Core.DbManager.ClientTypes.Count - 1 do
    113       ComboBoxDbEngines.Items.AddObject(Core.DbManager.ClientTypes[I].Name,
    114         Core.DbManager.ClientTypes[I]);
     117    for I := 0 to DbManager.ClientTypes.Count - 1 do
     118      ComboBoxDbEngines.Items.AddObject(DbManager.ClientTypes[I].Name,
     119        DbManager.ClientTypes[I]);
    115120  finally
    116121    ComboBoxDbEngines.Items.Endupdate;
Note: See TracChangeset for help on using the changeset viewer.