Changeset 49 for trunk/Forms
- Timestamp:
- Dec 3, 2021, 6:52:12 PM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContact.lfm
r48 r49 18 18 Top = 8 19 19 Width = 939 20 ActivePage = TabSheet General20 ActivePage = TabSheetAll 21 21 Anchors = [akTop, akLeft, akRight, akBottom] 22 22 ParentFont = False 23 TabIndex = 023 TabIndex = 4 24 24 TabOrder = 0 25 25 object TabSheetGeneral: TTabSheet 26 26 Caption = 'General' 27 ClientHeight = 74 228 ClientWidth = 9 2927 ClientHeight = 744 28 ClientWidth = 931 29 29 OnHide = TabSheetGeneralHide 30 30 OnShow = TabSheetGeneralShow … … 32 32 object Label1: TLabel 33 33 Left = 240 34 Height = 2 434 Height = 25 35 35 Top = 80 36 Width = 9436 Width = 86 37 37 Caption = 'First name:' 38 38 ParentColor = False … … 41 41 object EditFirstName: TEdit 42 42 Left = 360 43 Height = 4243 Height = 33 44 44 Top = 72 45 45 Width = 155 … … 49 49 object Label2: TLabel 50 50 Left = 16 51 Height = 2 451 Height = 25 52 52 Top = 250 53 Width = 6353 Width = 59 54 54 Caption = 'Mobile:' 55 55 ParentColor = False … … 58 58 object EditMobile: TEdit 59 59 Left = 144 60 Height = 4260 Height = 33 61 61 Top = 240 62 62 Width = 254 … … 66 66 object EditPhone: TEdit 67 67 Left = 144 68 Height = 4268 Height = 33 69 69 Top = 286 70 70 Width = 254 … … 74 74 object Label3: TLabel 75 75 Left = 16 76 Height = 2 476 Height = 25 77 77 Top = 290 78 Width = 5 978 Width = 54 79 79 Caption = 'Phone:' 80 80 ParentColor = False … … 83 83 object EditEmail: TEdit 84 84 Left = 144 85 Height = 4285 Height = 33 86 86 Top = 328 87 87 Width = 254 … … 91 91 object Label4: TLabel 92 92 Left = 16 93 Height = 2 493 Height = 25 94 94 Top = 336 95 Width = 5 895 Width = 53 96 96 Caption = 'E-mail:' 97 97 ParentColor = False … … 100 100 object EditLastName: TEdit 101 101 Left = 671 102 Height = 42102 Height = 33 103 103 Top = 72 104 104 Width = 155 … … 108 108 object Label5: TLabel 109 109 Left = 536 110 Height = 2 4110 Height = 25 111 111 Top = 80 112 Width = 8 7112 Width = 80 113 113 Caption = 'Last name' 114 114 ParentColor = False … … 117 117 object EditBirthday: TEdit 118 118 Left = 144 119 Height = 42119 Height = 33 120 120 Top = 424 121 121 Width = 254 … … 125 125 object Label22: TLabel 126 126 Left = 16 127 Height = 2 4127 Height = 25 128 128 Top = 432 129 Width = 76129 Width = 69 130 130 Caption = 'Birthday:' 131 131 ParentColor = False … … 144 144 object Label24: TLabel 145 145 Left = 240 146 Height = 2 4146 Height = 25 147 147 Top = 32 148 Width = 8 8148 Width = 80 149 149 Caption = 'Full name:' 150 150 ParentColor = False … … 153 153 object EditFullName: TEdit 154 154 Left = 360 155 Height = 42155 Height = 33 156 156 Top = 24 157 157 Width = 467 … … 161 161 object Label25: TLabel 162 162 Left = 536 163 Height = 2 4163 Height = 25 164 164 Top = 128 165 Width = 1 16165 Width = 108 166 166 Caption = 'Middle name:' 167 167 ParentColor = False … … 170 170 object EditMiddleName: TEdit 171 171 Left = 671 172 Height = 42172 Height = 33 173 173 Top = 120 174 174 Width = 155 … … 178 178 object Label26: TLabel 179 179 Left = 240 180 Height = 2 4180 Height = 25 181 181 Top = 176 182 Width = 101182 Width = 93 183 183 Caption = 'Title before:' 184 184 ParentColor = False … … 187 187 object EditTitleBefore: TEdit 188 188 Left = 360 189 Height = 42189 Height = 33 190 190 Top = 168 191 191 Width = 155 … … 195 195 object Label27: TLabel 196 196 Left = 536 197 Height = 2 4197 Height = 25 198 198 Top = 176 199 Width = 85199 Width = 77 200 200 Caption = 'Title after:' 201 201 ParentColor = False … … 204 204 object EditTitleAfter: TEdit 205 205 Left = 671 206 Height = 42206 Height = 33 207 207 Top = 168 208 208 Width = 155 … … 212 212 object Label44: TLabel 213 213 Left = 240 214 Height = 2 4214 Height = 25 215 215 Top = 128 216 Width = 91216 Width = 82 217 217 Caption = 'Nickname:' 218 218 ParentColor = False … … 221 221 object EditNickName: TEdit 222 222 Left = 360 223 Height = 42223 Height = 33 224 224 Top = 120 225 225 Width = 155 … … 229 229 object Label45: TLabel 230 230 Left = 432 231 Height = 2 4231 Height = 25 232 232 Top = 432 233 Width = 105233 Width = 96 234 234 Caption = 'Anniversary:' 235 235 ParentColor = False … … 238 238 object EditAniversary: TEdit 239 239 Left = 575 240 Height = 42240 Height = 33 241 241 Top = 424 242 242 Width = 254 … … 246 246 object Label9: TLabel 247 247 Left = 432 248 Height = 2 4248 Height = 25 249 249 Top = 248 250 Width = 34250 Width = 29 251 251 Caption = 'Fax:' 252 252 ParentColor = False … … 255 255 object EditFax: TEdit 256 256 Left = 575 257 Height = 42257 Height = 33 258 258 Top = 240 259 259 Width = 254 … … 263 263 object EditPager: TEdit 264 264 Left = 575 265 Height = 42265 Height = 33 266 266 Top = 286 267 267 Width = 254 … … 271 271 object Label10: TLabel 272 272 Left = 432 273 Height = 2 4273 Height = 25 274 274 Top = 290 275 Width = 54275 Width = 48 276 276 Caption = 'Pager:' 277 277 ParentColor = False … … 280 280 object Label46: TLabel 281 281 Left = 16 282 Height = 2 4282 Height = 25 283 283 Top = 384 284 Width = 1 14284 Width = 107 285 285 Caption = 'Web address:' 286 286 ParentColor = False … … 289 289 object EditWeb: TEdit 290 290 Left = 144 291 Height = 42291 Height = 33 292 292 Top = 376 293 293 Width = 683 … … 298 298 object TabSheetHome: TTabSheet 299 299 Caption = 'Home' 300 ClientHeight = 74 2301 ClientWidth = 9 29300 ClientHeight = 744 301 ClientWidth = 931 302 302 OnHide = TabSheetHomeHide 303 303 OnShow = TabSheetHomeShow … … 305 305 object Label7: TLabel 306 306 Left = 16 307 Height = 2 4307 Height = 25 308 308 Top = 114 309 Width = 5 8309 Width = 53 310 310 Caption = 'E-mail:' 311 311 ParentColor = False … … 314 314 object EditHomeEmail: TEdit 315 315 Left = 173 316 Height = 42316 Height = 33 317 317 Top = 112 318 318 Width = 254 … … 322 322 object Label11: TLabel 323 323 Left = 448 324 Height = 2 4324 Height = 25 325 325 Top = 18 326 Width = 34326 Width = 29 327 327 Caption = 'Fax:' 328 328 ParentColor = False … … 331 331 object EditHomeFax: TEdit 332 332 Left = 605 333 Height = 42333 Height = 33 334 334 Top = 16 335 335 Width = 254 … … 339 339 object EditHomeMobile: TEdit 340 340 Left = 173 341 Height = 42341 Height = 33 342 342 Top = 60 343 343 Width = 254 … … 347 347 object EditHomePhone: TEdit 348 348 Left = 173 349 Height = 42349 Height = 33 350 350 Top = 16 351 351 Width = 254 … … 355 355 object Label14: TLabel 356 356 Left = 448 357 Height = 2 4357 Height = 25 358 358 Top = 68 359 Width = 54359 Width = 48 360 360 Caption = 'Pager:' 361 361 ParentColor = False … … 364 364 object EditHomePager: TEdit 365 365 Left = 605 366 Height = 42366 Height = 33 367 367 Top = 60 368 368 Width = 254 … … 372 372 object Label40: TLabel 373 373 Left = 16 374 Height = 2 4374 Height = 25 375 375 Top = 168 376 Width = 1 14376 Width = 107 377 377 Caption = 'Web address:' 378 378 ParentColor = False … … 381 381 object EditHomeWeb: TEdit 382 382 Left = 173 383 Height = 42383 Height = 33 384 384 Top = 160 385 385 Width = 683 … … 391 391 Height = 242 392 392 Top = 216 393 Width = 89 0393 Width = 892 394 394 Anchors = [akTop, akLeft, akRight] 395 395 Caption = 'Address' 396 ClientHeight = 21 5396 ClientHeight = 212 397 397 ClientWidth = 888 398 398 TabOrder = 6 399 399 object Label36: TLabel 400 400 Left = 8 401 Height = 2 4401 Height = 25 402 402 Top = 18 403 Width = 54403 Width = 49 404 404 Caption = 'Street:' 405 405 ParentColor = False … … 408 408 object Label37: TLabel 409 409 Left = 10 410 Height = 2 4410 Height = 25 411 411 Top = 66 412 Width = 1 37412 Width = 126 413 413 Caption = 'Extended street:' 414 414 ParentColor = False … … 417 417 object EditHomeAddressStreetExtended: TEdit 418 418 Left = 173 419 Height = 42419 Height = 33 420 420 Top = 56 421 421 Width = 254 … … 425 425 object EditHomeAddressStreet: TEdit 426 426 Left = 173 427 Height = 42427 Height = 33 428 428 Top = 8 429 429 Width = 254 … … 433 433 object Label38: TLabel 434 434 Left = 10 435 Height = 2 4435 Height = 25 436 436 Top = 112 437 Width = 64437 Width = 59 438 438 Caption = 'Region:' 439 439 ParentColor = False … … 442 442 object EditHomeAddressRegion: TEdit 443 443 Left = 173 444 Height = 42444 Height = 33 445 445 Top = 104 446 446 Width = 254 … … 450 450 object EditHomeAddressCountry: TEdit 451 451 Left = 173 452 Height = 42452 Height = 33 453 453 Top = 152 454 454 Width = 254 … … 458 458 object Label39: TLabel 459 459 Left = 10 460 Height = 2 4460 Height = 25 461 461 Top = 160 462 Width = 71462 Width = 67 463 463 Caption = 'Country:' 464 464 ParentColor = False … … 467 467 object Label41: TLabel 468 468 Left = 451 469 Height = 2 4469 Height = 25 470 470 Top = 150 471 Width = 103471 Width = 95 472 472 Caption = 'Postal code:' 473 473 ParentColor = False … … 476 476 object EditHomeAddressPostalCode: TEdit 477 477 Left = 588 478 Height = 42478 Height = 33 479 479 Top = 142 480 480 Width = 254 … … 484 484 object EditHomeAddressCity: TEdit 485 485 Left = 588 486 Height = 42486 Height = 33 487 487 Top = 56 488 488 Width = 254 … … 492 492 object Label42: TLabel 493 493 Left = 451 494 Height = 2 4494 Height = 25 495 495 Top = 64 496 Width = 3 6496 Width = 34 497 497 Caption = 'City:' 498 498 ParentColor = False … … 501 501 object Label43: TLabel 502 502 Left = 451 503 Height = 2 4503 Height = 25 504 504 Top = 16 505 Width = 1 31505 Width = 122 506 506 Caption = 'Post office box:' 507 507 ParentColor = False … … 510 510 object EditHomeAddressPostOfficeBox: TEdit 511 511 Left = 588 512 Height = 42512 Height = 33 513 513 Top = 8 514 514 Width = 254 … … 519 519 object Label12: TLabel 520 520 Left = 16 521 Height = 2 4521 Height = 25 522 522 Top = 64 523 Width = 63523 Width = 59 524 524 Caption = 'Mobile:' 525 525 ParentColor = False … … 528 528 object Label13: TLabel 529 529 Left = 16 530 Height = 2 4530 Height = 25 531 531 Top = 20 532 Width = 5 9532 Width = 54 533 533 Caption = 'Phone:' 534 534 ParentColor = False … … 538 538 object TabSheetWork: TTabSheet 539 539 Caption = 'Work' 540 ClientHeight = 74 2541 ClientWidth = 9 29540 ClientHeight = 744 541 ClientWidth = 931 542 542 OnHide = TabSheetWorkHide 543 543 OnShow = TabSheetWorkShow 544 544 object EditOrganization: TEdit 545 545 Left = 173 546 Height = 42546 Height = 33 547 547 Top = 64 548 548 Width = 254 … … 552 552 object LabelOrganization: TLabel 553 553 Left = 10 554 Height = 2 4554 Height = 25 555 555 Top = 70 556 Width = 1 14556 Width = 106 557 557 Caption = 'Organization:' 558 558 ParentColor = False … … 561 561 object LabelOrganization1: TLabel 562 562 Left = 451 563 Height = 2 4563 Height = 25 564 564 Top = 32 565 Width = 106565 Width = 99 566 566 Caption = 'Department:' 567 567 ParentColor = False … … 570 570 object EditDepartment: TEdit 571 571 Left = 608 572 Height = 42572 Height = 33 573 573 Top = 20 574 574 Width = 254 … … 578 578 object Label18: TLabel 579 579 Left = 10 580 Height = 2 4580 Height = 25 581 581 Top = 20 582 Width = 41582 Width = 36 583 583 Caption = 'Title:' 584 584 ParentColor = False … … 587 587 object EditTitle: TEdit 588 588 Left = 173 589 Height = 42589 Height = 33 590 590 Top = 16 591 591 Width = 254 … … 595 595 object EditWorkWeb: TEdit 596 596 Left = 173 597 Height = 42597 Height = 33 598 598 Top = 256 599 599 Width = 683 … … 603 603 object Label32: TLabel 604 604 Left = 10 605 Height = 2 4605 Height = 25 606 606 Top = 264 607 Width = 1 14607 Width = 107 608 608 Caption = 'Web address:' 609 609 ParentColor = False … … 616 616 Width = 911 617 617 Caption = 'Address' 618 ClientHeight = 2 20619 ClientWidth = 90 9618 ClientHeight = 217 619 ClientWidth = 907 620 620 TabOrder = 4 621 621 object Label31: TLabel 622 622 Left = 10 623 Height = 2 4623 Height = 25 624 624 Top = 160 625 Width = 71625 Width = 67 626 626 Caption = 'Country:' 627 627 ParentColor = False … … 630 630 object EditAddressWorkCountry: TEdit 631 631 Left = 173 632 Height = 42632 Height = 33 633 633 Top = 160 634 634 Width = 254 … … 638 638 object EditAddressWorkRegion: TEdit 639 639 Left = 173 640 Height = 42640 Height = 33 641 641 Top = 112 642 642 Width = 254 … … 646 646 object Label30: TLabel 647 647 Left = 10 648 Height = 2 4648 Height = 25 649 649 Top = 112 650 Width = 64650 Width = 59 651 651 Caption = 'Region:' 652 652 ParentColor = False … … 655 655 object Label35: TLabel 656 656 Left = 10 657 Height = 2 4657 Height = 25 658 658 Top = 66 659 Width = 1 37659 Width = 126 660 660 Caption = 'Extended street:' 661 661 ParentColor = False … … 664 664 object EditAddressWorkStreetExtended: TEdit 665 665 Left = 173 666 Height = 42666 Height = 33 667 667 Top = 64 668 668 Width = 254 … … 672 672 object Label28: TLabel 673 673 Left = 10 674 Height = 2 4674 Height = 25 675 675 Top = 18 676 Width = 54676 Width = 49 677 677 Caption = 'Street:' 678 678 ParentColor = False … … 681 681 object EditAddressWorkStreet: TEdit 682 682 Left = 173 683 Height = 42683 Height = 33 684 684 Top = 8 685 685 Width = 254 … … 689 689 object Label34: TLabel 690 690 Left = 451 691 Height = 2 4691 Height = 25 692 692 Top = 18 693 Width = 1 31693 Width = 122 694 694 Caption = 'Post office box:' 695 695 ParentColor = False … … 698 698 object EditAddressWorkPostOfficeBox: TEdit 699 699 Left = 608 700 Height = 42700 Height = 33 701 701 Top = 8 702 702 Width = 254 … … 706 706 object EditAddressWorkCity: TEdit 707 707 Left = 608 708 Height = 42708 Height = 33 709 709 Top = 56 710 710 Width = 254 … … 714 714 object Label29: TLabel 715 715 Left = 451 716 Height = 2 4716 Height = 25 717 717 Top = 64 718 Width = 3 6718 Width = 34 719 719 Caption = 'City:' 720 720 ParentColor = False … … 723 723 object EditAddressWorkPostalCode: TEdit 724 724 Left = 608 725 Height = 42725 Height = 33 726 726 Top = 142 727 727 Width = 254 … … 731 731 object Label33: TLabel 732 732 Left = 451 733 Height = 2 4733 Height = 25 734 734 Top = 150 735 Width = 103735 Width = 95 736 736 Caption = 'Postal code:' 737 737 ParentColor = False … … 741 741 object Label15: TLabel 742 742 Left = 10 743 Height = 2 4743 Height = 25 744 744 Top = 116 745 Width = 5 9745 Width = 54 746 746 Caption = 'Phone:' 747 747 ParentColor = False … … 750 750 object EditWorkPhone: TEdit 751 751 Left = 173 752 Height = 42752 Height = 33 753 753 Top = 112 754 754 Width = 254 … … 758 758 object Label16: TLabel 759 759 Left = 451 760 Height = 2 4760 Height = 25 761 761 Top = 112 762 Width = 34762 Width = 29 763 763 Caption = 'Fax:' 764 764 ParentColor = False … … 767 767 object EditWorkFax: TEdit 768 768 Left = 608 769 Height = 42769 Height = 33 770 770 Top = 112 771 771 Width = 254 … … 775 775 object EditWorkPager: TEdit 776 776 Left = 608 777 Height = 42777 Height = 33 778 778 Top = 156 779 779 Width = 254 … … 783 783 object Label17: TLabel 784 784 Left = 448 785 Height = 2 4785 Height = 25 786 786 Top = 160 787 Width = 54787 Width = 48 788 788 Caption = 'Pager:' 789 789 ParentColor = False … … 792 792 object EditWorkMobile: TEdit 793 793 Left = 173 794 Height = 42794 Height = 33 795 795 Top = 160 796 796 Width = 254 … … 800 800 object Label19: TLabel 801 801 Left = 10 802 Height = 2 4802 Height = 25 803 803 Top = 160 804 Width = 63804 Width = 59 805 805 Caption = 'Mobile:' 806 806 ParentColor = False … … 809 809 object Label8: TLabel 810 810 Left = 10 811 Height = 2 4811 Height = 25 812 812 Top = 210 813 Width = 5 8813 Width = 53 814 814 Caption = 'E-mail:' 815 815 ParentColor = False … … 818 818 object EditWorkEmail: TEdit 819 819 Left = 173 820 Height = 42820 Height = 33 821 821 Top = 210 822 822 Width = 254 … … 827 827 object TabSheetOthers: TTabSheet 828 828 Caption = 'Others' 829 ClientHeight = 74 2830 ClientWidth = 9 29829 ClientHeight = 744 830 ClientWidth = 931 831 831 OnHide = TabSheetOthersHide 832 832 OnShow = TabSheetOthersShow 833 833 object MemoNotes: TMemo 834 834 Left = 16 835 Height = 39 2835 Height = 394 836 836 Top = 48 837 Width = 89 3837 Width = 895 838 838 Anchors = [akTop, akLeft, akRight, akBottom] 839 839 ParentFont = False … … 844 844 object Label6: TLabel 845 845 Left = 16 846 Height = 2 4846 Height = 25 847 847 Top = 16 848 Width = 5 5848 Width = 51 849 849 Caption = 'Notes:' 850 850 ParentColor = False … … 916 916 OnExecute = APhotoSaveExecute 917 917 end 918 object APhotoClear: TAction 919 Caption = 'Clear' 920 OnExecute = APhotoClearExecute 921 end 918 922 end 919 923 object PopupMenuPhoto: TPopupMenu … … 926 930 object MenuItem2: TMenuItem 927 931 Action = APhotoSave 932 end 933 object MenuItem3: TMenuItem 934 Action = APhotoClear 928 935 end 929 936 end -
trunk/Forms/UFormContact.lrj
r47 r49 58 58 {"hash":347380,"name":"tformcontact.buttonnext.caption","sourcebytes":[78,101,120,116],"value":"Next"}, 59 59 {"hash":8431845,"name":"tformcontact.aphotoload.caption","sourcebytes":[76,111,97,100,32,102,114,111,109,32,102,105,108,101],"value":"Load from file"}, 60 {"hash":9308581,"name":"tformcontact.aphotosave.caption","sourcebytes":[83,97,118,101,32,116,111,32,102,105,108,101],"value":"Save to file"} 60 {"hash":9308581,"name":"tformcontact.aphotosave.caption","sourcebytes":[83,97,118,101,32,116,111,32,102,105,108,101],"value":"Save to file"}, 61 {"hash":4860802,"name":"tformcontact.aphotoclear.caption","sourcebytes":[67,108,101,97,114],"value":"Clear"} 61 62 ]} -
trunk/Forms/UFormContact.pas
r48 r49 14 14 15 15 TFormContact = class(TForm) 16 APhotoClear: TAction; 16 17 APhotoSave: TAction; 17 18 APhotoLoad: TAction; … … 116 117 MenuItem1: TMenuItem; 117 118 MenuItem2: TMenuItem; 119 MenuItem3: TMenuItem; 118 120 OpenPictureDialog1: TOpenPictureDialog; 119 121 PageControlContact: TPageControl; … … 125 127 TabSheetGeneral: TTabSheet; 126 128 TabSheetAll: TTabSheet; 129 procedure APhotoClearExecute(Sender: TObject); 127 130 procedure APhotoLoadExecute(Sender: TObject); 128 131 procedure APhotoSaveExecute(Sender: TObject); … … 143 146 procedure TabSheetWorkShow(Sender: TObject); 144 147 private 148 FProfilePhotoActive: Boolean; 149 procedure SetProfilePhotoActive(AValue: Boolean); 150 private 145 151 FContact: TContact; 146 152 FOnNext: TNotifyEvent; 147 153 FOnPrevious: TNotifyEvent; 148 154 FormProperties: TFormProperties; 149 ProfilePhotoActive: Boolean;150 procedure DefaultPhoto;151 155 procedure SetContact(AValue: TContact); 152 156 procedure ReloadAllPropertiesTab; 157 property ProfilePhotoActive: Boolean read FProfilePhotoActive 158 write SetProfilePhotoActive; 153 159 public 154 160 procedure UpdateInterface; … … 178 184 FormProperties.Align := alClient; 179 185 FormProperties.Show; 186 187 // Force to load default profile image 188 ProfilePhotoActive := True; 189 ProfilePhotoActive := False; 190 191 PageControlContact.TabIndex := Core.LastContactTabIndex; 180 192 UpdateInterface; 181 193 end; … … 249 261 Stream.Free; 250 262 end; 263 end else begin 264 PhotoProperty := Contact.GetProperty(cfPhoto); 265 if Assigned(PhotoProperty) then 266 Contact.Properties.Remove(PhotoProperty); 251 267 end; 252 268 … … 278 294 279 295 // Photo 280 ImagePhoto.Picture.Bitmap.Clear;281 296 PhotoProperty := Contact.GetProperty(cfPhoto); 282 297 if Assigned(PhotoProperty) then begin … … 292 307 try 293 308 JpegImage.LoadFromStream(Stream); 309 ImagePhoto.Picture.Bitmap.Clear; 294 310 ImagePhoto.Picture.Bitmap.SetSize(JpegImage.Width, JpegImage.Height); 295 311 ImagePhoto.Picture.Bitmap.Canvas.Draw(0, 0, JpegImage); 296 312 ProfilePhotoActive := True; 297 313 except 298 DefaultPhoto;314 ProfilePhotoActive := False; 299 315 end; 300 316 finally … … 306 322 ProfilePhotoActive := True; 307 323 except 308 DefaultPhoto;324 ProfilePhotoActive := False; 309 325 end; 310 326 end; … … 312 328 Stream.Free; 313 329 end; 314 end else DefaultPhoto;315 end else DefaultPhoto;330 end else ProfilePhotoActive := False; 331 end else ProfilePhotoActive := False; 316 332 end; 317 333 … … 406 422 end; 407 423 408 procedure TFormContact.DefaultPhoto; 409 begin 410 ProfilePhotoActive := False; 411 ImagePhoto.Picture.Assign(Core.GetProfileImage.Picture); 424 procedure TFormContact.SetProfilePhotoActive(AValue: Boolean); 425 begin 426 if FProfilePhotoActive = AValue then Exit; 427 FProfilePhotoActive := AValue; 428 if not FProfilePhotoActive then begin 429 ImagePhoto.Picture.Assign(Core.GetProfileImage.Picture); 430 end; 431 UpdateInterface; 412 432 end; 413 433 … … 428 448 ); 429 449 begin 450 // Hide PageControl to fire TabSheet OnHide event on form close 451 PageControlContact.ActivePage.Hide; 452 453 Core.LastContactTabIndex := PageControlContact.TabIndex; 430 454 Core.PersistentForm1.Save(Self); 431 455 end; … … 440 464 if OpenPictureDialog1.Execute then begin 441 465 ImagePhoto.Picture.LoadFromFile(OpenPictureDialog1.FileName); 466 ProfilePhotoActive := True; 442 467 end; 468 end; 469 470 procedure TFormContact.APhotoClearExecute(Sender: TObject); 471 begin 472 ProfilePhotoActive := False; 443 473 end; 444 474 … … 471 501 begin 472 502 APhotoSave.Enabled := ProfilePhotoActive; 503 APhotoClear.Enabled := ProfilePhotoActive; 473 504 end; 474 505
Note:
See TracChangeset
for help on using the changeset viewer.