Ignore:
Timestamp:
Jun 29, 2024, 7:58:36 AM (3 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/FormMain.pas

    r31 r32  
    1 unit UFormMain;
     1unit FormMain;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    7   ComCtrls, UFormTables;
     7  ComCtrls, FormTables, FormEx;
    88
    99type
     
    1111  { TFormMain }
    1212
    13   TFormMain = class(TForm)
     13  TFormMain = class(TFormEx)
    1414    CoolBar1: TCoolBar;
    1515    MainMenu1: TMainMenu;
     
    4141  end;
    4242
    43 var
    44   FormMain: TFormMain;
    45 
    4643
    4744implementation
     
    5047
    5148uses
    52   UCore;
     49  Core;
    5350
    5451{ TFormMain }
     
    5653procedure TFormMain.FormActivate(Sender: TObject);
    5754begin
    58   Core.Init;
     55  Core.Core.Init;
    5956  // TODO: Toolbar height is incorrectly calculated
    6057  ToolBar1.ButtonHeight := ToolBar1.Height;
     
    6360procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    6461begin
    65   Core.Done;
    66   Core.PersistentForm1.Save(Self);
     62  Core.Core.Done;
    6763end;
    6864
     
    7975procedure TFormMain.FormShow(Sender: TObject);
    8076begin
    81   Core.PersistentForm1.Load(Self, True);
    8277  SetToolbarHints;
    8378  DockInit;
     
    8681procedure TFormMain.DockInit;
    8782begin
    88   FormTables.ManualDock(FormMain, nil, alClient);
     83  FormTables.ManualDock(Self, nil, alClient);
    8984  FormTables.Align := alClient;
    9085  FormTables.Show;
     
    9691begin
    9792  NewCaption := Application.Title;
    98   if Assigned(Core.DbClient) then
    99     NewCaption := Core.DbClient.ConnectProfile.Name + ' - ' + NewCaption;
    100   FormMain.Caption := NewCaption;
     93  if Assigned(Core.Core.DbClient) then
     94    NewCaption := Core.Core.DbClient.ConnectProfile.Name + ' - ' + NewCaption;
     95  Caption := NewCaption;
    10196  FormTables.UpdateInterface;
    10297end;
Note: See TracChangeset for help on using the changeset viewer.