Ignore:
Timestamp:
Mar 26, 2024, 6:13:44 PM (8 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from unit names.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormMain.pas

    r72 r73  
    1 unit UFormMain;
     1unit FormMain;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, LCLType,
    7   Dialogs, ExtCtrls, ComCtrls, Menus, ActnList, UEngine, UPlatform, Math,
     7  Dialogs, ExtCtrls, ComCtrls, Menus, ActnList, Engine, Platform, Math,
    88  DateUtils, GraphType, UPersistentForm, UApplicationInfo, UTranslator,
    9   URegistry, UAboutDialog;
     9  URegistry, UAboutDialog, FormNewGame, FormMap;
    1010
    1111type
     
    6161    PersistentForm: TPersistentForm;
    6262    Engine: TEngine;
     63    FormNewGame: TFormNewGame;
     64    FormMap: TFormMap;
    6365    procedure EraseBackground(DC: HDC); override;
    6466  end;
     
    7375
    7476uses
    75   UCore, UFormMap, UFormNewGame;
     77  Core;
    7678
    7779resourcestring
     
    115117  with TRegistryEx.Create do
    116118  try
    117     CurrentContext := Core.ApplicationInfo.GetRegistryContext;
     119    CurrentContext := Core.Core.ApplicationInfo.GetRegistryContext;
    118120
    119121    if ValueExists('LanguageCode') then begin
    120122      LangCode := ReadStringWithDefault('LanguageCode', '');
    121       Core.Translator1.Language := Core.Translator1.Languages.SearchByCode(LangCode);
    122     end else Core.Translator1.Language := Core.Translator1.Languages.SearchByCode('');
     123      Core.Core.Translator1.Language := Core.Core.Translator1.Languages.SearchByCode(LangCode);
     124    end else Core.Core.Translator1.Language := Core.Core.Translator1.Languages.SearchByCode('');
    123125    Engine.LoadFromRegistry(CurrentContext);
    124126  finally
     
    131133  with TRegistryEx.Create do
    132134  try
    133     CurrentContext := Core.ApplicationInfo.GetRegistryContext;
    134 
    135     if Assigned(Core.Translator1.Language) and (Core.Translator1.Language.Code <> '') then
    136       WriteString('LanguageCode', Core.Translator1.Language.Code)
     135    CurrentContext := Core.Core.ApplicationInfo.GetRegistryContext;
     136
     137    if Assigned(Core.Core.Translator1.Language) and (Core.Core.Translator1.Language.Code <> '') then
     138      WriteString('LanguageCode', Core.Core.Translator1.Language.Code)
    137139      else DeleteValue('LanguageCode');
    138140    Engine.SaveToRegistry(CurrentContext);
     
    167169  {$IFDEF UNIX}
    168170  // If installed in UNIX system then use installation directory for po files
    169   if not DirectoryExists(Core.Translator1.POFilesFolder) and DirectoryExists(UnixLanguagesDir) then
    170     Core.Translator1.POFilesFolder := UnixLanguagesDir;
     171  if not DirectoryExists(Core.Core.Translator1.POFilesFolder) and DirectoryExists(UnixLanguagesDir) then
     172    Core.Core.Translator1.POFilesFolder := UnixLanguagesDir;
    171173  {$ENDIF}
    172174
     
    175177
    176178  PersistentForm := TPersistentForm.Create(nil);
    177   PersistentForm.RegistryContext := TRegistryContext.Create(Core.ApplicationInfo.RegistryRoot,
    178     Core.ApplicationInfo.RegistryKey);
     179  PersistentForm.RegistryContext := TRegistryContext.Create(Core.Core.ApplicationInfo.RegistryRoot,
     180    Core.Core.ApplicationInfo.RegistryKey);
    179181
    180182  Application.OnDeactivate := FormDeactivate;
     
    265267procedure TFormMain.FormShow(Sender: TObject);
    266268begin
    267   PersistentForm.RegistryContext := Core.ApplicationInfo.GetRegistryContext;
     269  PersistentForm.RegistryContext := Core.Core.ApplicationInfo.GetRegistryContext;
    268270  PersistentForm.Load(Self, False, True);
    269271  FullScreenEnabled := PersistentForm.FormFullScreen;
Note: See TracChangeset for help on using the changeset viewer.