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

Changeset 122


Ignore:
Timestamp:
Dec 10, 2016, 7:14:25 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: Set correct Windows registry path for storing form size.
  • Fixed: Set correct path for Config.xml file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r115 r122  
    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.