Changeset 566 for Common/Forms/FormAbout.pas
- Timestamp:
- Jun 29, 2023, 11:23:03 PM (16 months ago)
- Location:
- Common/Forms
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
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.