Changeset 73 for trunk/Forms
- Timestamp:
- Dec 13, 2021, 11:33:11 PM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContact.lfm
r71 r73 429 429 Anchors = [akTop, akLeft, akRight] 430 430 Caption = 'Address' 431 ClientHeight = 21 5432 ClientWidth = 9 20431 ClientHeight = 212 432 ClientWidth = 918 433 433 TabOrder = 6 434 434 object Label36: TLabel … … 573 573 object TabSheetWork: TTabSheet 574 574 Caption = 'Work' 575 ClientHeight = 6 28576 ClientWidth = 9 59575 ClientHeight = 630 576 ClientWidth = 961 577 577 OnHide = TabSheetWorkHide 578 578 OnShow = TabSheetWorkShow 579 579 object EditOrganization: TEdit 580 580 Left = 173 581 Height = 42581 Height = 33 582 582 Top = 64 583 583 Width = 254 … … 587 587 object LabelOrganization: TLabel 588 588 Left = 10 589 Height = 2 4589 Height = 25 590 590 Top = 70 591 Width = 1 14591 Width = 106 592 592 Caption = 'Organization:' 593 593 ParentColor = False … … 596 596 object LabelOrganization1: TLabel 597 597 Left = 451 598 Height = 2 4598 Height = 25 599 599 Top = 24 600 Width = 106600 Width = 99 601 601 Caption = 'Department:' 602 602 ParentColor = False … … 605 605 object EditDepartment: TEdit 606 606 Left = 608 607 Height = 42607 Height = 33 608 608 Top = 20 609 609 Width = 254 … … 613 613 object Label18: TLabel 614 614 Left = 10 615 Height = 2 4615 Height = 25 616 616 Top = 20 617 Width = 41617 Width = 36 618 618 Caption = 'Title:' 619 619 ParentColor = False … … 622 622 object EditTitle: TEdit 623 623 Left = 173 624 Height = 42624 Height = 33 625 625 Top = 16 626 626 Width = 254 … … 630 630 object EditWorkWeb: TEdit 631 631 Left = 173 632 Height = 42632 Height = 33 633 633 Top = 256 634 634 Width = 683 … … 638 638 object Label32: TLabel 639 639 Left = 10 640 Height = 2 4640 Height = 25 641 641 Top = 264 642 Width = 1 14642 Width = 107 643 643 Caption = 'Web address:' 644 644 ParentColor = False … … 651 651 Width = 911 652 652 Caption = 'Address' 653 ClientHeight = 2 20654 ClientWidth = 90 9653 ClientHeight = 217 654 ClientWidth = 907 655 655 TabOrder = 4 656 656 object Label31: TLabel 657 657 Left = 10 658 Height = 2 4658 Height = 25 659 659 Top = 160 660 Width = 71660 Width = 67 661 661 Caption = 'Country:' 662 662 ParentColor = False … … 665 665 object EditAddressWorkCountry: TEdit 666 666 Left = 173 667 Height = 42667 Height = 33 668 668 Top = 160 669 669 Width = 254 … … 673 673 object EditAddressWorkRegion: TEdit 674 674 Left = 173 675 Height = 42675 Height = 33 676 676 Top = 112 677 677 Width = 254 … … 681 681 object Label30: TLabel 682 682 Left = 10 683 Height = 2 4683 Height = 25 684 684 Top = 112 685 Width = 64685 Width = 59 686 686 Caption = 'Region:' 687 687 ParentColor = False … … 690 690 object Label35: TLabel 691 691 Left = 10 692 Height = 2 4692 Height = 25 693 693 Top = 66 694 Width = 1 37694 Width = 126 695 695 Caption = 'Extended street:' 696 696 ParentColor = False … … 699 699 object EditAddressWorkStreetExtended: TEdit 700 700 Left = 173 701 Height = 42701 Height = 33 702 702 Top = 64 703 703 Width = 254 … … 707 707 object Label28: TLabel 708 708 Left = 10 709 Height = 2 4709 Height = 25 710 710 Top = 18 711 Width = 54711 Width = 49 712 712 Caption = 'Street:' 713 713 ParentColor = False … … 716 716 object EditAddressWorkStreet: TEdit 717 717 Left = 173 718 Height = 42718 Height = 33 719 719 Top = 8 720 720 Width = 254 … … 724 724 object Label34: TLabel 725 725 Left = 451 726 Height = 2 4726 Height = 25 727 727 Top = 18 728 Width = 1 31728 Width = 122 729 729 Caption = 'Post office box:' 730 730 ParentColor = False … … 733 733 object EditAddressWorkPostOfficeBox: TEdit 734 734 Left = 608 735 Height = 42735 Height = 33 736 736 Top = 8 737 737 Width = 254 … … 741 741 object EditAddressWorkCity: TEdit 742 742 Left = 608 743 Height = 42743 Height = 33 744 744 Top = 56 745 745 Width = 254 … … 749 749 object Label29: TLabel 750 750 Left = 451 751 Height = 2 4751 Height = 25 752 752 Top = 64 753 Width = 3 6753 Width = 34 754 754 Caption = 'City:' 755 755 ParentColor = False … … 758 758 object EditAddressWorkPostalCode: TEdit 759 759 Left = 608 760 Height = 42760 Height = 33 761 761 Top = 142 762 762 Width = 254 … … 766 766 object Label33: TLabel 767 767 Left = 451 768 Height = 2 4768 Height = 25 769 769 Top = 150 770 Width = 103770 Width = 95 771 771 Caption = 'Postal code:' 772 772 ParentColor = False … … 776 776 object Label15: TLabel 777 777 Left = 10 778 Height = 2 4778 Height = 25 779 779 Top = 116 780 Width = 5 9780 Width = 54 781 781 Caption = 'Phone:' 782 782 ParentColor = False … … 785 785 object EditWorkPhone: TEdit 786 786 Left = 173 787 Height = 42787 Height = 33 788 788 Top = 112 789 789 Width = 254 … … 793 793 object Label16: TLabel 794 794 Left = 451 795 Height = 2 4795 Height = 25 796 796 Top = 112 797 Width = 34797 Width = 29 798 798 Caption = 'Fax:' 799 799 ParentColor = False … … 802 802 object EditWorkFax: TEdit 803 803 Left = 608 804 Height = 42804 Height = 33 805 805 Top = 112 806 806 Width = 254 … … 810 810 object EditWorkPager: TEdit 811 811 Left = 608 812 Height = 42812 Height = 33 813 813 Top = 156 814 814 Width = 254 … … 818 818 object Label17: TLabel 819 819 Left = 448 820 Height = 2 4820 Height = 25 821 821 Top = 160 822 Width = 54822 Width = 48 823 823 Caption = 'Pager:' 824 824 ParentColor = False … … 827 827 object EditWorkMobile: TEdit 828 828 Left = 173 829 Height = 42829 Height = 33 830 830 Top = 160 831 831 Width = 254 … … 835 835 object Label19: TLabel 836 836 Left = 10 837 Height = 2 4837 Height = 25 838 838 Top = 160 839 Width = 63839 Width = 59 840 840 Caption = 'Mobile:' 841 841 ParentColor = False … … 844 844 object Label8: TLabel 845 845 Left = 10 846 Height = 2 4846 Height = 25 847 847 Top = 210 848 Width = 5 8848 Width = 53 849 849 Caption = 'E-mail:' 850 850 ParentColor = False … … 853 853 object EditWorkEmail: TEdit 854 854 Left = 173 855 Height = 42855 Height = 33 856 856 Top = 210 857 857 Width = 254 -
trunk/Forms/UFormContacts.lfm
r72 r73 149 149 Action = ASelectAll 150 150 end 151 object MenuItem12: TMenuItem 152 Caption = '-' 153 end 154 object MenuItem9: TMenuItem 155 Action = ACut 156 end 157 object MenuItem10: TMenuItem 158 Action = ACopy 159 end 160 object MenuItem11: TMenuItem 161 Action = APaste 162 end 151 163 object MenuItem6: TMenuItem 152 164 Caption = '-' … … 201 213 OnExecute = ASaveToFileExecute 202 214 end 215 object ACopy: TAction 216 Caption = 'Copy' 217 ImageIndex = 11 218 OnExecute = ACopyExecute 219 ShortCut = 16451 220 end 221 object ACut: TAction 222 Caption = 'Cut' 223 ImageIndex = 12 224 OnExecute = ACutExecute 225 ShortCut = 16472 226 end 227 object APaste: TAction 228 Caption = 'Paste' 229 ImageIndex = 13 230 OnExecute = APasteExecute 231 ShortCut = 16470 232 end 203 233 end 204 234 object ListViewSort1: TListViewSort -
trunk/Forms/UFormContacts.lrj
r72 r73 15 15 {"hash":4863557,"name":"tformcontacts.aclone.caption","sourcebytes":[67,108,111,110,101],"value":"Clone"}, 16 16 {"hash":177113358,"name":"tformcontacts.aloadfromfile.caption","sourcebytes":[76,111,97,100,32,102,114,111,109,32,102,105,108,101,46,46,46],"value":"Load from file..."}, 17 {"hash":10127854,"name":"tformcontacts.asavetofile.caption","sourcebytes":[83,97,118,101,32,116,111,32,102,105,108,101,46,46,46],"value":"Save to file..."} 17 {"hash":10127854,"name":"tformcontacts.asavetofile.caption","sourcebytes":[83,97,118,101,32,116,111,32,102,105,108,101,46,46,46],"value":"Save to file..."}, 18 {"hash":304761,"name":"tformcontacts.acopy.caption","sourcebytes":[67,111,112,121],"value":"Copy"}, 19 {"hash":19140,"name":"tformcontacts.acut.caption","sourcebytes":[67,117,116],"value":"Cut"}, 20 {"hash":5671589,"name":"tformcontacts.apaste.caption","sourcebytes":[80,97,115,116,101],"value":"Paste"} 18 21 ]} -
trunk/Forms/UFormContacts.pas
r72 r73 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, Menus, ActnList, UContact, UListViewSort, fgl, LazUTF8 ;9 ComCtrls, Menus, ActnList, UContact, UListViewSort, fgl, LazUTF8, Clipbrd; 10 10 11 11 type … … 16 16 AAdd: TAction; 17 17 AClone: TAction; 18 ACopy: TAction; 19 ACut: TAction; 20 APaste: TAction; 18 21 ALoadFromFile: TAction; 19 22 ASaveToFile: TAction; … … 26 29 ListViewSort1: TListViewSort; 27 30 MenuItem1: TMenuItem; 31 MenuItem10: TMenuItem; 32 MenuItem11: TMenuItem; 33 MenuItem12: TMenuItem; 28 34 MenuItem2: TMenuItem; 29 35 MenuItem3: TMenuItem; … … 33 39 MenuItem7: TMenuItem; 34 40 MenuItem8: TMenuItem; 41 MenuItem9: TMenuItem; 35 42 OpenDialog1: TOpenDialog; 36 43 PopupMenuContact: TPopupMenu; … … 47 54 procedure AAddExecute(Sender: TObject); 48 55 procedure ACloneExecute(Sender: TObject); 56 procedure ACopyExecute(Sender: TObject); 57 procedure ACutExecute(Sender: TObject); 49 58 procedure ALoadFromFileExecute(Sender: TObject); 50 59 procedure AModifyExecute(Sender: TObject); 60 procedure APasteExecute(Sender: TObject); 51 61 procedure ARemoveExecute(Sender: TObject); 52 62 procedure ASaveToFileExecute(Sender: TObject); … … 334 344 end; 335 345 346 procedure TFormContacts.ACopyExecute(Sender: TObject); 347 var 348 Text: string; 349 Strings: TStringList; 350 I: Integer; 351 begin 352 Strings := TStringList.Create; 353 try 354 Text := ''; 355 for I := 0 to ListView1.Items.Count - 1 do 356 if ListView1.Items[I].Selected then begin 357 TContact(ListView1.Items[I].Data).SaveToStrings(Strings); 358 Text := Text + Strings.Text; 359 end; 360 Clipboard.AsText := Text; 361 finally 362 Strings.Free; 363 end; 364 end; 365 366 procedure TFormContacts.ACutExecute(Sender: TObject); 367 var 368 Text: string; 369 Strings: TStringList; 370 I: Integer; 371 begin 372 Strings := TStringList.Create; 373 try 374 Text := ''; 375 for I := 0 to ListView1.Items.Count - 1 do 376 if ListView1.Items[I].Selected then begin 377 TContact(ListView1.Items[I].Data).SaveToStrings(Strings); 378 Text := Text + Strings.Text; 379 end; 380 Clipboard.AsText := Text; 381 for I := 0 to ListView1.Items.Count - 1 do 382 if ListView1.Items[I].Selected then begin 383 Contacts.Delete(Contacts.IndexOf(ListView1.Items[I].Data)); 384 end; 385 ReloadList; 386 ListView1.ClearSelection; 387 UpdateInterface; 388 finally 389 Strings.Free; 390 end; 391 end; 392 336 393 procedure TFormContacts.ALoadFromFileExecute(Sender: TObject); 337 394 var … … 384 441 end; 385 442 443 procedure TFormContacts.APasteExecute(Sender: TObject); 444 var 445 PasteContacts: TContactsFile; 446 Lines: TStringList; 447 begin 448 PasteContacts := TContactsFile.Create; 449 Lines := TStringList.Create; 450 try 451 Lines.Text := Clipboard.AsText; 452 PasteContacts.LoadFromStrings(Lines); 453 if PasteContacts.Contacts.Count > 0 then begin 454 if Assigned(ListView1.Selected) then begin 455 Contacts.InsertContacts(Contacts.IndexOf(ListView1.Selected.Data), 456 PasteContacts.Contacts); 457 end else Contacts.AddContacts(PasteContacts.Contacts); 458 Core.DataFile.Modified := True; 459 ReloadList; 460 UpdateInterface; 461 end; 462 finally 463 Lines.Free; 464 PasteContacts.Free; 465 end; 466 end; 467 386 468 procedure TFormContacts.ARemoveExecute(Sender: TObject); 387 469 var … … 393 475 for I := ListView1.Items.Count - 1 downto 0 do 394 476 if ListView1.Items[I].Selected then begin 395 Contacts.Delete( I);477 Contacts.Delete(Contacts.IndexOf(ListView1.Items[I].Data)); 396 478 end; 397 479 Core.DataFile.Modified := True; -
trunk/Forms/UFormFindDuplicity.lfm
r23 r73 1 1 object FormFindDuplicity: TFormFindDuplicity 2 2 Left = 455 3 Height = 4814 Top = 3 975 Width = 7013 Height = 523 4 Top = 355 5 Width = 807 6 6 Caption = 'Find duplicities' 7 ClientHeight = 4818 ClientWidth = 7017 ClientHeight = 523 8 ClientWidth = 807 9 9 DesignTimePPI = 144 10 10 OnClose = FormClose … … 15 15 object ListView1: TListView 16 16 Left = 5 17 Height = 4 1317 Height = 455 18 18 Top = 63 19 Width = 69119 Width = 797 20 20 Align = alClient 21 21 BorderSpacing.Around = 5 … … 47 47 Height = 58 48 48 Top = 0 49 Width = 70149 Width = 807 50 50 Align = alTop 51 51 BevelOuter = bvNone 52 52 ClientHeight = 58 53 ClientWidth = 70153 ClientWidth = 807 54 54 ParentFont = False 55 55 TabOrder = 1 56 56 object ComboBoxField: TComboBox 57 Left = 1 7358 Height = 4159 Top = 1 457 Left = 160 58 Height = 33 59 Top = 16 60 60 Width = 326 61 ItemHeight = 061 ItemHeight = 25 62 62 OnChange = ComboBoxFieldChange 63 63 ParentFont = False … … 67 67 object Label1: TLabel 68 68 Left = 13 69 Height = 2 469 Height = 25 70 70 Top = 19 71 Width = 1 1172 Caption = ' Contact field:'71 Width = 125 72 Caption = 'By contact field:' 73 73 ParentColor = False 74 74 ParentFont = False 75 end 76 object ButtonMerge: TButton 77 Left = 496 78 Height = 38 79 Top = 14 80 Width = 113 81 Caption = 'Merge' 82 OnClick = ButtonMergeClick 83 TabOrder = 1 75 84 end 76 85 end -
trunk/Forms/UFormFindDuplicity.lrj
r21 r73 4 4 {"hash":106593811,"name":"tformfindduplicity.listview1.columns[1].caption","sourcebytes":[67,111,110,116,97,99,116,115],"value":"Contacts"}, 5 5 {"hash":4877396,"name":"tformfindduplicity.listview1.columns[2].caption","sourcebytes":[67,111,117,110,116],"value":"Count"}, 6 {"hash":9821370,"name":"tformfindduplicity.label1.caption","sourcebytes":[67,111,110,116,97,99,116,32,102,105,101,108,100,58],"value":"Contact field:"}, 6 {"hash":14454458,"name":"tformfindduplicity.label1.caption","sourcebytes":[66,121,32,99,111,110,116,97,99,116,32,102,105,101,108,100,58],"value":"By contact field:"}, 7 {"hash":5490901,"name":"tformfindduplicity.buttonmerge.caption","sourcebytes":[77,101,114,103,101],"value":"Merge"}, 7 8 {"hash":229436515,"name":"tformfindduplicity.ashowcontacts.caption","sourcebytes":[83,104,111,119,32,99,111,110,116,97,99,116,115],"value":"Show contacts"} 8 9 ]} -
trunk/Forms/UFormFindDuplicity.pas
r68 r73 31 31 AShowContacts: TAction; 32 32 ActionList1: TActionList; 33 ButtonMerge: TButton; 33 34 ComboBoxField: TComboBox; 34 35 Label1: TLabel; … … 38 39 PopupMenu1: TPopupMenu; 39 40 procedure AShowContactsExecute(Sender: TObject); 41 procedure ButtonMergeClick(Sender: TObject); 40 42 procedure ComboBoxFieldChange(Sender: TObject); 41 43 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); … … 109 111 var 110 112 ContactField: TContactField; 113 Items: TStringList; 114 I: Integer; 111 115 begin 112 116 if FContacts = AValue then Exit; 113 117 FContacts := AValue; 114 118 if Assigned(FContacts) then begin 115 Contacts.ContactsFile.Fields.LoadToStrings(ComboBoxField.Items); 119 Items := TStringList.Create; 120 try 121 Contacts.ContactsFile.Fields.LoadToStrings(Items); 122 123 // Remove fields which are not used in contacts 124 for I := Items.Count - 1 downto 0 do 125 if Contacts.CountByField(TContactField(Items.Objects[I]).Index) = 0 then 126 Items.Delete(I); 127 128 ComboBoxField.Items.Assign(Items); 129 finally 130 Items.Free; 131 end; 116 132 ContactField := Contacts.ContactsFile.Fields.GetByIndex(ContactFieldIndex); 117 133 ComboBoxField.ItemIndex := ComboBoxField.Items.IndexOfObject(ContactField); … … 156 172 Core.Translator.TranslateComponentRecursive(Self); 157 173 Core.ThemeManager1.UseTheme(Self); 158 ContactFieldIndex := cf TelCell;174 ContactFieldIndex := cfFullName; 159 175 end; 160 176 … … 203 219 end; 204 220 221 procedure TFormFindDuplicity.ButtonMergeClick(Sender: TObject); 222 var 223 TempContacts: TContactsFile; 224 I: Integer; 225 begin 226 TempContacts := TContactsFile.Create; 227 try 228 for I := 0 to Contacts.Count - 1 do 229 TempContacts.Contacts.Merge(Contacts[I], TContactField(ComboBoxField.Items.Objects[ComboBoxField.ItemIndex]).Index); 230 Contacts.Assign(TempContacts.Contacts); 231 Find; 232 finally 233 TempContacts.Free; 234 end; 235 end; 236 205 237 procedure TFormFindDuplicity.FormClose(Sender: TObject; 206 238 var CloseAction: TCloseAction); -
trunk/Forms/UFormMain.lfm
r62 r73 136 136 end 137 137 object MenuItem3: TMenuItem 138 Action = Core.AFile Merge138 Action = Core.AFileCombine 139 139 end 140 140 object MenuItem6: TMenuItem -
trunk/Forms/UFormProperties.pas
r72 r73 314 314 for I := ListView1.Items.Count - 1 downto 0 do 315 315 if ListView1.Items[I].Selected then begin 316 Properties.Delete( I);316 Properties.Delete(Properties.IndexOf(ListView1.Items[I].Data)); 317 317 end; 318 318 Core.DataFile.Modified := True;
Note:
See TracChangeset
for help on using the changeset viewer.