Changeset 21 for trunk/Packages/Common/ApplicationInfo.pas
- Timestamp:
- Apr 3, 2025, 10:49:00 PM (13 days ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/ApplicationInfo.pas
r20 r21 1 unit UApplicationInfo; 2 3 {$mode delphi} 1 unit ApplicationInfo; 4 2 5 3 interface 6 4 7 5 uses 8 SysUtils, Registry, Classes, Forms, URegistry;6 SysUtils, Classes, Forms, RegistryEx, Controls, Graphics, LCLType; 9 7 10 8 type … … 14 12 TApplicationInfo = class(TComponent) 15 13 private 14 FDescription: TTranslateString; 15 FIcon: TBitmap; 16 16 FIdentification: Byte; 17 17 FLicense: string; … … 32 32 public 33 33 constructor Create(AOwner: TComponent); override; 34 destructor Destroy; override; 34 35 property Version: string read GetVersion; 36 function GetRegistryContext: TRegistryContext; 35 37 published 36 38 property Identification: Byte read FIdentification write FIdentification; … … 45 47 property EmailContact: string read FEmailContact write FEmailContact; 46 48 property AppName: string read FAppName write FAppName; 49 property Description: TTranslateString read FDescription write FDescription; 47 50 property ReleaseDate: TDateTime read FReleaseDate write FReleaseDate; 48 51 property RegistryKey: string read FRegistryKey write FRegistryKey; 49 52 property RegistryRoot: TRegistryRoot read FRegistryRoot write FRegistryRoot; 50 53 property License: string read FLicense write FLicense; 54 property Icon: TBitmap read FIcon write FIcon; 51 55 end; 52 56 53 57 procedure Register; 54 58 59 55 60 implementation 56 61 57 62 procedure Register; 58 63 begin … … 71 76 constructor TApplicationInfo.Create(AOwner: TComponent); 72 77 begin 73 inherited Create(AOwner);78 inherited; 74 79 FVersionMajor := 1; 75 80 FIdentification := 1; … … 77 82 FRegistryKey := '\Software\' + FAppName; 78 83 FRegistryRoot := rrKeyCurrentUser; 84 FIcon := TBitmap.Create; 85 end; 86 87 destructor TApplicationInfo.Destroy; 88 begin 89 FreeAndNil(FIcon); 90 inherited; 91 end; 92 93 function TApplicationInfo.GetRegistryContext: TRegistryContext; 94 begin 95 Result := TRegistryContext.Create(RegistryRoot, RegistryKey); 79 96 end; 80 97
Note:
See TracChangeset
for help on using the changeset viewer.