Changeset 39 for trunk/Forms
- Timestamp:
- Nov 29, 2021, 2:17:26 PM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContact.lfm
r38 r39 1 1 object FormContact: TFormContact 2 2 Left = 604 3 Height = 6563 Height = 865 4 4 Top = 361 5 5 Width = 915 6 6 Caption = 'Contact' 7 ClientHeight = 6567 ClientHeight = 865 8 8 ClientWidth = 915 9 9 DesignTimePPI = 144 10 10 OnClose = FormClose 11 11 OnCreate = FormCreate 12 OnDestroy = FormDestroy 12 13 OnShow = FormShow 13 14 LCLVersion = '2.0.12.0' 14 15 object PageControlContact: TPageControl 15 Left = 1016 Height = 57616 Left = 8 17 Height = 785 17 18 Top = 8 18 19 Width = 893 19 ActivePage = TabSheet General20 ActivePage = TabSheetWork 20 21 Anchors = [akTop, akLeft, akRight, akBottom] 21 22 ParentFont = False 22 TabIndex = 023 TabIndex = 2 23 24 TabOrder = 0 24 25 object TabSheetGeneral: TTabSheet 25 26 Caption = 'General' 26 ClientHeight = 53627 ClientHeight = 745 27 28 ClientWidth = 883 29 OnShow = TabSheetGeneralShow 28 30 ParentFont = False 29 31 object Label1: TLabel … … 269 271 end 270 272 end 271 object TabSheet Details: TTabSheet272 Caption = ' Details'273 ClientHeight = 536273 object TabSheetPrivate: TTabSheet 274 Caption = 'Private' 275 ClientHeight = 745 274 276 ClientWidth = 883 277 OnShow = TabSheetGeneralShow 275 278 ParentFont = False 276 279 object Label7: TLabel … … 352 355 end 353 356 object EditFax: TEdit 354 Left = 584355 Height = 42 356 Top = 1 8357 Left = 608 358 Height = 42 359 Top = 16 357 360 Width = 254 358 361 ParentFont = False … … 369 372 end 370 373 object EditFaxHome: TEdit 371 Left = 584374 Left = 608 372 375 Height = 42 373 376 Top = 62 … … 386 389 end 387 390 object EditFaxWork: TEdit 388 Left = 584391 Left = 608 389 392 Height = 42 390 393 Top = 108 … … 403 406 end 404 407 object EditPager: TEdit 405 Left = 584408 Left = 608 406 409 Height = 42 407 410 Top = 152 … … 410 413 TabOrder = 7 411 414 end 412 object Label15: TLabel 413 Left = 10 414 Height = 24 415 Top = 224 416 Width = 89 417 Caption = 'Web page:' 418 ParentColor = False 419 ParentFont = False 420 end 421 object EditWebPage: TEdit 422 Left = 173 423 Height = 42 424 Top = 220 415 object EditAddressHomeStreet: TEdit 416 Left = 173 417 Height = 42 418 Top = 200 425 419 Width = 254 426 420 ParentFont = False 427 421 TabOrder = 8 428 422 end 429 object Label16: TLabel 430 Left = 10 431 Height = 24 432 Top = 272 433 Width = 155 434 Caption = 'Web page (Home):' 435 ParentColor = False 436 ParentFont = False 437 end 438 object EditWebPageHome: TEdit 439 Left = 173 440 Height = 42 441 Top = 262 423 object Label36: TLabel 424 Left = 10 425 Height = 24 426 Top = 210 427 Width = 54 428 Caption = 'Street:' 429 ParentColor = False 430 ParentFont = False 431 end 432 object Label37: TLabel 433 Left = 10 434 Height = 24 435 Top = 258 436 Width = 137 437 Caption = 'Extended street:' 438 ParentColor = False 439 ParentFont = False 440 end 441 object Label38: TLabel 442 Left = 10 443 Height = 24 444 Top = 304 445 Width = 64 446 Caption = 'Region:' 447 ParentColor = False 448 ParentFont = False 449 end 450 object Label39: TLabel 451 Left = 10 452 Height = 24 453 Top = 352 454 Width = 71 455 Caption = 'Country:' 456 ParentColor = False 457 ParentFont = False 458 end 459 object Label40: TLabel 460 Left = 10 461 Height = 24 462 Top = 400 463 Width = 114 464 Caption = 'Web address:' 465 ParentColor = False 466 ParentFont = False 467 end 468 object EditWebHome: TEdit 469 Left = 173 470 Height = 42 471 Top = 392 442 472 Width = 254 443 473 ParentFont = False 444 474 TabOrder = 9 445 475 end 446 object Label17: TLabel 447 Left = 10 448 Height = 24 449 Top = 312 450 Width = 148 451 Caption = 'Web page (Work):' 452 ParentColor = False 453 ParentFont = False 454 end 455 object EditWebPageWork: TEdit 456 Left = 173 457 Height = 42 458 Top = 306 476 object EditAddressHomeCountry: TEdit 477 Left = 173 478 Height = 42 479 Top = 344 459 480 Width = 254 460 481 ParentFont = False 461 482 TabOrder = 10 462 483 end 484 object EditAddressHomeRegion: TEdit 485 Left = 173 486 Height = 42 487 Top = 296 488 Width = 254 489 ParentFont = False 490 TabOrder = 11 491 end 492 object Label41: TLabel 493 Left = 451 494 Height = 24 495 Top = 342 496 Width = 103 497 Caption = 'Postal code:' 498 ParentColor = False 499 ParentFont = False 500 end 501 object EditAddressHomePostalCode: TEdit 502 Left = 608 503 Height = 42 504 Top = 334 505 Width = 254 506 ParentFont = False 507 TabOrder = 12 508 end 509 object EditAddressHomeCity: TEdit 510 Left = 608 511 Height = 42 512 Top = 248 513 Width = 254 514 ParentFont = False 515 TabOrder = 13 516 end 517 object Label42: TLabel 518 Left = 451 519 Height = 24 520 Top = 256 521 Width = 36 522 Caption = 'City:' 523 ParentColor = False 524 ParentFont = False 525 end 526 object Label43: TLabel 527 Left = 451 528 Height = 24 529 Top = 208 530 Width = 131 531 Caption = 'Post office box:' 532 ParentColor = False 533 ParentFont = False 534 end 535 object EditAddressHomePostOfficeBox: TEdit 536 Left = 608 537 Height = 42 538 Top = 200 539 Width = 254 540 ParentFont = False 541 TabOrder = 14 542 end 543 object EditAddressHomeStreetExtended: TEdit 544 Left = 173 545 Height = 42 546 Top = 248 547 Width = 254 548 ParentFont = False 549 TabOrder = 15 550 end 551 end 552 object TabSheetWork: TTabSheet 553 Caption = 'Work' 554 ClientHeight = 745 555 ClientWidth = 883 556 OnShow = TabSheetGeneralShow 557 object EditOrganization: TEdit 558 Left = 173 559 Height = 42 560 Top = 64 561 Width = 254 562 ParentFont = False 563 TabOrder = 0 564 end 565 object LabelOrganization: TLabel 566 Left = 10 567 Height = 24 568 Top = 70 569 Width = 114 570 Caption = 'Organization:' 571 ParentColor = False 572 ParentFont = False 573 end 574 object LabelOrganization1: TLabel 575 Left = 451 576 Height = 24 577 Top = 32 578 Width = 106 579 Caption = 'Department:' 580 ParentColor = False 581 ParentFont = False 582 end 583 object EditDepartment: TEdit 584 Left = 608 585 Height = 42 586 Top = 20 587 Width = 254 588 ParentFont = False 589 TabOrder = 1 590 end 463 591 object Label18: TLabel 464 Left = 450465 Height = 24 466 Top = 2 24592 Left = 10 593 Height = 24 594 Top = 20 467 595 Width = 41 468 596 Caption = 'Title:' … … 471 599 end 472 600 object EditTitle: TEdit 473 Left = 584 474 Height = 42 475 Top = 220 476 Width = 254 477 ParentFont = False 478 TabOrder = 11 479 end 480 object Label19: TLabel 481 Left = 450 482 Height = 24 483 Top = 272 484 Width = 74 485 Caption = 'Address:' 486 ParentColor = False 487 ParentFont = False 488 end 489 object EditAddress: TEdit 490 Left = 584 491 Height = 42 492 Top = 262 493 Width = 254 494 ParentFont = False 495 TabOrder = 12 496 end 497 object LabelOrganization: TLabel 498 Left = 448 601 Left = 173 602 Height = 42 603 Top = 16 604 Width = 254 605 ParentFont = False 606 TabOrder = 2 607 end 608 object Label28: TLabel 609 Left = 10 610 Height = 24 611 Top = 122 612 Width = 54 613 Caption = 'Street:' 614 ParentColor = False 615 ParentFont = False 616 end 617 object EditAddressWorkStreet: TEdit 618 Left = 173 619 Height = 42 620 Top = 112 621 Width = 254 622 ParentFont = False 623 TabOrder = 3 624 end 625 object Label29: TLabel 626 Left = 451 627 Height = 24 628 Top = 168 629 Width = 36 630 Caption = 'City:' 631 ParentColor = False 632 ParentFont = False 633 end 634 object EditAddressWorkCity: TEdit 635 Left = 608 636 Height = 42 637 Top = 160 638 Width = 254 639 ParentFont = False 640 TabOrder = 4 641 end 642 object Label30: TLabel 643 Left = 10 644 Height = 24 645 Top = 216 646 Width = 64 647 Caption = 'Region:' 648 ParentColor = False 649 ParentFont = False 650 end 651 object EditAddressWorkRegion: TEdit 652 Left = 173 653 Height = 42 654 Top = 216 655 Width = 254 656 ParentFont = False 657 TabOrder = 5 658 end 659 object EditAddressWorkCountry: TEdit 660 Left = 173 661 Height = 42 662 Top = 264 663 Width = 254 664 ParentFont = False 665 TabOrder = 6 666 end 667 object Label31: TLabel 668 Left = 10 669 Height = 24 670 Top = 264 671 Width = 71 672 Caption = 'Country:' 673 ParentColor = False 674 ParentFont = False 675 end 676 object EditWebWork: TEdit 677 Left = 173 678 Height = 42 679 Top = 312 680 Width = 254 681 ParentFont = False 682 TabOrder = 7 683 end 684 object Label32: TLabel 685 Left = 10 499 686 Height = 24 500 687 Top = 312 501 688 Width = 114 502 Caption = 'Organization:' 503 ParentColor = False 504 ParentFont = False 505 end 506 object EditOrganization: TEdit 507 Left = 584 508 Height = 42 509 Top = 306 510 Width = 254 511 ParentFont = False 512 TabOrder = 13 513 end 514 object LabelOrganization1: TLabel 515 Left = 450 516 Height = 24 517 Top = 360 518 Width = 106 519 Caption = 'Department:' 520 ParentColor = False 521 ParentFont = False 522 end 523 object EditDepartment: TEdit 524 Left = 584 525 Height = 42 526 Top = 348 527 Width = 254 528 ParentFont = False 529 TabOrder = 14 689 Caption = 'Web address:' 690 ParentColor = False 691 ParentFont = False 692 end 693 object EditAddressWorkPostalCode: TEdit 694 Left = 608 695 Height = 42 696 Top = 246 697 Width = 254 698 ParentFont = False 699 TabOrder = 8 700 end 701 object Label33: TLabel 702 Left = 451 703 Height = 24 704 Top = 254 705 Width = 103 706 Caption = 'Postal code:' 707 ParentColor = False 708 ParentFont = False 709 end 710 object EditAddressWorkPostOfficeBox: TEdit 711 Left = 608 712 Height = 42 713 Top = 112 714 Width = 254 715 ParentFont = False 716 TabOrder = 9 717 end 718 object Label34: TLabel 719 Left = 451 720 Height = 24 721 Top = 122 722 Width = 131 723 Caption = 'Post office box:' 724 ParentColor = False 725 ParentFont = False 726 end 727 object Label35: TLabel 728 Left = 10 729 Height = 24 730 Top = 170 731 Width = 137 732 Caption = 'Extended street:' 733 ParentColor = False 734 ParentFont = False 735 end 736 object EditAddressWorkStreetExtended: TEdit 737 Left = 173 738 Height = 42 739 Top = 168 740 Width = 254 741 ParentFont = False 742 TabOrder = 10 530 743 end 531 744 end 532 745 object TabSheetAll: TTabSheet 533 746 Caption = 'All fields' 534 ClientHeight = 536535 ClientWidth = 883536 747 OnShow = TabSheetAllShow 537 748 ParentFont = False 538 object ListView1: TListView539 Left = 10540 Height = 509541 Top = 19542 Width = 865543 Anchors = [akTop, akLeft, akRight, akBottom]544 Columns = <545 item546 Caption = 'Name'547 Width = 100548 end549 item550 Caption = 'Attributes'551 Width = 200552 end553 item554 Caption = 'Value'555 Width = 550556 end>557 OwnerData = True558 ParentFont = False559 PopupMenu = PopupMenu1560 ReadOnly = True561 RowSelect = True562 TabOrder = 0563 ViewStyle = vsReport564 OnData = ListView1Data565 OnDblClick = AEditFieldExecute566 end567 749 end 568 750 end … … 570 752 Left = 788 571 753 Height = 37 572 Top = 606754 Top = 815 573 755 Width = 115 574 756 Anchors = [akRight, akBottom] … … 581 763 Left = 653 582 764 Height = 37 583 Top = 606765 Top = 815 584 766 Width = 119 585 767 Anchors = [akRight, akBottom] 586 768 Caption = 'OK' 587 769 ModalResult = 1 770 OnClick = ButtonOkClick 588 771 ParentFont = False 589 772 TabOrder = 2 … … 595 778 object AEditField: TAction 596 779 Caption = 'Edit' 597 OnExecute = AEditFieldExecute598 780 end 599 781 end -
trunk/Forms/UFormContact.lrj
r33 r39 16 16 {"hash":62410682,"name":"tformcontact.label26.caption","sourcebytes":[84,105,116,108,101,32,98,101,102,111,114,101,58],"value":"Title before:"}, 17 17 {"hash":63774250,"name":"tformcontact.label27.caption","sourcebytes":[84,105,116,108,101,32,97,102,116,101,114,58],"value":"Title after:"}, 18 {"hash":1 81043315,"name":"tformcontact.tabsheetdetails.caption","sourcebytes":[68,101,116,97,105,108,115],"value":"Details"},18 {"hash":126929141,"name":"tformcontact.tabsheetprivate.caption","sourcebytes":[80,114,105,118,97,116,101],"value":"Private"}, 19 19 {"hash":170160314,"name":"tformcontact.label7.caption","sourcebytes":[80,104,111,110,101,32,40,72,111,109,101,41,58],"value":"Phone (Home):"}, 20 20 {"hash":187747002,"name":"tformcontact.label8.caption","sourcebytes":[80,104,111,110,101,32,40,87,111,114,107,41,58],"value":"Phone (Work):"}, … … 25 25 {"hash":229246954,"name":"tformcontact.label13.caption","sourcebytes":[70,97,120,32,40,87,111,114,107,41,58],"value":"Fax (Work):"}, 26 26 {"hash":90692698,"name":"tformcontact.label14.caption","sourcebytes":[80,97,103,101,114,58],"value":"Pager:"}, 27 {"hash":74850362,"name":"tformcontact.label15.caption","sourcebytes":[87,101,98,32,112,97,103,101,58],"value":"Web page:"}, 28 {"hash":194526122,"name":"tformcontact.label16.caption","sourcebytes":[87,101,98,32,112,97,103,101,32,40,72,111,109,101,41,58],"value":"Web page (Home):"}, 29 {"hash":180650410,"name":"tformcontact.label17.caption","sourcebytes":[87,101,98,32,112,97,103,101,32,40,87,111,114,107,41,58],"value":"Web page (Work):"}, 30 {"hash":95466122,"name":"tformcontact.label18.caption","sourcebytes":[84,105,116,108,101,58],"value":"Title:"}, 31 {"hash":179883546,"name":"tformcontact.label19.caption","sourcebytes":[65,100,100,114,101,115,115,58],"value":"Address:"}, 27 {"hash":179878954,"name":"tformcontact.label36.caption","sourcebytes":[83,116,114,101,101,116,58],"value":"Street:"}, 28 {"hash":116835754,"name":"tformcontact.label37.caption","sourcebytes":[69,120,116,101,110,100,101,100,32,115,116,114,101,101,116,58],"value":"Extended street:"}, 29 {"hash":146671178,"name":"tformcontact.label38.caption","sourcebytes":[82,101,103,105,111,110,58],"value":"Region:"}, 30 {"hash":113622378,"name":"tformcontact.label39.caption","sourcebytes":[67,111,117,110,116,114,121,58],"value":"Country:"}, 31 {"hash":258182170,"name":"tformcontact.label40.caption","sourcebytes":[87,101,98,32,97,100,100,114,101,115,115,58],"value":"Web address:"}, 32 {"hash":186708218,"name":"tformcontact.label41.caption","sourcebytes":[80,111,115,116,97,108,32,99,111,100,101,58],"value":"Postal code:"}, 33 {"hash":4852682,"name":"tformcontact.label42.caption","sourcebytes":[67,105,116,121,58],"value":"City:"}, 34 {"hash":252071146,"name":"tformcontact.label43.caption","sourcebytes":[80,111,115,116,32,111,102,102,105,99,101,32,98,111,120,58],"value":"Post office box:"}, 35 {"hash":386699,"name":"tformcontact.tabsheetwork.caption","sourcebytes":[87,111,114,107],"value":"Work"}, 32 36 {"hash":101155194,"name":"tformcontact.labelorganization.caption","sourcebytes":[79,114,103,97,110,105,122,97,116,105,111,110,58],"value":"Organization:"}, 33 37 {"hash":167347194,"name":"tformcontact.labelorganization1.caption","sourcebytes":[68,101,112,97,114,116,109,101,110,116,58],"value":"Department:"}, 38 {"hash":95466122,"name":"tformcontact.label18.caption","sourcebytes":[84,105,116,108,101,58],"value":"Title:"}, 39 {"hash":179878954,"name":"tformcontact.label28.caption","sourcebytes":[83,116,114,101,101,116,58],"value":"Street:"}, 40 {"hash":4852682,"name":"tformcontact.label29.caption","sourcebytes":[67,105,116,121,58],"value":"City:"}, 41 {"hash":146671178,"name":"tformcontact.label30.caption","sourcebytes":[82,101,103,105,111,110,58],"value":"Region:"}, 42 {"hash":113622378,"name":"tformcontact.label31.caption","sourcebytes":[67,111,117,110,116,114,121,58],"value":"Country:"}, 43 {"hash":258182170,"name":"tformcontact.label32.caption","sourcebytes":[87,101,98,32,97,100,100,114,101,115,115,58],"value":"Web address:"}, 44 {"hash":186708218,"name":"tformcontact.label33.caption","sourcebytes":[80,111,115,116,97,108,32,99,111,100,101,58],"value":"Postal code:"}, 45 {"hash":252071146,"name":"tformcontact.label34.caption","sourcebytes":[80,111,115,116,32,111,102,102,105,99,101,32,98,111,120,58],"value":"Post office box:"}, 46 {"hash":116835754,"name":"tformcontact.label35.caption","sourcebytes":[69,120,116,101,110,100,101,100,32,115,116,114,101,101,116,58],"value":"Extended street:"}, 34 47 {"hash":113983571,"name":"tformcontact.tabsheetall.caption","sourcebytes":[65,108,108,32,102,105,101,108,100,115],"value":"All fields"}, 35 {"hash":346165,"name":"tformcontact.listview1.columns[0].caption","sourcebytes":[78,97,109,101],"value":"Name"},36 {"hash":150815091,"name":"tformcontact.listview1.columns[1].caption","sourcebytes":[65,116,116,114,105,98,117,116,101,115],"value":"Attributes"},37 {"hash":6063029,"name":"tformcontact.listview1.columns[2].caption","sourcebytes":[86,97,108,117,101],"value":"Value"},38 48 {"hash":77089212,"name":"tformcontact.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 39 49 {"hash":1339,"name":"tformcontact.buttonok.caption","sourcebytes":[79,75],"value":"OK"}, -
trunk/Forms/UFormContact.pas
r38 r39 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, ActnList, Menus, ExtCtrls, UContact, base64 ;9 ComCtrls, ActnList, Menus, ExtCtrls, UContact, base64, UFormProperties; 10 10 11 11 type … … 18 18 ButtonCancel: TButton; 19 19 ButtonOk: TButton; 20 EditAddressHomeCity: TEdit; 21 EditAddressHomeCountry: TEdit; 22 EditAddressHomePostalCode: TEdit; 23 EditAddressHomePostOfficeBox: TEdit; 24 EditAddressHomeRegion: TEdit; 25 EditAddressHomeStreetExtended: TEdit; 26 EditAddressWorkStreet: TEdit; 27 EditAddressWorkCity: TEdit; 28 EditAddressWorkRegion: TEdit; 29 EditAddressWorkCountry: TEdit; 30 EditAddressHomeStreet: TEdit; 31 EditWebWork: TEdit; 32 EditAddressWorkPostalCode: TEdit; 33 EditAddressWorkPostOfficeBox: TEdit; 34 EditAddressWorkStreetExtended: TEdit; 20 35 EditDepartment: TEdit; 21 36 EditFullName: TEdit; 37 EditOrganization: TEdit; 38 EditTitle: TEdit; 22 39 EditTitleBefore: TEdit; 23 40 EditMiddleName: TEdit; 24 41 EditTitleAfter: TEdit; 25 EditWebPage: TEdit;26 EditWebPageHome: TEdit;27 EditWebPageWork: TEdit;28 42 EditEmailHome: TEdit; 29 43 EditEmailWork: TEdit; 30 44 EditBirthday: TEdit; 31 EditTitle: TEdit;32 EditAddress: TEdit;33 EditOrganization: TEdit;34 45 EditPhoneHome: TEdit; 35 46 EditPhoneWork: TEdit; … … 45 56 EditFirstName: TEdit; 46 57 EditCellPhone: TEdit; 58 EditWebHome: TEdit; 47 59 ImagePhoto: TImage; 48 60 Label1: TLabel; … … 52 64 Label13: TLabel; 53 65 Label14: TLabel; 54 Label15: TLabel;55 Label16: TLabel;56 Label17: TLabel;57 66 Label18: TLabel; 58 Label19: TLabel;59 67 Label2: TLabel; 60 68 Label20: TLabel; … … 66 74 Label26: TLabel; 67 75 Label27: TLabel; 68 LabelOrganization: TLabel; 76 Label28: TLabel; 77 Label29: TLabel; 69 78 Label3: TLabel; 79 Label30: TLabel; 80 Label31: TLabel; 81 Label32: TLabel; 82 Label33: TLabel; 83 Label34: TLabel; 84 Label35: TLabel; 85 Label36: TLabel; 86 Label37: TLabel; 87 Label38: TLabel; 88 Label39: TLabel; 70 89 Label4: TLabel; 90 Label40: TLabel; 91 Label41: TLabel; 92 Label42: TLabel; 93 Label43: TLabel; 71 94 Label5: TLabel; 72 95 Label6: TLabel; … … 74 97 Label8: TLabel; 75 98 Label9: TLabel; 99 LabelOrganization: TLabel; 76 100 LabelOrganization1: TLabel; 77 ListView1: TListView;78 101 MemoNotes: TMemo; 79 102 MenuItem1: TMenuItem; 80 103 PageControlContact: TPageControl; 81 104 PopupMenu1: TPopupMenu; 105 TabSheetWork: TTabSheet; 82 106 TabSheetGeneral: TTabSheet; 83 TabSheet Details: TTabSheet;107 TabSheetPrivate: TTabSheet; 84 108 TabSheetAll: TTabSheet; 85 procedure AEditFieldExecute(Sender: TObject);109 procedure ButtonOkClick(Sender: TObject); 86 110 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 87 111 procedure FormCreate(Sender: TObject); 112 procedure FormDestroy(Sender: TObject); 88 113 procedure FormShow(Sender: TObject); 89 114 procedure ListView1Data(Sender: TObject; Item: TListItem); 90 115 procedure TabSheetAllShow(Sender: TObject); 116 procedure TabSheetGeneralShow(Sender: TObject); 91 117 private 92 Contact: TContact; 118 FContact: TContact; 119 FormProperties: TFormProperties; 120 procedure SetContact(AValue: TContact); 93 121 public 94 procedure ReloadFields;95 procedure LoadData(Contact: TContact);96 pro cedure SaveData(Contact: TContact);122 procedure LoadData; 123 procedure SaveData; 124 property Contact: TContact read FContact write SetContact; 97 125 end; 98 126 … … 118 146 Core.PersistentForm1.Load(Self); 119 147 PageControlContact.TabIndex := 0; 148 149 FormProperties.ManualDock(TabSheetAll, nil, alClient); 150 FormProperties.Align := alClient; 151 FormProperties.Show; 120 152 end; 121 153 … … 133 165 procedure TFormContact.TabSheetAllShow(Sender: TObject); 134 166 begin 135 ReloadFields; 136 end; 137 138 procedure TFormContact.ReloadFields; 139 begin 140 if Assigned(Contact) then begin 141 ListView1.Items.Count := Contact.Properties.Count; 142 end else ListView1.Items.Count := 0; 143 ListView1.Refresh; 167 SaveData; 168 FormProperties.ReloadList; 169 FormProperties.UpdateInterface; 170 end; 171 172 procedure TFormContact.TabSheetGeneralShow(Sender: TObject); 173 begin 174 LoadData; 175 end; 176 177 procedure TFormContact.SetContact(AValue: TContact); 178 begin 179 if FContact = AValue then Exit; 180 FContact := AValue; 181 LoadData; 144 182 end; 145 183 … … 150 188 end; 151 189 152 procedure TFormContact.AEditFieldExecute(Sender: TObject); 153 begin 154 if Assigned(ListView1.Selected) then begin 155 TContactProperty(ListView1.Selected.Data).Values.DelimitedText := 156 InputBox(SFieldEdit, SEditFieldValue, TContactProperty(ListView1.Selected.Data).Values.DelimitedText); 157 end; 190 procedure TFormContact.ButtonOkClick(Sender: TObject); 191 begin 192 SaveData; 158 193 end; 159 194 … … 162 197 Core.Translator.TranslateComponentRecursive(Self); 163 198 Core.ThemeManager1.UseTheme(Self); 164 Contact := nil; 165 end; 166 167 procedure TFormContact.LoadData(Contact: TContact); 199 FContact := nil; 200 FormProperties := TFormProperties.Create(nil); 201 end; 202 203 procedure TFormContact.FormDestroy(Sender: TObject); 204 begin 205 FreeAndNil(FormProperties); 206 end; 207 208 procedure TFormContact.LoadData; 168 209 var 169 210 Photo: string; … … 172 213 PhotoProperty: TContactProperty; 173 214 begin 174 Self.Contact := Contact; 215 FormProperties.Properties := Contact.Properties; 216 175 217 EditFullName.Text := Contact.Fields[cfFullName]; 176 218 EditFirstName.Text := Contact.Fields[cfFirstName]; … … 184 226 EditEmail.Text := Contact.Fields[cfEmail]; 185 227 MemoNotes.Lines.Text := Contact.Fields[cfNote]; 228 229 // Work 186 230 EditTitle.Text := Contact.Fields[cfTitle]; 187 231 EditOrganization.Text := Contact.Fields[cfOrganization]; 188 232 EditDepartment.Text := Contact.Fields[cfDepartment]; 189 EditAddress.Text := Contact.Fields[cfHomeAddress]; 233 EditAddressWorkPostOfficeBox.Text := Contact.Fields[cfWorkAddressPostOfficeBox]; 234 EditAddressWorkStreet.Text := Contact.Fields[cfWorkAddressStreet]; 235 EditAddressWorkStreetExtended.Text := Contact.Fields[cfWorkAddressStreetExtended]; 236 EditAddressWorkCity.Text := Contact.Fields[cfWorkAddressCity]; 237 EditAddressWorkRegion.Text := Contact.Fields[cfWorkAddressRegion]; 238 EditAddressWorkCountry.Text := Contact.Fields[cfWorkAddressCountry]; 239 EditAddressWorkPostalCode.Text := Contact.Fields[cfWorkAddressPostalCode]; 240 EditWebHome.Text := Contact.Fields[cfUrlWork]; 241 242 // Private 243 EditAddressHomePostOfficeBox.Text := Contact.Fields[cfHomeAddressPostOfficeBox]; 244 EditAddressHomeStreet.Text := Contact.Fields[cfHomeAddressStreet]; 245 EditAddressHomeStreetExtended.Text := Contact.Fields[cfHomeAddressStreetExtended]; 246 EditAddressHomeCity.Text := Contact.Fields[cfHomeAddressCity]; 247 EditAddressHomeRegion.Text := Contact.Fields[cfHomeAddressRegion]; 248 EditAddressHomeCountry.Text := Contact.Fields[cfHomeAddressCountry]; 249 EditAddressHomePostalCode.Text := Contact.Fields[cfHomeAddressPostalCode]; 250 EditWebHome.Text := Contact.Fields[cfUrlHome]; 251 EditBirthday.Text := Contact.Fields[cfDayOfBirth]; 252 190 253 EditEmailHome.Text := Contact.Fields[cfEmail]; 191 EditWebPage.Text := Contact.Fields[cfUrl];192 EditBirthday.Text := Contact.Fields[cfDayOfBirth];193 194 254 ImagePhoto.Picture.Bitmap.Clear; 195 255 PhotoProperty := Contact.GetProperty(cfPhoto); … … 226 286 end; 227 287 228 procedure TFormContact.SaveData (Contact: TContact);288 procedure TFormContact.SaveData; 229 289 begin 230 290 Contact.Fields[cfFullName] := EditFullName.Text; … … 239 299 Contact.Fields[cfEmail] := EditEmail.Text; 240 300 Contact.Fields[cfNote] := MemoNotes.Lines.Text; 301 Contact.Fields[cfEmail] := EditEmailHome.Text; 302 Contact.Fields[cfDayOfBirth] := EditBirthday.Text; 303 304 // Work 241 305 Contact.Fields[cfTitle] := EditTitle.Text; 242 306 Contact.Fields[cfOrganization] := EditOrganization.Text; 243 307 Contact.Fields[cfDepartment] := EditDepartment.Text; 244 Contact.Fields[cfHomeAddress] := EditAddress.Text; 245 Contact.Fields[cfEmail] := EditEmailHome.Text; 246 Contact.Fields[cfUrl] := EditWebPage.Text; 247 Contact.Fields[cfDayOfBirth] := EditBirthday.Text; 308 Contact.Fields[cfWorkAddressPostOfficeBox] := EditAddressWorkPostOfficeBox.Text; 309 Contact.Fields[cfWorkAddressStreet] := EditAddressWorkStreet.Text; 310 Contact.Fields[cfWorkAddressStreetExtended] := EditAddressWorkStreetExtended.Text; 311 Contact.Fields[cfWorkAddressCity] := EditAddressWorkCity.Text; 312 Contact.Fields[cfWorkAddressRegion] := EditAddressWorkRegion.Text; 313 Contact.Fields[cfWorkAddressCountry] := EditAddressWorkCountry.Text; 314 Contact.Fields[cfWorkAddressPostalCode] := EditAddressWorkPostalCode.Text; 315 Contact.Fields[cfUrlWork] := EditWebWork.Text; 316 317 // Private 318 Contact.Fields[cfHomeAddressPostOfficeBox] := EditAddressHomePostOfficeBox.Text; 319 Contact.Fields[cfHomeAddressStreet] := EditAddressHomeStreet.Text; 320 Contact.Fields[cfHomeAddressStreetExtended] := EditAddressHomeStreetExtended.Text; 321 Contact.Fields[cfHomeAddressCity] := EditAddressHomeCity.Text; 322 Contact.Fields[cfHomeAddressRegion] := EditAddressHomeRegion.Text; 323 Contact.Fields[cfHomeAddressCountry] := EditAddressHomeCountry.Text; 324 Contact.Fields[cfHomeAddressPostalCode] := EditAddressHomePostalCode.Text; 325 Contact.Fields[cfUrlHome] := EditWebHome.Text; 248 326 end; 249 327 -
trunk/Forms/UFormContacts.pas
r36 r39 197 197 FormContact := TFormContact.Create(nil); 198 198 try 199 if FormContact.ShowModal = mrOK then begin200 199 Contact := TContact.Create; 201 Contact.Parent := Contacts.ContactsFile; 202 FormContact.SaveData(Contact); 203 Contacts.Add(Contact); 204 Core.DataFile.Modified := True; 205 ReloadList; 206 UpdateInterface; 207 end; 200 try 201 Contact.Parent := Contacts.ContactsFile; 202 FormContact.Contact := Contact; 203 if FormContact.ShowModal = mrOK then begin 204 Contacts.Add(Contact); 205 Contact := nil; 206 Core.DataFile.Modified := True; 207 ReloadList; 208 UpdateInterface; 209 end; 210 finally 211 if Assigned(Contact) then 212 Contact.Free; 213 end; 208 214 finally 209 215 FormContact.Free; … … 214 220 var 215 221 FormContact: TFormContact; 222 Contact: TContact; 216 223 begin 217 224 FormContact := TFormContact.Create(nil); 218 225 try 219 FormContact.LoadData(TContact(ListView1.Selected.Data)); 220 if FormContact.ShowModal = mrOK then begin 221 FormContact.SaveData(TContact(ListView1.Selected.Data)); 222 Core.DataFile.Modified := True; 223 ReloadList; 224 UpdateInterface; 226 Contact := TContact.Create; 227 Contact.Assign(TContact(ListView1.Selected.Data)); 228 FormContact.Contact := Contact; 229 try 230 if FormContact.ShowModal = mrOK then begin 231 TContact(ListView1.Selected.Data).Assign(Contact); 232 Core.DataFile.Modified := True; 233 ReloadList; 234 UpdateInterface; 235 end; 236 finally 237 Contact.Free; 225 238 end; 226 239 finally
Note:
See TracChangeset
for help on using the changeset viewer.