Ignore:
Timestamp:
Jan 20, 2025, 11:38:55 AM (42 hours ago)
Author:
chronos
Message:
  • Modified: Do not reference global Core object if possible.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormCheck.pas

    r221 r227  
    6767    procedure FormShow(Sender: TObject);
    6868    procedure ListViewReportData(Sender: TObject; Item: TListItem);
    69     procedure MenuItemGoToClick(Sender: TObject);
    7069  private
    7170    AcronymDbSummary: TAcronymDb;
     
    8988    procedure ReloadReport;
    9089  public
     90    AcronymDb: TAcronymDb;
    9191    ReportItems: TReportItems;
    9292    procedure UpdateInterface;
    93     procedure LoadConfig;
    94     procedure SaveConfig;
     93    procedure LoadConfig(RegistryContext: TRegistryContext);
     94    procedure SaveConfig(RegistryContext: TRegistryContext);
    9595  end;
    9696
     
    104104
    105105uses
    106   FormAcronyms, Core;
     106  FormAcronyms;
    107107
    108108resourcestring
     
    227227end;
    228228
    229 procedure TFormCheck.MenuItemGoToClick(Sender: TObject);
    230 begin
    231 
    232 end;
    233 
    234229procedure TFormCheck.ButtonAcronymsContentClick(Sender: TObject);
    235230var
     
    238233  FormAcronyms := TFormAcronyms.Create(Self);
    239234  try
     235    FormAcronyms.AcronymDb := AcronymDb;
    240236    FormAcronyms.Acronyms := AcronymDbContent.Acronyms;
    241237    FormAcronyms.Caption := SContentAcronyms;
     
    252248  FormAcronyms := TFormAcronyms.Create(Self);
    253249  try
     250    FormAcronyms.AcronymDb := AcronymDb;
    254251    FormAcronyms.Acronyms := AcronymDbSummary.Acronyms;
    255252    FormAcronyms.Caption := SSummaryAcronyms;
     
    706703end;
    707704
    708 procedure TFormCheck.LoadConfig;
     705procedure TFormCheck.LoadConfig(RegistryContext: TRegistryContext);
    709706begin
    710707  with TRegistryEx.Create do
    711708  try
    712     RootKey := RegistryRootHKEY[Core.Core.ApplicationInfo1.RegistryRoot];
    713     OpenKey(Core.Core.ApplicationInfo1.RegistryKey, True);
     709    RootKey := RegistryContext.RootKey;
     710    OpenKey(RegistryContext.Key, True);
    714711    EditSummaryStart.Text := ReadStringWithDefault('SummaryStart', 'ACRONYMS AND ABBREVIATIONS');
    715712    EditSummaryEnd.Text := ReadStringWithDefault('SummaryEnd', 'Appendix');
     
    721718end;
    722719
    723 procedure TFormCheck.SaveConfig;
     720procedure TFormCheck.SaveConfig(RegistryContext: TRegistryContext);
    724721begin
    725722  with TRegistryEx.Create do
    726723  try
    727     RootKey := RegistryRootHKEY[Core.Core.ApplicationInfo1.RegistryRoot];
    728     OpenKey(Core.Core.ApplicationInfo1.RegistryKey, True);
     724    RootKey := RegistryContext.RootKey;
     725    OpenKey(RegistryContext.Key, True);
    729726    WriteString('SummaryStart', EditSummaryStart.Text);
    730727    WriteString('SummaryEnd', EditSummaryEnd.Text);
Note: See TracChangeset for help on using the changeset viewer.