Changeset 86 for trunk/Forms/FormNew.pas


Ignore:
Timestamp:
Jun 7, 2024, 12:47:11 PM (5 months ago)
Author:
chronos
Message:
  • Modified: Remove U prefix from unit names.
  • Modified: Used TFormEx for all forms for code simplification.
  • Fixed: Fullscreen mode switching error.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormNew.pas

    r85 r86  
    1 unit UFormNew;
    2 
    3 {$mode delphi}{$H+}
     1unit FormNew;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   UGame;
     7  Game, FormEx;
    108
    119type
     
    1311  { TFormNew }
    1412
    15   TFormNew = class(TForm)
     13  TFormNew = class(TFormEx)
    1614    ButtonCancel: TButton;
    1715    ButtonOk: TButton;
     
    2220    Label1: TLabel;
    2321    Label2: TLabel;
    24     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    2522    procedure FormCreate(Sender: TObject);
    26     procedure FormShow(Sender: TObject);
    27   private
    28 
    2923  public
    3024    procedure Load(Game: TGame);
     
    3226  end;
    3327
    34 var
    35   FormNew: TFormNew;
    3628
    3729implementation
     
    4032
    4133uses
    42   UCore;
     34  Core;
    4335
    4436{ TFormNew }
     
    4840  I: TTileSkin;
    4941begin
    50   Core.Translator1.TranslateComponentRecursive(Self);
    51   Core.ThemeManager1.UseTheme(Self);
    5242  ComboBoxSkin.Items.BeginUpdate;
    5343  try
     
    5848    ComboBoxSkin.Items.EndUpdate;
    5949  end;
    60 end;
    61 
    62 procedure TFormNew.FormShow(Sender: TObject);
    63 begin
    64   Core.PersistentForm1.Load(Self);
    65 end;
    66 
    67 procedure TFormNew.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    68 begin
    69   Core.PersistentForm1.Save(Self);
    7050end;
    7151
Note: See TracChangeset for help on using the changeset viewer.