Changeset 126 for trunk/UCore.pas


Ignore:
Timestamp:
Apr 6, 2022, 11:36:27 AM (3 years ago)
Author:
chronos
Message:
  • Added: Action to remove exact duplicates.
  • Modified: Test cases definition moved to separate file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r123 r126  
    1717    AAbout: TAction;
    1818    AboutDialog1: TAboutDialog;
     19    ARemoveExactDuplicates: TAction;
    1920    AFileCompare: TAction;
    2021    AViewSource: TAction;
     
    6061    procedure AGenerateExecute(Sender: TObject);
    6162    procedure AHomePageExecute(Sender: TObject);
     63    procedure ARemoveExactDuplicatesExecute(Sender: TObject);
    6264    procedure ASettingsExecute(Sender: TObject);
    6365    procedure ATestExecute(Sender: TObject);
     
    6668    procedure DataModuleDestroy(Sender: TObject);
    6769    procedure LastOpenedList1Change(Sender: TObject);
     70    procedure TranslatorTranslate(Sender: TObject);
    6871  private
    6972    InitializeStarted: Boolean;
     
    113116
    114117uses
    115   UFormMain, UFormSettings, UContact, UFormContacts, UFormFindDuplicity,
    116   UFormGenerate, UFormError, UFormFind, UFormTest, UFormSource, UFormCompare;
     118  UFormMain, UFormSettings, UContact, UFormContacts, UFormFindDuplicity, UTest,
     119  UFormGenerate, UFormError, UFormFind, UFormTest, UFormSource, UFormCompare,
     120  UTestCases;
    117121
    118122resourcestring
     
    294298end;
    295299
     300procedure TCore.ARemoveExactDuplicatesExecute(Sender: TObject);
     301begin
     302  TContactsFile(DataFile).Contacts.RemoveExactDuplicates;
     303  UpdateFile;
     304end;
     305
    296306procedure TCore.ASettingsExecute(Sender: TObject);
    297307begin
     
    313323  with TFormTest.Create(nil) do
    314324  try
    315     ShowModal;
     325    TestCases := InitTestCases;
     326    try
     327      ShowModal;
     328    finally
     329      TestCases.Free;
     330    end;
    316331  finally
    317332    Free;
     
    428443  LastOpenedList1.LoadToMenuItem(FormMain.MenuItemFileOpenRecent, AFileOpenRecentExecute);
    429444  LastOpenedList1.LoadToMenuItem(FormMain.PopupMenuOpenRecent.Items, AFileOpenRecentExecute);
     445end;
     446
     447procedure TCore.TranslatorTranslate(Sender: TObject);
     448begin
     449  UTest.Translate;
    430450end;
    431451
Note: See TracChangeset for help on using the changeset viewer.