Changeset 59 for trunk/UCore.pas
- Timestamp:
- Dec 3, 2014, 9:09:42 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r55 r59 7 7 uses 8 8 Classes, SysUtils, FileUtil, UApplicationInfo, ULastOpenedList, 9 UCoolTranslator, UTarget, URegistry, Registry ;9 UCoolTranslator, UTarget, URegistry, Registry, XMLConf, Graphics, UScaleDPI; 10 10 11 11 type … … 21 21 private 22 22 public 23 ScaleDPI: TScaleDPI; 23 24 Modified: Boolean; 24 25 ProjectFileName: string; … … 31 32 var 32 33 Core: TCore; 34 33 35 34 36 implementation … … 44 46 procedure TCore.DataModuleCreate(Sender: TObject); 45 47 begin 48 ScaleDPI := TScaleDPI.Create; 46 49 Targets := TTargetList.Create; 47 50 Targets.Add(TTargetInterpretter.Create); … … 57 60 SaveToRegistry(HKEY(ApplicationInfo.RegistryRoot), ApplicationInfo.RegistryKey); 58 61 Targets.Free; 62 ScaleDPI.Free; 59 63 end; 60 64 … … 71 75 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', '')) 72 76 else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(''); 77 ScaleDPI.DPI := Point(ReadIntegerWithDefault('DPIX', 96), 78 ReadIntegerWithDefault('DPIY', 96)); 79 ScaleDPI.AutoDetect := ReadBoolWithDefault('DPIAuto', True); 73 80 finally 74 81 Free; … … 87 94 OpenKey(Key, True); 88 95 WriteBool('OpenProjectOnStart', OpenProjectOnStart); 96 WriteBool('DPIAuto', ScaleDPI.AutoDetect); 97 WriteInteger('DPIX', ScaleDPI.DPI.X); 98 WriteInteger('DPIY', ScaleDPI.DPI.Y); 89 99 if Assigned(CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then 90 100 WriteString('LanguageCode', CoolTranslator1.Language.Code)
Note:
See TracChangeset
for help on using the changeset viewer.