Changeset 75 for trunk/Packages/Common/ApplicationInfo.pas
- Timestamp:
- Jun 4, 2024, 12:22:49 AM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/ApplicationInfo.pas
r74 r75 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 FLicense: string; 17 18 FVersionMajor: Byte; 18 19 FVersionMinor: Byte; … … 31 32 public 32 33 constructor Create(AOwner: TComponent); override; 34 destructor Destroy; override; 33 35 property Version: string read GetVersion; 36 function GetRegistryContext: TRegistryContext; 34 37 published 35 38 property Identification: Byte read FIdentification write FIdentification; … … 44 47 property EmailContact: string read FEmailContact write FEmailContact; 45 48 property AppName: string read FAppName write FAppName; 49 property Description: TTranslateString read FDescription write FDescription; 46 50 property ReleaseDate: TDateTime read FReleaseDate write FReleaseDate; 47 51 property RegistryKey: string read FRegistryKey write FRegistryKey; 48 52 property RegistryRoot: TRegistryRoot read FRegistryRoot write FRegistryRoot; 53 property License: string read FLicense write FLicense; 54 property Icon: TBitmap read FIcon write FIcon; 49 55 end; 50 56 51 57 procedure Register; 52 58 59 53 60 implementation 54 61 55 62 procedure Register; 56 63 begin … … 69 76 constructor TApplicationInfo.Create(AOwner: TComponent); 70 77 begin 71 inherited Create(AOwner);78 inherited; 72 79 FVersionMajor := 1; 73 80 FIdentification := 1; … … 75 82 FRegistryKey := '\Software\' + FAppName; 76 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); 77 96 end; 78 97
Note:
See TracChangeset
for help on using the changeset viewer.