Changeset 85 for trunk/Packages/Common/Forms
- Timestamp:
- Jun 7, 2024, 11:59:43 AM (7 months ago)
- Location:
- trunk/Packages/Common/Forms
- Files:
-
- 7 added
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Forms/FormAbout.lfm
r84 r85 1 1 object FormAbout: TFormAbout 2 Left = 10142 Left = 624 3 3 Height = 402 4 Top = 5774 Top = 622 5 5 Width = 702 6 6 Caption = 'About' … … 8 8 ClientWidth = 702 9 9 DesignTimePPI = 144 10 OnCreate = FormCreate11 10 OnShow = FormShow 12 11 Position = poScreenCenter 13 LCLVersion = '2. 0.10.0'12 LCLVersion = '2.2.6.0' 14 13 object LabelDescription: TLabel 15 14 Left = 30 16 Height = 2 415 Height = 26 17 16 Top = 135 18 17 Width = 642 … … 28 27 object LabelContent: TLabel 29 28 Left = 30 30 Height = 2 431 Top = 1 8929 Height = 26 30 Top = 191 32 31 Width = 642 33 32 Align = alTop … … 67 66 Height = 74 68 67 Top = 30 69 Width = 7 268 Width = 71 70 69 Proportional = True 71 70 Stretch = True … … 94 93 end 95 94 object ButtonClose: TButton 96 Left = 53 295 Left = 531 97 96 Height = 38 98 97 Top = 24 99 Width = 14 098 Width = 141 100 99 Anchors = [akRight, akBottom] 101 100 Caption = 'Close' -
trunk/Packages/Common/Forms/FormAbout.pas
r84 r85 1 unit UFormAbout; 2 3 {$mode delphi} 1 unit FormAbout; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus, 9 StdCtrls, ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme;7 StdCtrls, ExtCtrls, ApplicationInfo, Common, FormEx; 10 8 11 9 type 12 10 { TFormAbout } 13 11 14 TFormAbout = class(TForm )12 TFormAbout = class(TFormEx) 15 13 ButtonClose: TButton; 16 14 ButtonHomePage: TButton; … … 22 20 PanelButtons: TPanel; 23 21 procedure ButtonHomePageClick(Sender: TObject); 24 procedure FormCreate(Sender: TObject);25 22 procedure FormShow(Sender: TObject); 26 23 private 27 { private declarations }24 FApplicationInfo: TApplicationInfo; 28 25 public 29 AboutDialog: TObject; //TAboutDialog30 26 procedure UpdateInterface; 27 property ApplicationInfo: TApplicationInfo read FApplicationInfo write 28 FApplicationInfo; 31 29 end; 32 30 … … 35 33 36 34 {$R *.lfm} 37 38 uses39 UAboutDialog;40 35 41 36 resourcestring … … 48 43 procedure TFormAbout.FormShow(Sender: TObject); 49 44 begin 50 if Assigned(AboutDialog) then 51 with TAboutDialog(AboutDialog) do begin 52 if Assigned(CoolTranslator) then 53 CoolTranslator.TranslateComponentRecursive(Self); 54 if Assigned(ThemeManager) then 55 ThemeManager.UseTheme(Self); 56 57 if Assigned(ApplicationInfo) then 58 with ApplicationInfo do begin 59 LabelAppName.Caption := AppName; 60 LabelContent.Caption := SVersion + ': ' + Version + LineEnding + 61 SReleaseDate + ': ' + DateToStr(ReleaseDate) + LineEnding + 62 SLicense + ': ' + License; 63 LabelDescription.Caption := Description; 64 ImageLogo.Picture.Bitmap.Assign(Icon); 65 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); 66 53 end; 67 54 UpdateInterface; … … 70 57 procedure TFormAbout.UpdateInterface; 71 58 begin 72 ButtonHomePage.Enabled := Assigned(AboutDialog) and 73 Assigned(TAboutDialog(AboutDialog).ApplicationInfo); 59 ButtonHomePage.Enabled := Assigned(ApplicationInfo); 74 60 end; 75 61 76 62 procedure TFormAbout.ButtonHomePageClick(Sender: TObject); 77 63 begin 78 OpenWebPage(TAboutDialog(AboutDialog).ApplicationInfo.HomePage); 79 end; 80 81 procedure TFormAbout.FormCreate(Sender: TObject); 82 begin 64 OpenWebPage(ApplicationInfo.HomePage); 83 65 end; 84 66 85 67 end. 86
Note:
See TracChangeset
for help on using the changeset viewer.