Changeset 76 for trunk/UContact.pas


Ignore:
Timestamp:
Dec 15, 2021, 8:56:06 PM (3 years ago)
Author:
chronos
Message:
  • Added: Find dialog to search text value by given contact field or by any field.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UContact.pas

    r74 r76  
    1515  TDataType = (dtNone, dtString, dtInteger, dtDate, dtDateTime, dtImage, dtStringList);
    1616
    17   TContactFieldIndex = (cfFirstName, cfMiddleName, cfLastName, cfTitleBefore,
     17  TContactFieldIndex = (cfNone, cfFirstName, cfMiddleName, cfLastName, cfTitleBefore,
    1818    cfTitleAfter, cfFullName,
    1919    cfTel, cfTelCell, cfTelFax, cfTelPager, cfTelHome2, cfTelVoip, cfTelMain,
     
    3333    cfTwitter, cfFacebook, cfInstagram, cfSnapchat, cfMatrix, cfYoutube,
    3434    cfPeerTube, cfLinkedIn, cfMastodon, cfMySpace, cfReddit);
     35
     36  TContactFieldIndexes = TFPGList<TContactFieldIndex>;
     37
     38  TContactFilterItem = class
     39    FieldIndex: TContactFieldIndex;
     40    Value: string;
     41  end;
     42
     43  { TContactFilterItems }
     44
     45  TContactFilterItems = class(TFPGObjectList<TContactFilterItem>)
     46    function AddNew(FieldIndex: TContactFieldIndex; Value: string): TContactFilterItem;
     47  end;
    3548
    3649  TContactFields = class;
     
    348361  end;
    349362  SetLength(Result, O - 1);
     363end;
     364
     365{ TContactFilterItems }
     366
     367function TContactFilterItems.AddNew(FieldIndex: TContactFieldIndex;
     368  Value: string): TContactFilterItem;
     369begin
     370  Result := TContactFilterItem.Create;
     371  Result.FieldIndex := FieldIndex;
     372  Result.Value := Value;
     373  Add(Result);
    350374end;
    351375
Note: See TracChangeset for help on using the changeset viewer.