Changeset 30 for trunk/UCore.pas
- Timestamp:
- Jun 28, 2024, 11:08:43 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r28 r30 4 4 5 5 uses 6 Classes, SysUtils, FileUtil, Controls, ActnList, UDatabase, UTranslator,7 UApplicationInfo, UPersistentForm, Forms, URegistry, UScaleDPI;6 Classes, SysUtils, FileUtil, Controls, ActnList, UDatabase, Translator, 7 ApplicationInfo, PersistentForm, Forms, RegistryEx, ScaleDPI; 8 8 9 9 type … … 55 55 56 56 uses 57 UFormTables, UFormConnect, UAboutDialog, UFormDatabases, UFormPreferences,57 UFormTables, UFormConnect, FormAbout, UFormDatabases, UFormPreferences, 58 58 UFormMain; 59 59 … … 100 100 procedure TCore.AAboutExecute(Sender: TObject); 101 101 begin 102 with T AboutDialog.Create(nil) do102 with TFormAbout.Create(nil) do 103 103 try 104 104 ApplicationInfo := ApplicationInfo1; 105 Show ;105 ShowModal; 106 106 finally 107 107 Free; … … 151 151 try 152 152 CurrentContext := TRegistryContext.Create(rrKeyCurrentUser, DefaultRegKey); 153 Preferences.RememberDatabase := GetValue('RememberDatabase', True);154 Preferences.LastDatabaseName := GetValue('LastDatabaseName', '');153 Preferences.RememberDatabase := ReadBoolWithDefault('RememberDatabase', True); 154 Preferences.LastDatabaseName := ReadStringWithDefault('LastDatabaseName', ''); 155 155 Translator1.Language := Translator1.Languages.SearchByCode( 156 GetValue('Language', ''));156 ReadStringWithDefault('Language', '')); 157 157 finally 158 158 Free; … … 166 166 try 167 167 CurrentContext := TRegistryContext.Create(rrKeyCurrentUser, DefaultRegKey); 168 SetValue('RememberDatabase', Preferences.RememberDatabase);169 SetValue('LastDatabaseName', Preferences.LastDatabaseName);170 SetValue('Language', Translator1.Language.Code);168 WriteBool('RememberDatabase', Preferences.RememberDatabase); 169 WriteString('LastDatabaseName', Preferences.LastDatabaseName); 170 WriteString('Language', Translator1.Language.Code); 171 171 finally 172 172 Free;
Note:
See TracChangeset
for help on using the changeset viewer.