Ignore:
Timestamp:
Dec 10, 2016, 6:19:37 PM (8 years ago)
Author:
chronos
Message:
  • Modified: About dialog with application icon.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAbout.pas

    r96 r142  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    9   StdCtrls, UApplicationInfo, UCommon;
     9  StdCtrls, ExtCtrls, UApplicationInfo, UCommon, LCLIntf;
    1010
    1111type
     
    1414
    1515  TFormAbout = class(TForm)
    16     ApplicationInfo1: TApplicationInfo;
    1716    ButtonHomePage: TButton;
    1817    ButtonClose: TButton;
     18    Image1: TImage;
    1919    LabelAppName: TLabel;
    2020    LabelDescription: TLabel;
    2121    LabelContent: TLabel;
     22    Panel1: TPanel;
    2223    procedure ButtonHomePageClick(Sender: TObject);
    2324    procedure FormCreate(Sender: TObject);
     
    2627    { private declarations }
    2728  public
    28     { public declarations }
     29    ApplicationInfo: TApplicationInfo;
    2930  end;
    3031
     
    4849procedure TFormAbout.FormShow(Sender: TObject);
    4950begin
    50   LabelAppName.Caption := ApplicationInfo1.AppName;
    51   LabelContent.Caption := SVersion + ': ' + ApplicationInfo1.Version + LineEnding +
    52     SReleaseDate + ': ' + DateToStr(ApplicationInfo1.ReleaseDate) + LineEnding +
    53     SLicense + ': ' + ApplicationInfo1.License;
     51  if Assigned(ApplicationInfo) then begin
     52    LabelAppName.Caption := ApplicationInfo.AppName;
     53    LabelContent.Caption := SVersion + ': ' + ApplicationInfo.Version + LineEnding +
     54      SReleaseDate + ': ' + DateToStr(ApplicationInfo.ReleaseDate) + LineEnding +
     55      SLicense + ': ' + ApplicationInfo.License;
     56  end;
    5457end;
    5558
    5659procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
    5760begin
    58   OpenWebPage(ApplicationInfo1.HomePage);
     61  if Assigned(ApplicationInfo) then
     62    OpenURL(ApplicationInfo.HomePage);
    5963end;
    6064
Note: See TracChangeset for help on using the changeset viewer.