Changeset 207 for trunk/UCore.pas
- Timestamp:
- Sep 20, 2021, 10:16:37 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r200 r207 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UAcronym, U CoolTranslator, UPersistentForm,8 Classes, SysUtils, FileUtil, UAcronym, UTranslator, UPersistentForm, 9 9 UJobProgressView, UScaleDPI, Forms, Controls, ExtCtrls, Menus, LazFileUtils, 10 URegistry, UApplicationInfo, Registry, UTheme ;10 URegistry, UApplicationInfo, Registry, UTheme, UAboutDialog; 11 11 12 12 type … … 16 16 TCore = class(TDataModule) 17 17 ApplicationInfo1: TApplicationInfo; 18 CoolTranslator1: TCoolTranslator; 18 ThemeManager: TThemeManager; 19 Translator: TTranslator; 19 20 ImageList1: TImageList; 20 21 ImageListLarge: TImageList; … … 31 32 ScaleDPI1: TScaleDPI; 32 33 TrayIcon1: TTrayIcon; 33 procedure CoolTranslator1Translate(Sender: TObject);34 procedure TranslatorTranslate(Sender: TObject); 34 35 procedure DataModuleCreate(Sender: TObject); 35 36 procedure DataModuleDestroy(Sender: TObject); … … 48 49 InitializeStarted: Boolean; 49 50 InitializeFinished: Boolean; 50 ThemeManager: TThemeManager;51 51 procedure Initialize; 52 52 procedure LoadConfig; … … 87 87 InitializeFinished := False; 88 88 StoredDimension := TControlDimension.Create; 89 ThemeManager := TThemeManager.Create(nil);90 89 end; 91 90 92 91 procedure TCore.DataModuleDestroy(Sender: TObject); 93 92 begin 94 FreeAndNil(ThemeManager);95 93 FreeAndNil(StoredDimension); 96 94 FreeAndNil(AcronymDb); … … 103 101 end; 104 102 105 procedure TCore. CoolTranslator1Translate(Sender: TObject);103 procedure TCore.TranslatorTranslate(Sender: TObject); 106 104 begin 107 105 UAcronym.Translate; … … 211 209 ScaleDPI1.AutoDetect := ReadBoolWithDefault('DPIAuto', True); 212 210 if ValueExists('LanguageCode') then 213 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))214 else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('');211 Translator.Language := Translator.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', '')) 212 else Translator.Language := Translator.Languages.SearchByCode(''); 215 213 AlwaysOnTop := ReadBoolWithDefault('AlwaysOnTop', False); 216 214 StartMinimizedToTray := ReadBoolWithDefault('StartMinimizedToTray', False); … … 233 231 WriteInteger('DPIY', ScaleDPI1.DPI.Y); 234 232 WriteBool('DPIAuto', ScaleDPI1.AutoDetect); 235 if Assigned( CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then236 WriteString('LanguageCode', CoolTranslator1.Language.Code)233 if Assigned(Translator.Language) and (Translator.Language.Code <> '') then 234 WriteString('LanguageCode', Translator.Language.Code) 237 235 else DeleteValue('LanguageCode'); 238 236 WriteBool('AlwaysOnTop', AlwaysOnTop);
Note:
See TracChangeset
for help on using the changeset viewer.