Ignore:
Timestamp:
Jan 25, 2015, 9:41:26 PM (10 years ago)
Author:
chronos
Message:
  • Added: Preferences dialog window.
  • Modified: Currently selected database is set in TCore class in field Database.
  • Added: Application remembers name of previous opened database and reopen it during startup.
  • Modified: FormDatabases is now used as modal form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormDatabases.pas

    r6 r9  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   Menus, ActnList;
     9  Menus, ActnList, UDatabase;
    1010
    1111type
     
    4242    { private declarations }
    4343  public
     44    SelectedDatabase: TDatabase;
    4445    procedure ReloadList;
    4546    procedure UpdateInterface;
     
    5455
    5556uses
    56   UCore, UDatabase, UFormTables, UFormConnect;
     57  UCore, UFormTables, UFormConnect;
    5758
    5859{ TFormDatabases }
     
    6566procedure TFormDatabases.AOpenExecute(Sender: TObject);
    6667begin
    67   if Assigned(ListView1.Selected) then
    68   with TDatabase(ListView1.Selected.Data) do begin
    69     Load;
    70     FormTables.Database := TDatabase(ListView1.Selected.Data);
    71     FormTables.ShowModal;
     68  if Assigned(ListView1.Selected) then begin
     69    SelectedDatabase := TDatabase(ListView1.Selected.Data);
     70    ModalResult := mrOk;
    7271  end;
    7372end;
Note: See TracChangeset for help on using the changeset viewer.