Ignore:
Timestamp:
Jun 5, 2023, 8:45:38 PM (18 months ago)
Author:
chronos
Message:
  • Modified: Remove U prefix from unit names.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormSettings.pas

    r148 r149  
    1 unit UFormSettings;
     1unit FormSettings;
    22
    33interface
     
    4040  end;
    4141
    42 var
    43   FormSettings: TFormSettings;
    44 
    4542
    4643implementation
     
    4946
    5047uses
    51   UCore, Theme;
     48  Core, Theme;
    5249
    5350{ TFormSettings }
     
    5552procedure TFormSettings.FormShow(Sender: TObject);
    5653begin
    57   Core.PersistentForm1.Load(Self);
     54  Core.Core.PersistentForm1.Load(Self);
    5855
    59   Core.Translator.LanguageListToStrings(ComboBoxLanguage.Items);
    60   ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.Translator.Language);
     56  Core.Core.Translator.LanguageListToStrings(ComboBoxLanguage.Items);
     57  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.Core.Translator.Language);
    6158  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
    6259
    63   Core.ThemeManager1.Themes.LoadToStrings(ComboBoxTheme.Items);
    64   ComboBoxTheme.ItemIndex := ComboBoxTheme.Items.IndexOfObject(Core.ThemeManager1.Theme);
     60  Core.Core.ThemeManager1.Themes.LoadToStrings(ComboBoxTheme.Items);
     61  ComboBoxTheme.ItemIndex := ComboBoxTheme.Items.IndexOfObject(Core.Core.ThemeManager1.Theme);
    6562  if ComboBoxTheme.ItemIndex = -1 then ComboBoxTheme.ItemIndex := 0;
    6663end;
     
    6966begin
    7067  if ComboBoxLanguage.ItemIndex <> -1 then
    71     Core.Translator.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
     68    Core.Core.Translator.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
    7269  if ComboBoxTheme.ItemIndex <> -1 then
    73     Core.ThemeManager1.Theme := TTheme(ComboBoxTheme.Items.Objects[ComboBoxTheme.ItemIndex]);
     70    Core.Core.ThemeManager1.Theme := TTheme(ComboBoxTheme.Items.Objects[ComboBoxTheme.ItemIndex]);
    7471end;
    7572
     
    8784  );
    8885begin
    89   Core.PersistentForm1.Save(Self);
     86  Core.Core.PersistentForm1.Save(Self);
    9087end;
    9188
    9289procedure TFormSettings.FormCreate(Sender: TObject);
    9390begin
    94   Core.Translator.TranslateComponentRecursive(Self);
    95   Core.ThemeManager1.UseTheme(Self);
     91  Core.Core.Translator.TranslateComponentRecursive(Self);
     92  Core.Core.ThemeManager1.UseTheme(Self);
    9693end;
    9794
    9895procedure TFormSettings.LoadData;
    9996begin
    100   CheckBoxAutomaticDPI.Checked := Core.ScaleDPI1.AutoDetect;
    101   SpinEditDPI.Value := Core.ScaleDPI1.DPI.X;
    102   CheckBoxReopenLastFileOnStart.Checked := Core.ReopenLastFileOnStart;
    103   EditDefaultVcardVersion.Text := Core.DefaultVcardVersion;
    104   EditMapUrl.Text := Core.MapUrl;
     97  with Core.Core do begin
     98    CheckBoxAutomaticDPI.Checked := ScaleDPI1.AutoDetect;
     99    SpinEditDPI.Value := ScaleDPI1.DPI.X;
     100    CheckBoxReopenLastFileOnStart.Checked := ReopenLastFileOnStart;
     101    EditDefaultVcardVersion.Text := DefaultVcardVersion;
     102    EditMapUrl.Text := MapUrl;
     103  end;
    105104  UpdateInterface;
    106105end;
     
    108107procedure TFormSettings.SaveData;
    109108begin
    110   Core.ScaleDPI1.AutoDetect := CheckBoxAutomaticDPI.Checked;
    111   Core.ScaleDPI1.DPI := Point(SpinEditDPI.Value, SpinEditDPI.Value);
    112   Core.ReopenLastFileOnStart := CheckBoxReopenLastFileOnStart.Checked;
    113   Core.DefaultVcardVersion := EditDefaultVcardVersion.Text;
    114   Core.MapUrl := EditMapUrl.Text;
     109  with Core.Core do begin
     110    ScaleDPI1.AutoDetect := CheckBoxAutomaticDPI.Checked;
     111    ScaleDPI1.DPI := Point(SpinEditDPI.Value, SpinEditDPI.Value);
     112    ReopenLastFileOnStart := CheckBoxReopenLastFileOnStart.Checked;
     113    DefaultVcardVersion := EditDefaultVcardVersion.Text;
     114    MapUrl := EditMapUrl.Text;
     115  end;
    115116end;
    116117
Note: See TracChangeset for help on using the changeset viewer.