Ignore:
Timestamp:
Jun 4, 2024, 12:22:49 AM (5 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from unit names.
  • Modified: Updated Common package.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/ApplicationInfo.pas

    r74 r75  
    1 unit UApplicationInfo;
    2 
    3 {$mode delphi}
     1unit ApplicationInfo;
    42
    53interface
    64
    75uses
    8   SysUtils, Registry, Classes, Forms, URegistry;
     6  SysUtils, Classes, Forms, RegistryEx, Controls, Graphics, LCLType;
    97
    108type
     
    1412  TApplicationInfo = class(TComponent)
    1513  private
     14    FDescription: TTranslateString;
     15    FIcon: TBitmap;
    1616    FIdentification: Byte;
     17    FLicense: string;
    1718    FVersionMajor: Byte;
    1819    FVersionMinor: Byte;
     
    3132  public
    3233    constructor Create(AOwner: TComponent); override;
     34    destructor Destroy; override;
    3335    property Version: string read GetVersion;
     36    function GetRegistryContext: TRegistryContext;
    3437  published
    3538    property Identification: Byte read FIdentification write FIdentification;
     
    4447    property EmailContact: string read FEmailContact write FEmailContact;
    4548    property AppName: string read FAppName write FAppName;
     49    property Description: TTranslateString read FDescription write FDescription;
    4650    property ReleaseDate: TDateTime read FReleaseDate write FReleaseDate;
    4751    property RegistryKey: string read FRegistryKey write FRegistryKey;
    4852    property RegistryRoot: TRegistryRoot read FRegistryRoot write FRegistryRoot;
     53    property License: string read FLicense write FLicense;
     54    property Icon: TBitmap read FIcon write FIcon;
    4955  end;
    5056
    5157procedure Register;
    5258
     59
    5360implementation
    54                        
     61
    5562procedure Register;
    5663begin
     
    6976constructor TApplicationInfo.Create(AOwner: TComponent);
    7077begin
    71   inherited Create(AOwner);
     78  inherited;
    7279  FVersionMajor := 1;
    7380  FIdentification := 1;
     
    7582  FRegistryKey := '\Software\' + FAppName;
    7683  FRegistryRoot := rrKeyCurrentUser;
     84  FIcon := TBitmap.Create;
     85end;
     86
     87destructor TApplicationInfo.Destroy;
     88begin
     89  FreeAndNil(FIcon);
     90  inherited;
     91end;
     92
     93function TApplicationInfo.GetRegistryContext: TRegistryContext;
     94begin
     95  Result := TRegistryContext.Create(RegistryRoot, RegistryKey);
    7796end;
    7897
Note: See TracChangeset for help on using the changeset viewer.