Changeset 34 for trunk/UCore.pas
- Timestamp:
- Dec 10, 2016, 10:00:19 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r33 r34 7 7 uses 8 8 Classes, SysUtils, XMLConf, FileUtil, Controls, UProject, UPhysDrive, 9 UCoolTranslator, UPersistentForm, UApplicationInfo ;9 UCoolTranslator, UPersistentForm, UApplicationInfo, URegistry, UScaleDPI; 10 10 11 11 type … … 18 18 ImageList1: TImageList; 19 19 PersistentForm1: TPersistentForm; 20 ScaleDPI1: TScaleDPI; 20 21 XMLConfig1: TXMLConfig; 21 22 procedure DataModuleCreate(Sender: TObject); 22 23 procedure DataModuleDestroy(Sender: TObject); 23 24 private 24 { private declarations }25 RegistryContext: TRegistryContext; 25 26 public 27 DevelMode: Boolean; 26 28 DriveList: TDriveList; 27 29 Project: TProject; 30 procedure LoadConfig; 31 procedure SaveConfig; 28 32 end; 29 33 … … 51 55 end; 52 56 57 procedure TCore.LoadConfig; 58 begin 59 RegistryContext := RegContext(Integer(ApplicationInfo1.RegistryRoot), ApplicationInfo1.RegistryKey); 60 PersistentForm1.RegistryContext := RegistryContext; 61 XMLConfig1.Filename := GetAppConfigDir(False) + 'Config.xml'; 62 63 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(XMLConfig1.GetValue('Language', '')); 64 end; 65 66 procedure TCore.SaveConfig; 67 begin 68 XMLConfig1.SetValue('Language', CoolTranslator1.Language.Code); 69 end; 70 53 71 end. 54 72
Note:
See TracChangeset
for help on using the changeset viewer.