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/FormMain.pas

    r225 r227  
    4646    CheckBoxCaseSensitive: TCheckBox;
    4747    CoolBar1: TCoolBar;
     48    JobProgressView1: TJobProgressView;
    4849    LastOpenedList1: TLastOpenedList;
    4950    ListViewAcronyms: TListView;
     
    272273  FormCheck := TFormCheck.Create(Self);
    273274  try
    274     FormCheck.LoadConfig;
     275    FormCheck.LoadConfig(TRegistryContext.Create(Core.Core.ApplicationInfo1.RegistryRoot,
     276      Core.Core.ApplicationInfo1.RegistryKey));
    275277    FormCheck.ShowModal;
    276     FormCheck.SaveConfig;
     278    FormCheck.SaveConfig(TRegistryContext.Create(Core.Core.ApplicationInfo1.RegistryRoot,
     279      Core.Core.ApplicationInfo1.RegistryKey));
    277280  finally
    278281    FreeAndNil(FormCheck);
     
    286289  FormExport := TFormExport.Create(Self);
    287290  try
     291    FormExport.AcronymDb := Core.Core.AcronymDb;
    288292    FormExport.ShowModal;
    289293  finally
     
    322326begin
    323327  AFileClose.Execute;
    324   if not Assigned(Core.Core.AcronymDb)  then begin
     328  if not Assigned(Core.Core.AcronymDb) then begin
    325329    Core.Core.AcronymDb := TAcronymDb.Create;
    326330    Core.Core.AcronymDb.FileName := DefaultFileName;
     
    406410  FormImport := TFormImport.Create(Self);
    407411  try
     412    FormImport.AcronymDb := Core.Core.AcronymDb;
    408413    FormImport.ShowModal;
    409414    UpdateAcronymsList;
     
    422427    if Assigned(ListViewAcronyms.Selected) then
    423428      FormAcronyms.FocusAcronym := ListViewAcronyms.Selected.Data;
     429    FormAcronyms.AcronymDb := Core.Core.AcronymDb;
    424430    FormAcronyms.Acronyms := Core.Core.AcronymDb.Acronyms;
    425431    FormAcronyms.ShowModal;
     
    435441  ImportTotalItemCount := 0;
    436442  Core.Core.AcronymDb.AddedCount := 0;
    437   Core.Core.JobProgressView1.AddJob(SProcessImportSources, ProcessImportsJob);
    438   Core.Core.JobProgressView1.Start;
     443  JobProgressView1.AddJob(SProcessImportSources, ProcessImportsJob);
     444  JobProgressView1.Start;
    439445  ShowMessage(Format(SAddedCount, [ImportTotalItemCount, Core.Core.AcronymDb.AddedCount]));
    440446  UpdateAcronymsList;
     
    493499  FormAcronyms := TFormAcronyms.Create(Self);
    494500  try
     501    FormAcronyms.AcronymDb := Core.Core.AcronymDb;
    495502    FormAcronyms.Acronyms := Core.Core.AcronymDb.Acronyms;
    496503    FormAcronyms.ShowModal;
     
    508515  FormCategories := TFormCategories.Create(Self);
    509516  try
     517    FormCategories.AcronymDb := Core.Core.AcronymDb;
    510518    FormCategories.Categories := Core.Core.AcronymDb.Categories;
    511519    FormCategories.ShowModal;
     
    529537  FormImportFormats := TFormImportFormats.Create(Self);
    530538  try
     539    FormImportFormats.AcronymDb := Core.Core.AcronymDb;
    531540    FormImportFormats.ImportFormats := Core.Core.AcronymDb.ImportFormats;
    532541    FormImportFormats.ShowModal;
     
    544553  try
    545554    FormImportSources.ImportSources := Core.Core.AcronymDb.ImportSources;
     555    FormImportSources.AcronymDb := Core.Core.AcronymDb;
    546556    FormImportSources.ShowModal;
    547557    UpdateAcronymsList;
Note: See TracChangeset for help on using the changeset viewer.