Ignore:
Timestamp:
Jun 21, 2024, 12:44:53 PM (2 weeks 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/FormMove.pas

    r316 r317  
    1 unit UFormMove;
     1unit FormMove;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Spin,
    7   StdCtrls, ComCtrls;
     7  StdCtrls, ComCtrls, FormEx;
    88
    99type
     
    1111  { TFormMove }
    1212
    13   TFormMove = class(TForm)
     13  TFormMove = class(TFormEx)
    1414    ButtonRemove: TButton;
    1515    ButtonRepeatMax: TButton;
     
    3030    procedure ButtonRemoveClick(Sender: TObject);
    3131    procedure ButtonRepeatMinClick(Sender: TObject);
    32     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    33     procedure FormCreate(Sender: TObject);
    3432    procedure ButtonOnceMinClick(Sender: TObject);
    3533    procedure ButtonRepeatMaxClick(Sender: TObject);
     
    4846  end;
    4947
    50 var
    51   FormMove: TFormMove;
    52 
    5348
    5449implementation
     
    5752
    5853uses
    59   UCore;
     54  Core;
    6055
    6156{ TFormMove }
     
    7873  Label3.Visible := ShowWinProbability;
    7974  LabelWinProbability.Caption :=
    80     IntToStr(Round(Core.Game.AttackProbability(AttackCount + SpinEditOnce.Value,
     75    IntToStr(Round(Core.Core.Game.AttackProbability(AttackCount + SpinEditOnce.Value,
    8176    DefendCount) * 100)) + ' %';
    8277end;
     
    9186procedure TFormMove.FormShow(Sender: TObject);
    9287begin
    93   Core.PersistentForm.Load(Self);
    94   Core.ThemeManager1.UseTheme(Self);
    9588  if SpinEditOnce.MaxValue < SpinEditOnce.Value then begin
    9689    SpinEditOnce.Enabled := False;
     
    128121end;
    129122
    130 procedure TFormMove.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    131 begin
    132   Core.PersistentForm.Save(Self);
    133 end;
    134 
    135 procedure TFormMove.FormCreate(Sender: TObject);
    136 begin
    137   Core.CoolTranslator1.TranslateComponentRecursive(Self);
    138 end;
    139 
    140123procedure TFormMove.ButtonOnceMinClick(Sender: TObject);
    141124begin
Note: See TracChangeset for help on using the changeset viewer.