Changeset 566 for Common/Forms
- Timestamp:
- Jun 29, 2023, 11:23:03 PM (17 months ago)
- Location:
- Common/Forms
- Files:
-
- 7 added
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
Common/Forms/FormAbout.lfm
r565 r566 1 1 object FormAbout: TFormAbout 2 Left = 10143 Height = 3494 Top = 5775 Width = 6092 Left = 624 3 Height = 402 4 Top = 622 5 Width = 702 6 6 Caption = 'About' 7 ClientHeight = 3498 ClientWidth = 6099 DesignTimePPI = 1 257 ClientHeight = 402 8 ClientWidth = 702 9 DesignTimePPI = 144 10 10 OnShow = FormShow 11 11 Position = poScreenCenter 12 LCLVersion = '2.2. 4.0'12 LCLVersion = '2.2.6.0' 13 13 object LabelDescription: TLabel 14 Left = 2615 Height = 2 216 Top = 1 1717 Width = 55714 Left = 30 15 Height = 26 16 Top = 135 17 Width = 642 18 18 Align = alTop 19 BorderSpacing.Left = 2620 BorderSpacing.Right = 2621 BorderSpacing.Bottom = 2619 BorderSpacing.Left = 30 20 BorderSpacing.Right = 30 21 BorderSpacing.Bottom = 30 22 22 Caption = 'Description' 23 23 ParentColor = False … … 26 26 end 27 27 object LabelContent: TLabel 28 Left = 2629 Height = 2 230 Top = 1 6531 Width = 55728 Left = 30 29 Height = 26 30 Top = 191 31 Width = 642 32 32 Align = alTop 33 BorderSpacing.Around = 2633 BorderSpacing.Around = 30 34 34 Caption = ' ' 35 35 ParentColor = False … … 38 38 object PanelTop: TPanel 39 39 Left = 0 40 Height = 1 1740 Height = 135 41 41 Top = 0 42 Width = 60942 Width = 702 43 43 Align = alTop 44 44 BevelOuter = bvNone 45 ClientHeight = 1 1746 ClientWidth = 60945 ClientHeight = 135 46 ClientWidth = 702 47 47 FullRepaint = False 48 48 ParentFont = False 49 49 TabOrder = 0 50 50 object LabelAppName: TLabel 51 Left = 9452 Height = 7353 Top = 1754 Width = 48951 Left = 108 52 Height = 84 53 Top = 20 54 Width = 564 55 55 Anchors = [akTop, akLeft, akRight] 56 56 AutoSize = False 57 BorderSpacing.Around = 2657 BorderSpacing.Around = 30 58 58 Caption = 'Title' 59 Font.Height = - 5259 Font.Height = -60 60 60 ParentColor = False 61 61 ParentFont = False … … 63 63 end 64 64 object ImageLogo: TImage 65 Left = 2 166 Height = 6467 Top = 2668 Width = 6265 Left = 24 66 Height = 74 67 Top = 30 68 Width = 71 69 69 Proportional = True 70 70 Stretch = True … … 73 73 object PanelButtons: TPanel 74 74 Left = 0 75 Height = 6576 Top = 28477 Width = 60975 Height = 75 76 Top = 327 77 Width = 702 78 78 Align = alBottom 79 79 BevelOuter = bvNone 80 ClientHeight = 6581 ClientWidth = 60980 ClientHeight = 75 81 ClientWidth = 702 82 82 TabOrder = 1 83 83 object ButtonHomePage: TButton 84 Left = 2 185 Height = 3 386 Top = 2 187 Width = 2 2984 Left = 24 85 Height = 38 86 Top = 24 87 Width = 264 88 88 Anchors = [akLeft, akBottom] 89 89 Caption = 'Home page' … … 93 93 end 94 94 object ButtonClose: TButton 95 Left = 46196 Height = 3 397 Top = 2 198 Width = 1 2295 Left = 531 96 Height = 38 97 Top = 24 98 Width = 141 99 99 Anchors = [akRight, akBottom] 100 100 Caption = 'Close' -
Common/Forms/FormAbout.pas
r565 r566 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus, 7 StdCtrls, ExtCtrls, ApplicationInfo, Common, Translator, Theme ;7 StdCtrls, ExtCtrls, ApplicationInfo, Common, Translator, Theme, FormEx; 8 8 9 9 type 10 10 { TFormAbout } 11 11 12 TFormAbout = class(TForm )12 TFormAbout = class(TFormEx) 13 13 ButtonClose: TButton; 14 14 ButtonHomePage: TButton; … … 21 21 procedure ButtonHomePageClick(Sender: TObject); 22 22 procedure FormShow(Sender: TObject); 23 private 24 FApplicationInfo: TApplicationInfo; 23 25 public 24 AboutDialog: TObject; //TAboutDialog25 26 procedure UpdateInterface; 27 property ApplicationInfo: TApplicationInfo read FApplicationInfo write 28 FApplicationInfo; 26 29 end; 27 30 … … 30 33 31 34 {$R *.lfm} 32 33 uses34 AboutDialog;35 35 36 36 resourcestring … … 43 43 procedure TFormAbout.FormShow(Sender: TObject); 44 44 begin 45 if Assigned(AboutDialog) then 46 with TAboutDialog(AboutDialog) do begin 47 if Assigned(Translator) then 48 Translator.TranslateComponentRecursive(Self); 49 if Assigned(ThemeManager) then 50 ThemeManager.UseTheme(Self); 51 52 if Assigned(ApplicationInfo) then 53 with ApplicationInfo do begin 54 LabelAppName.Caption := AppName; 55 LabelContent.Caption := SVersion + ': ' + Version + LineEnding + 56 SReleaseDate + ': ' + DateToStr(ReleaseDate) + LineEnding + 57 SLicense + ': ' + License; 58 LabelDescription.Caption := Description; 59 ImageLogo.Picture.Bitmap.Assign(Icon); 60 end; 45 if Assigned(ApplicationInfo) then 46 with ApplicationInfo do begin 47 LabelAppName.Caption := AppName; 48 LabelContent.Caption := SVersion + ': ' + Version + LineEnding + 49 SReleaseDate + ': ' + DateToStr(ReleaseDate) + LineEnding + 50 SLicense + ': ' + License; 51 LabelDescription.Caption := Description; 52 ImageLogo.Picture.Bitmap.Assign(Icon); 61 53 end; 62 54 UpdateInterface; … … 65 57 procedure TFormAbout.UpdateInterface; 66 58 begin 67 ButtonHomePage.Enabled := Assigned(AboutDialog) and 68 Assigned(TAboutDialog(AboutDialog).ApplicationInfo); 59 ButtonHomePage.Enabled := Assigned(ApplicationInfo); 69 60 end; 70 61 71 62 procedure TFormAbout.ButtonHomePageClick(Sender: TObject); 72 63 begin 73 OpenWebPage( TAboutDialog(AboutDialog).ApplicationInfo.HomePage);64 OpenWebPage(ApplicationInfo.HomePage); 74 65 end; 75 66
Note:
See TracChangeset
for help on using the changeset viewer.