Changeset 149 for trunk/Forms/FormContact.pas
- Timestamp:
- Jun 5, 2023, 8:45:38 PM (18 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormContact.pas
r148 r149 1 unit UFormContact;1 unit FormContact; 2 2 3 3 interface … … 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 7 7 ComCtrls, ActnList, Menus, ExtCtrls, ExtDlgs, Buttons, VCard, LCLIntf, 8 UFormProperties, DateUtils, {$IFDEF LCLGTK2}Gtk2Globals, {$ENDIF}ContactImage,8 FormProperties, DateUtils, {$IFDEF LCLGTK2}Gtk2Globals, {$ENDIF}ContactImage, 9 9 ubarcodes; 10 10 … … 248 248 end; 249 249 250 var251 FormContact: TFormContact;252 253 250 254 251 implementation … … 257 254 258 255 uses 259 UCore, Common, UFormImage, UFormNameDetails, DataFile;256 Core, Common, FormImage, FormNameDetails, DataFile; 260 257 261 258 resourcestring … … 328 325 if Visible then LastMouse.WinControl := PageControlContact.ActivePage; 329 326 {$ENDIF} 330 Core. PersistentForm1.Load(Self);327 Core.Core.PersistentForm1.Load(Self); 331 328 PhotoChange(nil); 332 329 … … 363 360 SavePictureDialog1.FilterIndex := 2; 364 361 SavePictureDialog1.DefaultExt := '.png'; 365 if Core. LastQrCodeFileName = '' then366 Core. LastQrCodeFileName := 'QR code.png';367 SavePictureDialog1.InitialDir := ExtractFileDir(Core. LastQrCodeFileName);368 SavePictureDialog1.FileName := ExtractFileName(Core. LastQrCodeFileName);362 if Core.Core.LastQrCodeFileName = '' then 363 Core.Core.LastQrCodeFileName := 'QR code.png'; 364 SavePictureDialog1.InitialDir := ExtractFileDir(Core.Core.LastQrCodeFileName); 365 SavePictureDialog1.FileName := ExtractFileName(Core.Core.LastQrCodeFileName); 369 366 if SavePictureDialog1.Execute then begin 370 367 F := LowerCase(ExtractFileExt(SavePictureDialog1.FileName)); … … 377 374 else if (F = '.eps') or (F = '.ps') then BarcodeQR1.SaveToEpsFile(SavePictureDialog1.FileName) 378 375 else raise Exception.Create(SImageTypeNotSupported); 379 Core. LastQrCodeFileName := SavePictureDialog1.FileName;376 Core.Core.LastQrCodeFileName := SavePictureDialog1.FileName; 380 377 end; 381 378 end; … … 674 671 if FPhoto.Used and (FPhoto.Url = '') then 675 672 ImagePhoto.Picture.Bitmap.Assign(FPhoto.Bitmap) 676 else ImagePhoto.Picture.Assign(Core. GetProfileImage.Picture);673 else ImagePhoto.Picture.Assign(Core.Core.GetProfileImage.Picture); 677 674 UpdateInterface; 678 675 end; … … 697 694 PageControlContact.ActivePage.Hide; 698 695 699 Core. LastContactTabIndex := PageControlContact.TabIndex;700 Core. PersistentForm1.Save(Self);696 Core.Core.LastContactTabIndex := PageControlContact.TabIndex; 697 Core.Core.PersistentForm1.Save(Self); 701 698 end; 702 699 … … 709 706 procedure TFormContact.APhotoLoadExecute(Sender: TObject); 710 707 begin 711 OpenPictureDialog1.InitialDir := ExtractFileDir(Core. LastPhotoFileName);712 OpenPictureDialog1.FileName := ExtractFileName(Core. LastPhotoFileName);708 OpenPictureDialog1.InitialDir := ExtractFileDir(Core.Core.LastPhotoFileName); 709 OpenPictureDialog1.FileName := ExtractFileName(Core.Core.LastPhotoFileName); 713 710 if OpenPictureDialog1.Execute then begin 714 711 FPhoto.LoadFromFile(OpenPictureDialog1.FileName); 715 Core. LastPhotoFileName := OpenPictureDialog1.FileName;712 Core.Core.LastPhotoFileName := OpenPictureDialog1.FileName; 716 713 end; 717 714 end; … … 724 721 procedure TFormContact.APhotoSaveExecute(Sender: TObject); 725 722 begin 726 SavePictureDialog1.InitialDir := ExtractFileDir(Core. LastPhotoFileName);727 SavePictureDialog1.FileName := ExtractFileName(Core. LastPhotoFileName);723 SavePictureDialog1.InitialDir := ExtractFileDir(Core.Core.LastPhotoFileName); 724 SavePictureDialog1.FileName := ExtractFileName(Core.Core.LastPhotoFileName); 728 725 if SavePictureDialog1.Execute then begin 729 726 ImagePhoto.Picture.SaveToFile(SavePictureDialog1.FileName); 730 Core. LastPhotoFileName := SavePictureDialog1.FileName;727 Core.Core.LastPhotoFileName := SavePictureDialog1.FileName; 731 728 end; 732 729 end; … … 762 759 if EditHomeAddressCountry.Text <> '' then Address := Address + ' ' + EditHomeAddressCountry.Text; 763 760 if Trim(Address) <> '' then 764 OpenURL(Core. MapUrl + URLEncode(Trim(Address)));761 OpenURL(Core.Core.MapUrl + URLEncode(Trim(Address))); 765 762 end; 766 763 … … 814 811 if EditWorkAddressCountry.Text <> '' then Address := Address + ' ' + EditWorkAddressCountry.Text; 815 812 if Trim(Address) <> '' then 816 OpenURL(Core. MapUrl + URLEncode(Trim(Address)));813 OpenURL(Core.Core.MapUrl + URLEncode(Trim(Address))); 817 814 end; 818 815 … … 840 837 procedure TFormContact.FormCreate(Sender: TObject); 841 838 begin 842 Core. Translator.TranslateComponentRecursive(Self);843 Core. ThemeManager1.UseTheme(Self);839 Core.Core.Translator.TranslateComponentRecursive(Self); 840 Core.Core.ThemeManager1.UseTheme(Self); 844 841 FContact := nil; 845 842 FormProperties := TFormProperties.Create(nil); … … 852 849 BarcodeQR1.PopupMenu := PopupMenuQrCode; 853 850 854 PageControlContact.TabIndex := Core. LastContactTabIndex;851 PageControlContact.TabIndex := Core.Core.LastContactTabIndex; 855 852 end; 856 853
Note:
See TracChangeset
for help on using the changeset viewer.