Ignore:
Timestamp:
Jun 21, 2024, 12:44:53 PM (5 months ago)
Author:
chronos
Message:
  • Modified: Remove U prefix from unit names.
  • Modified: Use TFormEx for all forms for code simplification.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormGameSystem.pas

    r316 r317  
    1 unit UFormGameSystem;
     1unit FormGameSystem;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    7   ComCtrls, UGameSystem, UFormList;
     7  ComCtrls, GameSystem, FormList, FormEx;
    88
    99type
     
    1111  { TFormGameSystem }
    1212
    13   TFormGameSystem = class(TForm)
     13  TFormGameSystem = class(TFormEx)
    1414    ButtonCancel: TButton;
    1515    ButtonOk: TButton;
     
    2828    procedure ButtonLoadClick(Sender: TObject);
    2929    procedure ButtonSaveClick(Sender: TObject);
    30     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    3130    procedure FormCreate(Sender: TObject);
    3231    procedure FormDestroy(Sender: TObject);
    33     procedure FormShow(Sender: TObject);
    3432  private
    3533    FGameSystem: TGameSystem;
     
    4442  end;
    4543
    46 var
    47   FormGameSystem: TFormGameSystem;
    48 
    4944
    5045implementation
    5146
    5247{$R *.lfm}
    53 
    54 uses
    55   UCore;
    5648
    5749resourcestring
     
    8274end;
    8375
    84 procedure TFormGameSystem.FormClose(Sender: TObject;
    85   var CloseAction: TCloseAction);
    86 begin
    87   Core.PersistentForm.Save(Self);
    88 end;
    89 
    9076procedure TFormGameSystem.FormCreate(Sender: TObject);
    9177begin
    92   Core.ThemeManager1.UseTheme(Self);
    93   Core.CoolTranslator1.TranslateComponentRecursive(Self);
    9478  FormUnitKinds := TFormList.Create(nil);
    9579  FormUnitKinds.ManualDock(TabSheetUnits, nil, alClient);
     
    11296  FreeAndNil(FormUnitKinds);
    11397  FreeAndNil(FormBuildingKinds);
    114 end;
    115 
    116 procedure TFormGameSystem.FormShow(Sender: TObject);
    117 begin
    118   Core.PersistentForm.Load(Self);
    11998end;
    12099
Note: See TracChangeset for help on using the changeset viewer.