Ignore:
Timestamp:
Apr 9, 2022, 11:52:13 AM (2 years ago)
Author:
chronos
Message:
  • Added: TVCard as TComponent descendant.
  • Modified: TContactsFile renamed to TVCardFile and moved into separate file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormFindDuplicity.pas

    r128 r129  
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    7   ExtCtrls, StdCtrls, ActnList, Menus, UContact, Generics.Collections,
     7  ExtCtrls, StdCtrls, ActnList, Menus, UVCard, Generics.Collections,
    88  Generics.Defaults;
    99
     
    6565
    6666uses
    67   UCore, UFormContacts;
     67  UCore, UFormContacts, UVCardFile;
    6868
    6969{ TFoundItems }
     
    191191    Form := TFormContacts.Create(nil);
    192192    Form.Contacts := TContacts.Create(False);
    193     Form.Contacts.ContactsFile := Contacts.ContactsFile;
     193    Form.Contacts.ParentVCard := Contacts.ParentVCard;
    194194    with TFoundItem(ListView1.Selected.Data) do
    195195      for I := 0 to Contacts.Count - 1 do
     
    202202          Form.Contacts.Remove(Contacts[I]);
    203203          Self.Contacts.Remove(Contacts[I]);
    204           Self.Contacts.ContactsFile.Modified := True;
     204          Self.Contacts.ParentVCard.Modified := True;
    205205        end;
    206206
     
    210210          Form.Contacts.Add(Form.Contacts[I]);
    211211          Self.Contacts.Add(Form.Contacts[I]);
    212           Self.Contacts.ContactsFile.Modified := True;
     212          Self.Contacts.ParentVCard.Modified := True;
    213213        end;
    214214    end;
     
    221221procedure TFormFindDuplicity.ButtonMergeClick(Sender: TObject);
    222222var
    223   TempContacts: TContactsFile;
    224   I: Integer;
    225 begin
    226   TempContacts := TContactsFile.Create;
     223  TempContacts: TVCardFile;
     224  I: Integer;
     225begin
     226  TempContacts := TVCardFile.Create;
    227227  try
    228228    for I := 0 to Contacts.Count - 1 do
    229       TempContacts.Contacts.Merge(Contacts[I], TContactField(ComboBoxField.Items.Objects[ComboBoxField.ItemIndex]).Index);
    230     Contacts.Assign(TempContacts.Contacts);
     229      TempContacts.VCard.Contacts.Merge(Contacts[I], TContactField(ComboBoxField.Items.Objects[ComboBoxField.ItemIndex]).Index);
     230    Contacts.Assign(TempContacts.VCard.Contacts);
    231231    Find;
    232232  finally
Note: See TracChangeset for help on using the changeset viewer.