Changeset 152 for trunk/Core.pas


Ignore:
Timestamp:
Jun 6, 2023, 5:05:18 PM (12 months ago)
Author:
chronos
Message:
  • Added: VCardProcessor class for processing contacts available from VCard package.
  • Added: Normalize menu action for normalization of contact property values.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Core.pas

    r151 r152  
    1616    AAbout: TAction;
    1717    AboutDialog1: TAboutDialog;
     18    ANormalize: TAction;
    1819    ARemoveExactDuplicates: TAction;
    1920    AFileCompare: TAction;
     
    6061    procedure AGenerateExecute(Sender: TObject);
    6162    procedure AHomePageExecute(Sender: TObject);
     63    procedure ANormalizeExecute(Sender: TObject);
    6264    procedure ARemoveExactDuplicatesExecute(Sender: TObject);
    6365    procedure ASettingsExecute(Sender: TObject);
     
    102104    ToolbarVisible: Boolean;
    103105    DefaultVcardVersion: string;
    104     DefaultPhoneCountryPrefix: string;
     106    DefaultPhoneCountryCode: string;
     107    DefaultInternationalCallPrefix: string;
    105108    CompareTool: string;
    106109    function GetProfileImage: TImage;
     
    126129
    127130uses
    128   FormMain, FormSettings, FormFindDuplicity, FormCompare, TestCase,
     131  FormMain, FormSettings, FormFindDuplicity, FormCompare, TestCase, FormNormalize,
    129132  FormGenerate, FormError, FormFind, FormTest, FormSource, FormCompareSideBySide,
    130133  TestCases;
     
    285288end;
    286289
     290procedure TCore.ANormalizeExecute(Sender: TObject);
     291var
     292  FormNormalize: TFormNormalize;
     293begin
     294  FormNormalize := TFormNormalize.Create(nil);
     295  try
     296    FormNormalize.ShowModal;
     297  finally
     298    FreeAndNil(FormNormalize);
     299  end;
     300end;
     301
    287302procedure TCore.ARemoveExactDuplicatesExecute(Sender: TObject);
    288303var
     
    540555    LastQrCodeFileName := ReadStringWithDefault('LastQrCodeFileName', '');
    541556    CompareTool := ReadStringWithDefault('CompareTool', GetDefaultCompareTool);
    542     DefaultPhoneCountryPrefix := ReadStringWithDefault('DefaultPhoneCountryPrefix', DefaultPhoneCountryPrefix);
     557    DefaultPhoneCountryCode := ReadStringWithDefault('DefaultPhoneCountryPrefix', DefaultPhoneCountryCode);
     558    DefaultInternationalCallPrefix := ReadStringWithDefault('DefaultInternationalCallPrefix', DefaultInternationalCallPrefix);
    543559  finally
    544560    Free;
     
    568584    WriteString('LastQrCodeFileName', LastQrCodeFileName);
    569585    WriteString('CompareTool', CompareTool);
    570     WriteString('DefaultPhoneCountryPrefix', DefaultPhoneCountryPrefix);
     586    WriteString('DefaultPhoneCountryPrefix', DefaultPhoneCountryCode);
     587    WriteString('DefaultInternationalCallPrefix', DefaultInternationalCallPrefix);
    571588  finally
    572589    Free;
Note: See TracChangeset for help on using the changeset viewer.