Changeset 219 for trunk/Core.pas


Ignore:
Timestamp:
Jan 17, 2025, 9:05:54 PM (4 days ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
  • Modified: Remove U prefix from unit names.
  • Modified: Use Gneeric.Collections instead of fgl.
  • Modified: Do not use global form variables.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Core.pas

    r218 r219  
    1 unit UCore;
    2 
    3 {$mode delphi}
     1unit Core;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, FileUtil, UAcronym, UTranslator, UPersistentForm,
    9   UJobProgressView, UScaleDPI, Forms, Controls, ExtCtrls, Menus, LazFileUtils,
    10   URegistry, UApplicationInfo, Registry, UTheme;
     6  Classes, SysUtils, FileUtil, Acronym, Translator, PersistentForm,
     7  JobProgressView, ScaleDPI, Forms, Controls, ExtCtrls, Menus, LazFileUtils,
     8  RegistryEx, ApplicationInfo, Registry, Theme, FormMain;
    119
    1210type
     
    4341    procedure WriteLnConsole(Text: string);
    4442  public
     43    FormMain: TFormMain;
    4544    AcronymDb: TAcronymDb;
    4645    StartOnLogon: Boolean;
     
    5453    procedure SaveConfig;
    5554    procedure ScaleDPI;
     55    function CompareStrings(Strings1, Strings2: TStrings): Boolean;
    5656    property AlwaysOnTop: Boolean read FAlwaysOnTop write SetAlwaysOnTop;
    5757  end;
     
    6262
    6363implementation
    64 
    65 uses
    66   UFormMain;
    6764
    6865const
     
    8784  InitializeFinished := False;
    8885  StoredDimension := TControlDimension.Create;
     86  Application.CreateForm(TFormMain, FormMain);
    8987end;
    9088
     
    9593end;
    9694
     95function TCore.CompareStrings(Strings1, Strings2: TStrings): Boolean;
     96var
     97  I: Integer;
     98begin
     99  Result := Strings1.Count = Strings2.Count;
     100  if not Result then Exit;
     101  for I := 0 to Strings1.Count - 1 do
     102    if (Strings1[I] <> Strings2[I]) or (Strings1.Objects[I] <> Strings2.Objects[I]) then begin
     103      Result := False;
     104      Exit;
     105    end;
     106end;
     107
    97108procedure TCore.TrayIcon1Click(Sender: TObject);
    98109begin
     
    103114procedure TCore.TranslatorTranslate(Sender: TObject);
    104115begin
    105   UAcronym.Translate;
     116  Acronym.Translate;
    106117end;
    107118
     
    276287end;
    277288
    278 
    279 
    280289end.
    281290
Note: See TracChangeset for help on using the changeset viewer.