unit UFormAbout;

{$mode delphi}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
  StdCtrls, ExtCtrls, UApplicationInfo, UCommon;

type

  { TFormAbout }

  TFormAbout = class(TForm)
    ButtonHomePage: TButton;
    ButtonClose: TButton;
    Image1: TImage;
    LabelAppName: TLabel;
    LabelDescription: TLabel;
    LabelContent: TLabel;
    Panel1: TPanel;
    procedure ButtonHomePageClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  FormAbout: TFormAbout;

implementation

{$R *.lfm}

uses
  UCore;

resourcestring
  SVersion = 'Version';
  SReleaseDate = 'Release date';
  SLicense = 'License';

{ TFormAbout }

procedure TFormAbout.FormShow(Sender: TObject);
begin
  with Core do begin
    LabelAppName.Caption := ApplicationInfo.AppName;
    LabelContent.Caption := SVersion + ': ' + ApplicationInfo.Version + LineEnding +
      SReleaseDate + ': ' + DateToStr(ApplicationInfo.ReleaseDate) + LineEnding +
      SLicense + ': ' + ApplicationInfo.License;
  end;
end;

procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
begin
  OpenWebPage(Core.ApplicationInfo.HomePage);
end;

procedure TFormAbout.FormCreate(Sender: TObject);
begin
  Core.CoolTranslator1.TranslateComponentRecursive(Self);
end;

end.

