Changeset 16 for trunk/UContact.pas
- Timestamp:
- Feb 28, 2018, 9:44:51 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UContact.pas
r15 r16 35 35 function AddNew(Name: string; Index: TContactFieldIndex; DataType: 36 36 TDataType): TContactField; 37 procedure LoadToStrings(AItems: TStrings); 37 38 end; 38 39 … … 88 89 ContactsFile: TContactsFile; 89 90 function Search(FullName: string): TContact; 91 function ToString: ansistring; override; 90 92 end; 91 93 … … 132 134 end; 133 135 136 function TContacts.ToString: ansistring; 137 var 138 I: Integer; 139 begin 140 Result := ''; 141 for I := 0 to Count - 1 do begin 142 if I > 0 then Result := Result + ', '; 143 Result := Result + TContact(Items[I]).FullName; 144 end; 145 end; 146 134 147 { TContactFields } 135 148 … … 142 155 Result.DataType := DataType; 143 156 Add(Result); 157 end; 158 159 procedure TContactFields.LoadToStrings(AItems: TStrings); 160 var 161 I: Integer; 162 begin 163 while AItems.Count < Count do AItems.Add(''); 164 while AItems.Count > Count do AItems.Delete(AItems.Count - 1); 165 for I := 0 to Count - 1 do 166 AItems[I] := TContactField(Items[I]).Name; 144 167 end; 145 168
Note:
See TracChangeset
for help on using the changeset viewer.