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/FormCharts.pas

    r316 r317  
    1 unit UFormCharts;
     1unit FormCharts;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, TAGraph, TASeries, Forms, Controls, Graphics,
    7   Dialogs, StdCtrls;
     7  Dialogs, StdCtrls, FormEx;
    88
    99type
     
    1111  { TFormCharts }
    1212
    13   TFormCharts = class(TForm)
     13  TFormCharts = class(TFormEx)
    1414    Chart1: TChart;
    1515    ComboBox1: TComboBox;
    1616    procedure ComboBox1Change(Sender: TObject);
    17     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    1817    procedure FormShow(Sender: TObject);
    1918  public
     
    2120    procedure Translate;
    2221  end;
    23 
    24 var
    25   FormCharts: TFormCharts;
    2622
    2723
     
    3127
    3228uses
    33   UCore, UGame, UPlayer;
     29  Core, Game, Player;
    3430
    3531resourcestring
     
    4844end;
    4945
    50 procedure TFormCharts.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    51 begin
    52   Core.PersistentForm.Save(Self);
    53 end;
    54 
    5546procedure TFormCharts.FormShow(Sender: TObject);
    5647begin
    57   Core.PersistentForm.Load(Self);
    58   Core.ThemeManager1.UseTheme(Self);
    5948  Redraw;
    6049  Translate;
     
    7059begin
    7160  Chart1.Series.Clear;
    72   for I := 0 to Core.Game.Players.Count - 1 do
    73   with TPlayer(Core.Game.Players[I]) do begin
     61  for I := 0 to Core.Core.Game.Players.Count - 1 do
     62  with TPlayer(Core.Core.Game.Players[I]) do begin
    7463    NewSeries := TLineSeries.Create(nil);
    7564    NewSeries.LinePen.Color := Color;
     
    8978  LastIndex: Integer;
    9079begin
    91   Core.CoolTranslator1.TranslateComponentRecursive(Self);
     80  Core.Core.Translator1.TranslateComponentRecursive(Self);
    9281  with ComboBox1 do begin
    9382    LastIndex := ItemIndex;
Note: See TracChangeset for help on using the changeset viewer.