- Timestamp:
- Feb 28, 2018, 1:43:45 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormFindDuplicity.lfm
r16 r18 34 34 end> 35 35 OwnerData = True 36 PopupMenu = PopupMenu1 36 37 ReadOnly = True 37 38 RowSelect = True … … 39 40 ViewStyle = vsReport 40 41 OnData = ListView1Data 42 OnDblClick = AShowContactsExecute 41 43 end 42 44 object Panel1: TPanel … … 69 71 end 70 72 end 73 object ActionList1: TActionList 74 left = 218 75 top = 128 76 object AShowContacts: TAction 77 Caption = 'Show contacts' 78 OnExecute = AShowContactsExecute 79 end 80 end 81 object PopupMenu1: TPopupMenu 82 left = 75 83 top = 124 84 object MenuItem1: TMenuItem 85 Action = AShowContacts 86 end 87 end 71 88 end -
trunk/Forms/UFormFindDuplicity.pas
r16 r18 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ExtCtrls, StdCtrls, Contnrs, UContact;9 ExtCtrls, StdCtrls, ActnList, Menus, Contnrs, UContact; 10 10 11 11 type … … 29 29 30 30 TFormFindDuplicity = class(TForm) 31 AShowContacts: TAction; 32 ActionList1: TActionList; 31 33 ComboBoxField: TComboBox; 32 34 Label1: TLabel; 33 35 ListView1: TListView; 36 MenuItem1: TMenuItem; 34 37 Panel1: TPanel; 38 PopupMenu1: TPopupMenu; 39 procedure AShowContactsExecute(Sender: TObject); 35 40 procedure ComboBoxFieldChange(Sender: TObject); 36 41 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); … … 59 64 60 65 uses 61 UCore ;66 UCore, UFormContacts; 62 67 63 68 { TFoundItems } … … 95 100 with TFoundItem(FoundItems[Item.Index]) do begin 96 101 Item.Caption := Field; 102 Item.Data := FoundItems[Item.Index]; 97 103 Item.SubItems.Add(Contacts.ToString); 98 104 Item.SubItems.Add(IntToStr(Contacts.Count)); … … 156 162 end; 157 163 164 procedure TFormFindDuplicity.AShowContactsExecute(Sender: TObject); 165 var 166 Form: TFormContacts; 167 I: Integer; 168 begin 169 if Assigned(ListView1.Selected) then begin 170 Form := TFormContacts.Create(nil); 171 Form.Contacts := TContacts.Create(False); 172 Form.Contacts.ContactsFile := Contacts.ContactsFile; 173 with TFoundItem(ListView1.Selected.Data) do 174 for I := 0 to Contacts.Count - 1 do 175 Form.Contacts.Add(Contacts[I]); 176 Form.ShowModal; 177 with TFoundItem(ListView1.Selected.Data) do begin 178 // Remove all deleted 179 for I := 0 to Contacts.Count - 1 do 180 if Form.Contacts.IndexOf(Contacts[I]) = -1 then begin 181 Form.Contacts.Remove(Contacts[I]); 182 Self.Contacts.Remove(Contacts[I]); 183 Self.Contacts.ContactsFile.Modified := True; 184 end; 185 186 // Add newly added 187 for I := 0 to Form.Contacts.Count - 1 do 188 if Contacts.IndexOf(Form.Contacts[I]) = -1 then begin 189 Form.Contacts.Add(Form.Contacts[I]); 190 Self.Contacts.Add(Form.Contacts[I]); 191 Self.Contacts.ContactsFile.Modified := True; 192 end; 193 end; 194 Form.Contacts.Free; 195 Form.Free; 196 Find; 197 end; 198 end; 199 158 200 procedure TFormFindDuplicity.FormClose(Sender: TObject; 159 201 var CloseAction: TCloseAction); -
trunk/Forms/UFormGenerate.pas
r17 r18 49 49 Contact.FirstName := 'First ' + IntToStr(Random(10000)); 50 50 Contact.LastName := 'Last ' + IntToStr(Random(10000)); 51 Contact.FullName := Contact.FirstName + ' ' + Contact.LastName;51 Contact.FullName := 'FullName ' + IntToStr(Random(100)); 52 52 Contact.TelCell := IntToStr(Random(1000000000)); 53 53 Contact.TelHome := IntToStr(Random(1000000000)); -
trunk/Languages/vCardStudio.cs.po
r17 r18 58 58 msgctxt "tcore.agenerate.caption" 59 59 msgid "Generate contacts" 60 msgstr " "60 msgstr "Generovat kontakty" 61 61 62 62 #: tcore.ahomepage.caption … … 262 262 #: tformcontacts.listview1.columns[4].caption 263 263 msgid "Cell phone" 264 msgstr " "264 msgstr "Mobilní telefon" 265 265 266 266 #: tformcontacts.listview1.columns[5].caption 267 267 msgid "Home phone" 268 msgstr "" 268 msgstr "Domácí telefon" 269 270 #: tformfindduplicity.ashowcontacts.caption 271 msgid "Show contacts" 272 msgstr "Ukázat kontakty" 269 273 270 274 #: tformfindduplicity.caption … … 292 296 #: tformgenerate.buttongenerate.caption 293 297 msgid "Generate" 294 msgstr " "298 msgstr "Generovat" 295 299 296 300 #: tformgenerate.caption 297 301 msgctxt "tformgenerate.caption" 298 302 msgid "Generate contacts" 299 msgstr " "303 msgstr "Generovat kontakty" 300 304 301 305 #: tformgenerate.label1.caption 302 #, fuzzy303 306 msgctxt "tformgenerate.label1.caption" 304 307 msgid "Count:" … … 450 453 msgid "vCard file" 451 454 msgstr "Soubor vCard" 452 -
trunk/Languages/vCardStudio.po
r17 r18 258 258 msgstr "" 259 259 260 #: tformfindduplicity.ashowcontacts.caption 261 msgid "Show contacts" 262 msgstr "" 263 260 264 #: tformfindduplicity.caption 261 265 msgctxt "tformfindduplicity.caption" -
trunk/UCore.pas
r17 r18 181 181 Contacts := TContactsFile(DataFile).Contacts; 182 182 ShowModal; 183 FormContacts.ReloadList; 184 FormMain.UpdateInterface; 183 185 Free; 184 186 end;
Note:
See TracChangeset
for help on using the changeset viewer.