Changeset 15 for trunk/UCore.pas
- Timestamp:
- Feb 27, 2018, 6:11:44 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r14 r15 8 8 Classes, SysUtils, FileUtil, Controls, ActnList, Forms, Dialogs, 9 9 ULastOpenedList, UApplicationInfo, UPersistentForm, UScaleDPI, UCommon, 10 UCoolTranslator, UDataFile, Menus, URegistry, Registry;10 UCoolTranslator, UDataFile, Menus, URegistry, UTheme, Registry; 11 11 12 12 type … … 45 45 SaveDialog1: TSaveDialog; 46 46 ScaleDPI1: TScaleDPI; 47 ThemeManager1: TThemeManager; 47 48 procedure AAboutExecute(Sender: TObject); 48 49 procedure AExitExecute(Sender: TObject); … … 179 180 try 180 181 FormSettings.LoadData; 181 if FormSettings.ShowModal = mrOK then 182 if FormSettings.ShowModal = mrOK then begin 182 183 FormSettings.SaveData; 184 ThemeManager1.UseTheme(FormMain); 185 ThemeManager1.UseTheme(FormContacts); 186 end; 183 187 finally 184 188 FormSettings.Free; … … 308 312 NewContact: TContact; 309 313 I: Integer; 310 CountNew: Integer;311 CountUpdated: Integer;312 314 begin 313 315 Result.Clear; … … 368 370 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', '')) 369 371 else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(''); 372 if ValueExists('Theme') then 373 ThemeManager1.Theme := ThemeManager1.Themes.FindByName(ReadStringWithDefault('Theme', 'System')) 374 else ThemeManager1.Theme := ThemeManager1.Themes.FindByName('System'); 370 375 FormMain.MenuItemToolbar.Checked := ReadBoolWithDefault('ToolBarVisible', True); 371 376 ReopenLastFileOnStart := ReadBoolWithDefault('ReopenLastFileOnStart', True); … … 386 391 WriteString('LanguageCode', CoolTranslator1.Language.Code) 387 392 else DeleteValue('LanguageCode'); 393 if Assigned(ThemeManager1.Theme) and (ThemeManager1.Theme.Name <> '') then 394 WriteString('Theme', ThemeManager1.Theme.Name) 395 else DeleteValue('Theme'); 388 396 WriteBool('ToolBarVisible', FormMain.MenuItemToolbar.Checked); 389 397 WriteBool('ReopenLastFileOnStart', ReopenLastFileOnStart);
Note:
See TracChangeset
for help on using the changeset viewer.