Changeset 30 for trunk/UCore.pas


Ignore:
Timestamp:
Jun 28, 2024, 11:08:43 PM (4 months ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r28 r30  
    44
    55uses
    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;
    88
    99type
     
    5555
    5656uses
    57   UFormTables, UFormConnect, UAboutDialog, UFormDatabases, UFormPreferences,
     57  UFormTables, UFormConnect, FormAbout, UFormDatabases, UFormPreferences,
    5858  UFormMain;
    5959
     
    100100procedure TCore.AAboutExecute(Sender: TObject);
    101101begin
    102   with TAboutDialog.Create(nil) do
     102  with TFormAbout.Create(nil) do
    103103  try
    104104    ApplicationInfo := ApplicationInfo1;
    105     Show;
     105    ShowModal;
    106106  finally
    107107    Free;
     
    151151  try
    152152    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', '');
    155155    Translator1.Language := Translator1.Languages.SearchByCode(
    156       GetValue('Language', ''));
     156      ReadStringWithDefault('Language', ''));
    157157  finally
    158158    Free;
     
    166166  try
    167167    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);
    171171  finally
    172172    Free;
Note: See TracChangeset for help on using the changeset viewer.