close Warning: Can't synchronize with repository "(default)" (No changeset 184 in the repository). Look in the Trac log for more information.

Ignore:
Timestamp:
Dec 10, 2016, 3:52:26 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: In Debug mode also check executed classes references.
  • Modified: Better About dialog.
  • Modified: About and Help dialogs are created in time when they are shown.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAbout.pas

    r47 r115  
    11unit UFormAbout;
    22
    3 {$MODE Delphi}
     3{$mode delphi}
    44
    55interface
    66
    77uses
    8   SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
    9   Buttons, ExtCtrls;
     8  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
     9  StdCtrls, ExtCtrls, UApplicationInfo, UCommon;
    1010
    1111type
     
    1414
    1515  TFormAbout = class(TForm)
     16    ButtonHomePage: TButton;
     17    ButtonClose: TButton;
     18    Image1: TImage;
     19    LabelAppName: TLabel;
     20    LabelDescription: TLabel;
     21    LabelContent: TLabel;
    1622    Panel1: TPanel;
    17     OKButton: TButton;
    18     Memo1: TMemo;
    19     procedure OKButtonClick(Sender: TObject);
     23    procedure ButtonHomePageClick(Sender: TObject);
     24    procedure FormCreate(Sender: TObject);
    2025    procedure FormShow(Sender: TObject);
    2126  private
    22     { Private declarations }
     27    { private declarations }
    2328  public
    24     { Public declarations }
     29    { public declarations }
    2530  end;
    2631
     
    3641
    3742resourcestring
    38   SApplicationName = 'Application name';
    3943  SVersion = 'Version';
    4044  SReleaseDate = 'Release date';
    41   SManufacturer = 'Company';
    42   SEmail = 'E-mail';
    43   SHomePage = 'Homepage';
     45  SLicense = 'License';
     46
     47{ TFormAbout }
    4448
    4549procedure TFormAbout.FormShow(Sender: TObject);
    4650begin
    47   with Memo1, Lines, Core.ApplicationInfo do begin
    48     BeginUpdate;
    49     Clear;
    50     Add(SApplicationName + ': ' + AppName);
    51     Add(SVersion + ': ' + Version);
    52     Add(SReleaseDate + ': ' + DateToStr(ReleaseDate));
    53     Add(SHomePage + ': ' + HomePage);
    54     Add(SManufacturer + ': ' + CompanyName);
    55     Add(SEmail + ': ' + EmailContact);
    56     EndUpdate;
     51  with Core do begin
     52    LabelAppName.Caption := ApplicationInfo.AppName;
     53    LabelContent.Caption := SVersion + ': ' + ApplicationInfo.Version + LineEnding +
     54      SReleaseDate + ': ' + DateToStr(ApplicationInfo.ReleaseDate) + LineEnding +
     55      SLicense + ': ' + ApplicationInfo.License;
    5756  end;
    58   FocusControl(OKButton);
    5957end;
    6058
    61 procedure TFormAbout.OKButtonClick(Sender: TObject);
     59procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
    6260begin
    63   Close;
     61  OpenWebPage(Core.ApplicationInfo.HomePage);
     62end;
     63
     64procedure TFormAbout.FormCreate(Sender: TObject);
     65begin
     66  Core.CoolTranslator1.TranslateComponentRecursive(Self);
    6467end;
    6568
    6669end.
    67  
     70
Note: See TracChangeset for help on using the changeset viewer.