Changeset 129 for trunk/Forms
- Timestamp:
- Apr 9, 2022, 11:52:13 AM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormCompare.pas
r127 r129 5 5 uses 6 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, 7 U Contact, Diff, LCLType, LCLIntf, ComCtrls, Buttons, Menus, ActnList, SynEdit,7 UVCard, Diff, LCLType, LCLIntf, ComCtrls, Buttons, Menus, ActnList, SynEdit, 8 8 SynEditMiscClasses, SynHighlighterPosition, SynEditHighlighter, UCommon, 9 9 USynEditEx; … … 83 83 84 84 uses 85 UCore ;85 UCore, UVCardFile; 86 86 87 87 { TFormCompare } … … 334 334 Ext := ExtractFileExt(AFileName); 335 335 if Ext = VCardFileExt then begin 336 with T ContactsFile.Create do336 with TVCardFile.Create do 337 337 try 338 338 LoadFromFile(AFileName); 339 Result := AsString;339 Result := VCard.AsString; 340 340 finally 341 341 Free; -
trunk/Forms/UFormContact.pas
r127 r129 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 7 ComCtrls, ActnList, Menus, ExtCtrls, ExtDlgs, Buttons, U Contact, LCLIntf,7 ComCtrls, ActnList, Menus, ExtCtrls, ExtDlgs, Buttons, UVCard, LCLIntf, 8 8 UFormProperties, DateUtils, {$IFDEF LCLGTK2}Gtk2Globals, {$ENDIF}UContactImage, 9 9 ubarcodes; -
trunk/Forms/UFormContacts.pas
r128 r129 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, U Contact, UListViewSort, LazUTF8, Clipbrd,7 Menus, ActnList, UVCard, UListViewSort, LazUTF8, Clipbrd, 8 8 Generics.Collections; 9 9 … … 102 102 103 103 uses 104 UFormContact, UCore ;104 UFormContact, UCore, UVCardFile; 105 105 106 106 resourcestring … … 304 304 ListView1.Columns.Delete(ListView1.Columns.Count - 1); 305 305 for I := 0 to ListView1.Columns.Count - 1 do begin 306 if Assigned(Contacts) and Assigned(Contacts. ContactsFile) then begin306 if Assigned(Contacts) and Assigned(Contacts.ParentVCard) then begin 307 307 Field := TContact.GetFields.GetByIndex(ListViewColumns[I]); 308 308 if Assigned(Field) then … … 334 334 Contact := TContact.Create; 335 335 try 336 Contact. ContactsFile := Contacts.ContactsFile;336 Contact.ParentVCard := Contacts.ParentVCard; 337 337 FormContact.Contact := Contact; 338 338 FormContact.OnGetPrevious := GetPreviousContact; … … 364 364 Contact := TContact.Create; 365 365 try 366 Contact. ContactsFile := Contacts.ContactsFile;366 Contact.ParentVCard := Contacts.ParentVCard; 367 367 Contact.Assign(TContact(ListView1.Selected.Data)); 368 368 FormContact.Contact := Contact; … … 436 436 procedure TFormContacts.ALoadFromFileExecute(Sender: TObject); 437 437 var 438 TempFile: T ContactsFile;438 TempFile: TVCardFile; 439 439 begin 440 440 if Assigned(ListView1.Selected) then begin 441 TempFile := T ContactsFile.Create;441 TempFile := TVCardFile.Create; 442 442 try 443 443 OpenDialog1.Filter := TempFile.GetFileFilter; … … 465 465 Contact := TContact.Create; 466 466 try 467 Contact. ContactsFile := Contacts.ContactsFile;467 Contact.ParentVCard := Contacts.ParentVCard; 468 468 Contact.Assign(TContact(ListView1.Selected.Data)); 469 469 FormContact.Contact := Contact; … … 486 486 procedure TFormContacts.APasteExecute(Sender: TObject); 487 487 var 488 PasteContacts: T ContactsFile;488 PasteContacts: TVCardFile; 489 489 Lines: TStringList; 490 490 begin 491 PasteContacts := T ContactsFile.Create;491 PasteContacts := TVCardFile.Create; 492 492 Lines := TStringList.Create; 493 493 try 494 494 Lines.Text := Clipboard.AsText; 495 PasteContacts. LoadFromStrings(Lines);496 if PasteContacts. Contacts.Count > 0 then begin495 PasteContacts.VCard.LoadFromStrings(Lines); 496 if PasteContacts.VCard.Contacts.Count > 0 then begin 497 497 if Assigned(ListView1.Selected) then begin 498 498 Contacts.InsertContacts(Contacts.IndexOf(ListView1.Selected.Data), 499 PasteContacts. Contacts);500 end else Contacts.AddContacts(PasteContacts. Contacts);499 PasteContacts.VCard.Contacts); 500 end else Contacts.AddContacts(PasteContacts.VCard.Contacts); 501 501 Core.DataFile.Modified := True; 502 502 ReloadList; … … 528 528 procedure TFormContacts.ASaveToFileExecute(Sender: TObject); 529 529 var 530 TempFile: T ContactsFile;530 TempFile: TVCardFile; 531 531 begin 532 532 if Assigned(ListView1.Selected) then begin 533 TempFile := T ContactsFile.Create;533 TempFile := TVCardFile.Create; 534 534 try 535 535 SaveDialog1.Filter := TempFile.GetFileFilter; -
trunk/Forms/UFormFind.pas
r128 r129 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 ExtCtrls, StdCtrls, ActnList, Menus, U Contact, UFormContacts;7 ExtCtrls, StdCtrls, ActnList, Menus, UVCard, UFormContacts; 8 8 9 9 type -
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 -
trunk/Forms/UFormGenerate.pas
r127 r129 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 7 Spin, U Contact;7 Spin, UVCard; 8 8 9 9 type -
trunk/Forms/UFormMain.pas
r127 r129 76 76 77 77 uses 78 UCore, UFormContacts, U Contact;78 UCore, UFormContacts, UVCard, UVCardFile; 79 79 80 80 resourcestring … … 121 121 CoolBar1.AutosizeBands; 122 122 123 FormContacts.Contacts := T ContactsFile(Core.DataFile).Contacts;123 FormContacts.Contacts := TVCardFile(Core.DataFile).VCard.Contacts; 124 124 FormContacts.ManualDock(Self, nil, alClient); 125 125 FormContacts.Align := alClient; -
trunk/Forms/UFormProperties.pas
r128 r129 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, U Contact, UDataFile, UListViewSort, LazUTF8,7 Menus, ActnList, UVCard, UDataFile, UListViewSort, LazUTF8, 8 8 Generics.Collections; 9 9 -
trunk/Forms/UFormProperty.pas
r127 r129 4 4 5 5 uses 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, U Contact;6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, UVCard; 7 7 8 8 type -
trunk/Forms/UFormSource.pas
r127 r129 51 51 52 52 uses 53 UCore, UTheme, U Contact;53 UCore, UTheme, UVCard; 54 54 55 55 { TFormSource } -
trunk/Forms/UFormTest.pas
r128 r129 49 49 50 50 uses 51 UCore, UFormTestCase, U Contact;51 UCore, UFormTestCase, UVCard; 52 52 53 53 { TFormTest }
Note:
See TracChangeset
for help on using the changeset viewer.