Changeset 85 for trunk/Packages/Common/Forms/FormAbout.pas
- Timestamp:
- Jun 7, 2024, 11:59:43 AM (5 months ago)
- Location:
- trunk/Packages/Common/Forms
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
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.