diff --git a/components/onguard/source/ogreg.pas b/components/onguard/source/ogreg.pas index 5bb85f2a2..ce50efac4 100644 --- a/components/onguard/source/ogreg.pas +++ b/components/onguard/source/ogreg.pas @@ -34,7 +34,6 @@ {$I ONGUARD.INC} - unit ogreg; {AH.01} @@ -59,21 +58,18 @@ uses LazarusPackageIntf, LResources; +{------------------------------------------------------------------------------- + TOgCodeGenEditor + component editor for TogCodeBase components +-------------------------------------------------------------------------------} type - {component editor for TogCodeBase components} TOgCodeGenEditor = class({TDefaultEditor}TDefaultComponentEditor) public - procedure ExecuteVerb(Index : Integer); - override; - function GetVerb(Index : Integer) : string; - override; - function GetVerbCount : Integer; - override; + procedure ExecuteVerb(Index: Integer); override; + function GetVerb(Index: Integer): string; override; + function GetVerbCount: Integer; override; end; - -{*** TOgCodeGenEditor ***} - procedure TOgCodeGenEditor.ExecuteVerb(Index : Integer); begin if Index = 0 then begin @@ -128,7 +124,37 @@ begin end; -{component registration} +{------------------------------------------------------------------------------- + TOgAboutProperty +-------------------------------------------------------------------------------} +type + TOgAboutProperty = class(TStringProperty) + public + function GetAttributes: TPropertyAttributes; override; + procedure Edit; override; + end; + +function TOgAboutProperty.GetAttributes: TPropertyAttributes; +begin + Result := [paDialog, paReadOnly]; +end; + +procedure TOgAboutProperty.Edit; +begin + with TOgAboutForm.Create(Application) do begin + try + ShowModal; + finally + Free; + end; + end; +end; + + +{------------------------------------------------------------------------------- + Component registration +-------------------------------------------------------------------------------} + procedure Register; begin RegisterComponentEditor(TOgCodeBase, TOgCodeGenEditor); @@ -137,20 +163,20 @@ begin TypeInfo(string), TOgMakeKeys, 'KeyFileName', TOgFileNameProperty); RegisterPropertyEditor( TypeInfo(string), TOgMakeCodes, 'KeyFileName', TOgFileNameProperty); -{ RegisterPropertyEditor( } {!!.09} -{ TypeInfo(string), TOgCodeBase, 'Expires', TOgExpiresProperty);} {!!.09} +{ RegisterPropertyEditor( } +{ TypeInfo(string), TOgCodeBase, 'Expires', TOgExpiresProperty);} RegisterPropertyEditor( TypeInfo(string), TOgCodeBase, 'Code', TOgCodeProperty); RegisterPropertyEditor( TypeInfo(string), TOgCodeBase, 'Modifier', TOgModifierProperty); RegisterPropertyEditor( - TypeInfo(string), TOgCodeBase, 'About', TOgAboutProperty); {!!.08} + TypeInfo(string), TOgCodeBase, 'About', TOgAboutProperty); RegisterPropertyEditor( - TypeInfo(string), TOgProtectExe, 'About', TOgAboutProperty); {!!.08} + TypeInfo(string), TOgProtectExe, 'About', TOgAboutProperty); RegisterPropertyEditor( - TypeInfo(string), TOgMakeCodes, 'About', TOgAboutProperty); {!!.08} + TypeInfo(string), TOgMakeCodes, 'About', TOgAboutProperty); RegisterPropertyEditor( - TypeInfo(string), TOgMakeKeys, 'About', TOgAboutProperty); {!!.08} + TypeInfo(string), TOgMakeKeys, 'About', TOgAboutProperty); RegisterComponents('OnGuard', [ TOgMakeKeys, @@ -166,12 +192,9 @@ begin end; - {$IFDEF FPC} initialization {$I ogreg.lrs} {$ENDIF} end. - -end. diff --git a/components/onguard/source/qogabout0.pas b/components/onguard/source/qogabout0.pas index 0ca9f6ff3..c67ccd1e7 100644 --- a/components/onguard/source/qogabout0.pas +++ b/components/onguard/source/qogabout0.pas @@ -43,12 +43,7 @@ uses LCLIntf, SysUtils, Classes, Graphics, Controls,Buttons, Forms, Dialogs, StdCtrls, ExtCtrls, - ogutil, - ComponentEditors, - PropEdits; - - - + ogutil; type @@ -92,42 +87,13 @@ type { Public declarations } end; - TOgAboutProperty = class(TStringProperty) {!!.08} - public - function GetAttributes: TPropertyAttributes; - override; - procedure Edit; - override; - end; implementation uses LResources; - - - -{*** TOgVersionProperty ***} - -function TOgAboutProperty.GetAttributes: TPropertyAttributes; {!!.08} -begin - Result := [paDialog, paReadOnly]; -end; - -procedure TOgAboutProperty.Edit; {!!.08} -begin - with TOgAboutForm.Create(Application) do begin - try - ShowModal; - finally - Free; - end; - end; -end; - - -{*** TEsAboutForm ***} +{*** TOgAboutForm ***} procedure TOgAboutForm.btnOKClick(Sender: TObject); begin