Changeset 129 for trunk/Forms/UFormFindDuplicity.pas
- Timestamp:
- Apr 9, 2022, 11:52:13 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormFindDuplicity.pas
r128 r129 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 ExtCtrls, StdCtrls, ActnList, Menus, U Contact, Generics.Collections,7 ExtCtrls, StdCtrls, ActnList, Menus, UVCard, Generics.Collections, 8 8 Generics.Defaults; 9 9 … … 65 65 66 66 uses 67 UCore, UFormContacts ;67 UCore, UFormContacts, UVCardFile; 68 68 69 69 { TFoundItems } … … 191 191 Form := TFormContacts.Create(nil); 192 192 Form.Contacts := TContacts.Create(False); 193 Form.Contacts. ContactsFile := Contacts.ContactsFile;193 Form.Contacts.ParentVCard := Contacts.ParentVCard; 194 194 with TFoundItem(ListView1.Selected.Data) do 195 195 for I := 0 to Contacts.Count - 1 do … … 202 202 Form.Contacts.Remove(Contacts[I]); 203 203 Self.Contacts.Remove(Contacts[I]); 204 Self.Contacts. ContactsFile.Modified := True;204 Self.Contacts.ParentVCard.Modified := True; 205 205 end; 206 206 … … 210 210 Form.Contacts.Add(Form.Contacts[I]); 211 211 Self.Contacts.Add(Form.Contacts[I]); 212 Self.Contacts. ContactsFile.Modified := True;212 Self.Contacts.ParentVCard.Modified := True; 213 213 end; 214 214 end; … … 221 221 procedure TFormFindDuplicity.ButtonMergeClick(Sender: TObject); 222 222 var 223 TempContacts: T ContactsFile;224 I: Integer; 225 begin 226 TempContacts := T ContactsFile.Create;223 TempContacts: TVCardFile; 224 I: Integer; 225 begin 226 TempContacts := TVCardFile.Create; 227 227 try 228 228 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); 231 231 Find; 232 232 finally
Note:
See TracChangeset
for help on using the changeset viewer.