close Warning: Can't synchronize with repository "(default)" (No changeset 184 in the repository). Look in the Trac log for more information.

Changeset 123 for tags/1.0.0/UCore.pas


Ignore:
Timestamp:
Dec 10, 2016, 7:19:34 PM (7 years ago)
Author:
chronos
Message:

Merged revision(s) 121-122 from trunk:

  • Modified: Updated CoolTranslator package.
  • Fixed: Set correct Windows registry path for storing form size.
  • Fixed: Set correct path for Config.xml file.
Location:
tags/1.0.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/1.0.0

  • tags/1.0.0/UCore.pas

    r117 r123  
    77uses
    88  Classes, SysUtils, XMLConf, FileUtil, ActnList, Controls, Dialogs, Forms,
    9   UGame, UApplicationInfo, UPersistentForm, UScaleDPI, UCoolTranslator;
     9  UGame, UApplicationInfo, UPersistentForm, UScaleDPI, UCoolTranslator, URegistry,
     10  Registry;
    1011
    1112type
     
    5051    FInitialized: Boolean;
    5152    StoredDimension: TControlDimension;
     53    RegistryContext: TRegistryContext;
    5254    procedure DoOnMove(CellFrom, CellTo: TCell; var CountOnce,
    5355      CountRepeat: Integer; Update: Boolean; var Confirm: Boolean);
     
    8587  UFormHelp;
    8688
     89const
     90  DefaultRegKey = '\Software\Chronosoft\xTactics';
     91
    8792resourcestring
    8893  SPlayerWins = 'Player %s wins';
     
    157162procedure TCore.LoadConfig;
    158163begin
     164  RegistryContext := RegContext(HKEY_CURRENT_USER, DefaultRegKey);
     165  PersistentForm.RegistryContext := RegistryContext;
     166  XMLConfig1.Filename := GetAppConfigDir(False) + 'Config.xml';
     167
    159168  LastMapFileName := XMLConfig1.GetValue('LastMapFileName', '');
    160169  DevelMode := XMLConfig1.GetValue('DevelMode', false);
Note: See TracChangeset for help on using the changeset viewer.