You've already forked lazarus-ccr
OnGuard: Move TOgAboutProperty code in unit qoAbout0
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8716 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -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.
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user