Changeset 61 for trunk/Forms


Ignore:
Timestamp:
Dec 9, 2021, 12:31:17 AM (3 years ago)
Author:
chronos
Message:
  • Fixed: Build with older FPC version.
  • Added: Show also normal phone and work phone in the contact list.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContacts.lfm

    r53 r61  
    1414  object ListView1: TListView
    1515    Left = 0
    16     Height = 801
     16    Height = 810
    1717    Top = 0
    1818    Width = 1210
     
    3636      end   
    3737      item
    38         Caption = 'Cell phone'
     38        Caption = 'Phone'
     39        Width = 150
     40      end   
     41      item
     42        Caption = 'Mobile'
    3943        Width = 150
    4044      end   
    4145      item
    4246        Caption = 'Home phone'
    43         Width = 295
     47        Width = 150
     48      end   
     49      item
     50        Caption = 'Work phone'
     51        Width = 150
    4452      end>
    4553    MultiSelect = True
     
    5866    Left = 0
    5967    Height = 39
    60     Top = 833
     68    Top = 842
    6169    Width = 1210
    6270    Align = alBottom
     
    106114    Left = 0
    107115    Height = 32
    108     Top = 801
     116    Top = 810
    109117    Width = 1210
    110118    OnChange = ListViewFilter1Change
     
    113121  object StatusBar1: TStatusBar
    114122    Left = 0
    115     Height = 36
    116     Top = 872
     123    Height = 27
     124    Top = 881
    117125    Width = 1210
    118126    Panels = <   
  • trunk/Forms/UFormContacts.lrj

    r53 r61  
    55{"hash":36093573,"name":"tformcontacts.listview1.columns[2].caption","sourcebytes":[77,105,100,100,108,101,32,110,97,109,101],"value":"Middle name"},
    66{"hash":174397109,"name":"tformcontacts.listview1.columns[3].caption","sourcebytes":[76,97,115,116,32,78,97,109,101],"value":"Last Name"},
    7 {"hash":242387557,"name":"tformcontacts.listview1.columns[4].caption","sourcebytes":[67,101,108,108,32,112,104,111,110,101],"value":"Cell phone"},
    8 {"hash":124920949,"name":"tformcontacts.listview1.columns[5].caption","sourcebytes":[72,111,109,101,32,112,104,111,110,101],"value":"Home phone"},
     7{"hash":5699141,"name":"tformcontacts.listview1.columns[4].caption","sourcebytes":[80,104,111,110,101],"value":"Phone"},
     8{"hash":88444965,"name":"tformcontacts.listview1.columns[5].caption","sourcebytes":[77,111,98,105,108,101],"value":"Mobile"},
     9{"hash":124920949,"name":"tformcontacts.listview1.columns[6].caption","sourcebytes":[72,111,109,101,32,112,104,111,110,101],"value":"Home phone"},
     10{"hash":225645765,"name":"tformcontacts.listview1.columns[7].caption","sourcebytes":[87,111,114,107,32,112,104,111,110,101],"value":"Work phone"},
    911{"hash":18340,"name":"tformcontacts.aadd.caption","sourcebytes":[65,100,100],"value":"Add"},
    1012{"hash":88453081,"name":"tformcontacts.amodify.caption","sourcebytes":[77,111,100,105,102,121],"value":"Modify"},
  • trunk/Forms/UFormContacts.pas

    r53 r61  
    120120    AddItem(Fields[cfMiddleName]);
    121121    AddItem(Fields[cfLastName]);
     122    AddItem(Fields[cfTel]);
    122123    AddItem(Fields[cfTelCell]);
    123124    AddItem(Fields[cfTelHome]);
     125    AddItem(Fields[cfTelWork]);
    124126    Item.Data := ListViewSort1.List[Item.Index];
    125127  end;
     
    158160      2: Result := CompareString(TContact(Item1).Fields[cfMiddleName], TContact(Item2).Fields[cfMiddleName]);
    159161      3: Result := CompareString(TContact(Item1).Fields[cfLastName], TContact(Item2).Fields[cfLastName]);
    160       4: Result := CompareString(TContact(Item1).Fields[cfTelCell], TContact(Item2).Fields[cfTelCell]);
    161       5: Result := CompareString(TContact(Item1).Fields[cfTelHome], TContact(Item2).Fields[cfTelHome]);
     162      4: Result := CompareString(TContact(Item1).Fields[cfTel], TContact(Item2).Fields[cfTel]);
     163      5: Result := CompareString(TContact(Item1).Fields[cfTelCell], TContact(Item2).Fields[cfTelCell]);
     164      6: Result := CompareString(TContact(Item1).Fields[cfTelHome], TContact(Item2).Fields[cfTelHome]);
     165      7: Result := CompareString(TContact(Item1).Fields[cfTelWork], TContact(Item2).Fields[cfTelWork]);
    162166    end;
    163167    if ListViewSort1.Order = soDown then Result := -Result;
     
    196200             UTF8LowerCase(TContact(List.Items[I]).Fields[cfLastName])) > 0 then Inc(FoundCount);
    197201           if Pos(UTF8LowerCase(StringGrid.Cells[4, 0]),
     202             UTF8LowerCase(TContact(List.Items[I]).Fields[cfTel])) > 0 then Inc(FoundCount);
     203           if Pos(UTF8LowerCase(StringGrid.Cells[5, 0]),
    198204             UTF8LowerCase(TContact(List.Items[I]).Fields[cfTelCell])) > 0 then Inc(FoundCount);
    199            if Pos(UTF8LowerCase(StringGrid.Cells[5, 0]),
     205           if Pos(UTF8LowerCase(StringGrid.Cells[6, 0]),
    200206             UTF8LowerCase(TContact(List.Items[I]).Fields[cfTelHome])) > 0 then Inc(FoundCount);
     207           if Pos(UTF8LowerCase(StringGrid.Cells[7, 0]),
     208             UTF8LowerCase(TContact(List.Items[I]).Fields[cfTelWork])) > 0 then Inc(FoundCount);
    201209           if FoundCount <> EnteredCount then List.Delete(I);
    202210         end;
Note: See TracChangeset for help on using the changeset viewer.