Changeset 139 for trunk/Forms/UFormContact.pas
- Timestamp:
- Aug 26, 2022, 8:09:41 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContact.pas
r133 r139 171 171 OpenPictureDialog1: TOpenPictureDialog; 172 172 PageControlContact: TPageControl; 173 PanelNotes: TPanel; 174 PanelQrCode: TPanel; 173 175 PopupMenuQrCode: TPopupMenu; 174 176 PopupMenuPhoto: TPopupMenu; … … 182 184 SpeedButtonWorkEmail: TSpeedButton; 183 185 SpeedButtonWorkWeb: TSpeedButton; 186 Splitter1: TSplitter; 184 187 TabSheetAll: TTabSheet; 185 188 TabSheetChat: TTabSheet; … … 206 209 procedure ImagePhotoClick(Sender: TObject); 207 210 procedure MenuItemSaveQrToFileClick(Sender: TObject); 211 procedure PanelQrCodeResize(Sender: TObject); 208 212 procedure SpeedButtonHomeWebClick(Sender: TObject); 209 213 procedure SpeedButtonAniversaryClick(Sender: TObject); … … 378 382 end; 379 383 384 procedure TFormContact.PanelQrCodeResize(Sender: TObject); 385 begin 386 BarcodeQR1.SetBounds(BarcodeQR1.Left, BarcodeQR1.Top, 387 PanelQrCode.Width - BarcodeQR1.Left * 2, 388 PanelQrCode.Width - BarcodeQR1.Left * 2); 389 end; 390 380 391 procedure TFormContact.SpeedButtonHomeWebClick(Sender: TObject); 381 392 begin … … 563 574 564 575 procedure TFormContact.TabSheetOthersShow(Sender: TObject); 576 var 577 ContactWithoutImages: TContact; 565 578 begin 566 579 MemoNotes.Lines.Text := Contact.Fields[cfNote]; 567 580 BarcodeQR1.Text := Contact.AsString; 581 if BarcodeQR1.ErrorString <> '' then begin 582 ContactWithoutImages := TContact.Create; 583 try 584 ContactWithoutImages.Assign(Contact); 585 ContactWithoutImages.ParentVCard := Contact.ParentVCard; 586 while ContactWithoutImages.HasField(cfPhoto) do 587 ContactWithoutImages.Fields[cfPhoto] := ''; 588 while ContactWithoutImages.HasField(cfLogo) do 589 ContactWithoutImages.Fields[cfLogo] := ''; 590 BarcodeQR1.Text := ContactWithoutImages.AsString; 591 if BarcodeQR1.ErrorString <> '' then begin 592 BarcodeQR1.Text := ''; 593 BarcodeQR1.Visible := False; 594 end else BarcodeQR1.Visible := True; 595 finally 596 ContactWithoutImages.Free; 597 end; 598 end else BarcodeQR1.Visible := True; 568 599 end; 569 600 … … 819 850 820 851 // Set Barcode unpublished properties 821 BarcodeQR1.Anchors := [akTop, ak Right];852 BarcodeQR1.Anchors := [akTop, akLeft]; 822 853 BarcodeQR1.PopupMenu := PopupMenuQrCode; 823 854 end;
Note:
See TracChangeset
for help on using the changeset viewer.