Ignore:
Timestamp:
Jun 30, 2023, 10:01:24 PM (17 months ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
Location:
trunk/Packages/Common/Forms
Files:
7 added
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Forms/FormAbout.lfm

    r161 r162  
    11object FormAbout: TFormAbout
    2   Left = 1014
    3   Height = 349
    4   Top = 577
    5   Width = 609
     2  Left = 624
     3  Height = 402
     4  Top = 622
     5  Width = 702
    66  Caption = 'About'
    7   ClientHeight = 349
    8   ClientWidth = 609
    9   DesignTimePPI = 125
     7  ClientHeight = 402
     8  ClientWidth = 702
     9  DesignTimePPI = 144
    1010  OnShow = FormShow
    1111  Position = poScreenCenter
    12   LCLVersion = '2.2.4.0'
     12  LCLVersion = '2.2.6.0'
    1313  object LabelDescription: TLabel
    14     Left = 26
    15     Height = 22
    16     Top = 117
    17     Width = 557
     14    Left = 30
     15    Height = 26
     16    Top = 135
     17    Width = 642
    1818    Align = alTop
    19     BorderSpacing.Left = 26
    20     BorderSpacing.Right = 26
    21     BorderSpacing.Bottom = 26
     19    BorderSpacing.Left = 30
     20    BorderSpacing.Right = 30
     21    BorderSpacing.Bottom = 30
    2222    Caption = 'Description'
    2323    ParentColor = False
     
    2626  end
    2727  object LabelContent: TLabel
    28     Left = 26
    29     Height = 22
    30     Top = 165
    31     Width = 557
     28    Left = 30
     29    Height = 26
     30    Top = 191
     31    Width = 642
    3232    Align = alTop
    33     BorderSpacing.Around = 26
     33    BorderSpacing.Around = 30
    3434    Caption = '   '
    3535    ParentColor = False
     
    3838  object PanelTop: TPanel
    3939    Left = 0
    40     Height = 117
     40    Height = 135
    4141    Top = 0
    42     Width = 609
     42    Width = 702
    4343    Align = alTop
    4444    BevelOuter = bvNone
    45     ClientHeight = 117
    46     ClientWidth = 609
     45    ClientHeight = 135
     46    ClientWidth = 702
    4747    FullRepaint = False
    4848    ParentFont = False
    4949    TabOrder = 0
    5050    object LabelAppName: TLabel
    51       Left = 94
    52       Height = 73
    53       Top = 17
    54       Width = 489
     51      Left = 108
     52      Height = 84
     53      Top = 20
     54      Width = 564
    5555      Anchors = [akTop, akLeft, akRight]
    5656      AutoSize = False
    57       BorderSpacing.Around = 26
     57      BorderSpacing.Around = 30
    5858      Caption = 'Title'
    59       Font.Height = -52
     59      Font.Height = -60
    6060      ParentColor = False
    6161      ParentFont = False
     
    6363    end
    6464    object ImageLogo: TImage
    65       Left = 21
    66       Height = 64
    67       Top = 26
    68       Width = 62
     65      Left = 24
     66      Height = 74
     67      Top = 30
     68      Width = 71
    6969      Proportional = True
    7070      Stretch = True
     
    7373  object PanelButtons: TPanel
    7474    Left = 0
    75     Height = 65
    76     Top = 284
    77     Width = 609
     75    Height = 75
     76    Top = 327
     77    Width = 702
    7878    Align = alBottom
    7979    BevelOuter = bvNone
    80     ClientHeight = 65
    81     ClientWidth = 609
     80    ClientHeight = 75
     81    ClientWidth = 702
    8282    TabOrder = 1
    8383    object ButtonHomePage: TButton
    84       Left = 21
    85       Height = 33
    86       Top = 21
    87       Width = 229
     84      Left = 24
     85      Height = 38
     86      Top = 24
     87      Width = 264
    8888      Anchors = [akLeft, akBottom]
    8989      Caption = 'Home page'
     
    9393    end
    9494    object ButtonClose: TButton
    95       Left = 461
    96       Height = 33
    97       Top = 21
    98       Width = 122
     95      Left = 531
     96      Height = 38
     97      Top = 24
     98      Width = 141
    9999      Anchors = [akRight, akBottom]
    100100      Caption = 'Close'
  • trunk/Packages/Common/Forms/FormAbout.pas

    r161 r162  
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    7   StdCtrls, ExtCtrls, ApplicationInfo, Common, Translator, Theme;
     7  StdCtrls, ExtCtrls, ApplicationInfo, Common, FormEx;
    88
    99type
    1010  { TFormAbout }
    1111
    12   TFormAbout = class(TForm)
     12  TFormAbout = class(TFormEx)
    1313    ButtonClose: TButton;
    1414    ButtonHomePage: TButton;
     
    2121    procedure ButtonHomePageClick(Sender: TObject);
    2222    procedure FormShow(Sender: TObject);
     23  private
     24    FApplicationInfo: TApplicationInfo;
    2325  public
    24     AboutDialog: TObject; //TAboutDialog
    2526    procedure UpdateInterface;
     27    property ApplicationInfo: TApplicationInfo read FApplicationInfo write
     28      FApplicationInfo;
    2629  end;
    2730
     
    3033
    3134{$R *.lfm}
    32 
    33 uses
    34   AboutDialog;
    3535
    3636resourcestring
     
    4343procedure TFormAbout.FormShow(Sender: TObject);
    4444begin
    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);
    6153  end;
    6254  UpdateInterface;
     
    6557procedure TFormAbout.UpdateInterface;
    6658begin
    67   ButtonHomePage.Enabled := Assigned(AboutDialog) and
    68     Assigned(TAboutDialog(AboutDialog).ApplicationInfo);
     59  ButtonHomePage.Enabled := Assigned(ApplicationInfo);
    6960end;
    7061
    7162procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
    7263begin
    73   OpenWebPage(TAboutDialog(AboutDialog).ApplicationInfo.HomePage);
     64  OpenWebPage(ApplicationInfo.HomePage);
    7465end;
    7566
Note: See TracChangeset for help on using the changeset viewer.