Changeset 29 for trunk/Forms
- Timestamp:
- Nov 24, 2021, 7:34:57 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 6 6 *.res 7 7 vCardStudio.exe 8 vCardStudio.dbg
-
- Property svn:ignore
-
trunk/Forms/UFormContact.pas
r23 r29 87 87 var 88 88 FormContact: TFormContact; 89 89 90 90 91 implementation -
trunk/Forms/UFormContacts.pas
r23 r29 43 43 FContacts: TContacts; 44 44 procedure SetContacts(AValue: TContacts); 45 46 45 public 47 46 property Contacts: TContacts read FContacts write SetContacts; -
trunk/Forms/UFormFindDuplicity.pas
r23 r29 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ExtCtrls, StdCtrls, ActnList, Menus, Contnrs, UContact;9 ExtCtrls, StdCtrls, ActnList, Menus, fgl, UContact; 10 10 11 11 type … … 22 22 { TFoundItems } 23 23 24 TFoundItems = class(T ObjectList)24 TFoundItems = class(TFPGObjectList<TFoundItem>) 25 25 function SearchByField(Field: string): TFoundItem; 26 26 end; … … 47 47 FContacts: TContacts; 48 48 procedure SetContacts(AValue: TContacts); 49 50 49 public 51 50 FoundItems: TFoundItems; … … 59 58 FormFindDuplicity: TFormFindDuplicity; 60 59 60 61 61 implementation 62 62 … … 89 89 destructor TFoundItem.Destroy; 90 90 begin 91 Contacts.Free;92 inherited Destroy;91 FreeAndNil(Contacts); 92 inherited; 93 93 end; 94 94 … … 118 118 end; 119 119 120 function FoundItemsSort( Item1, Item2: Pointer): Integer;121 begin 122 if TFoundItem(Item1).Contacts.Count < TFoundItem(Item2).Contacts.Count then Result := 1123 else if TFoundItem(Item1).Contacts.Count > TFoundItem(Item2).Contacts.Count then Result := -1120 function FoundItemsSort(const Item1, Item2: TFoundItem): Integer; 121 begin 122 if Item1.Contacts.Count < Item2.Contacts.Count then Result := 1 123 else if Item1.Contacts.Count > Item2.Contacts.Count then Result := -1 124 124 else Result := 0; 125 125 end; … … 206 206 procedure TFormFindDuplicity.FormDestroy(Sender: TObject); 207 207 begin 208 F oundItems.Free;208 FreeAndNil(FoundItems); 209 209 end; 210 210 -
trunk/Forms/UFormGenerate.pas
r23 r29 21 21 procedure FormCreate(Sender: TObject); 22 22 procedure FormShow(Sender: TObject); 23 private24 25 23 public 26 24 Contacts: TContacts; … … 30 28 var 31 29 FormGenerate: TFormGenerate; 30 32 31 33 32 implementation
Note:
See TracChangeset
for help on using the changeset viewer.