unit ufuncional.gateway.register;

{
  VER150 - Delphi 7
  VER160 - Delphi 8
  VER170 - Delphi 2005
  VER180 - Delphi 2006
  VER180 - Delphi 2007
  VER185 - Delphi 2007
  VER200 - Delphi 2009

  VER210 - Delphi 2010
  VER220 - Delphi XE
  VER230 - Delphi XE2
}

interface

uses
  ufuncional.gateway.sales, SysUtils, Classes, uform.funcionalgateway.About.Box,
{$IFDEF VER150}
  dsgnintf
{$ELSE}
  DesignIntf, DesignEditors
{$ENDIF};

Type
  { *** Implementação da propriedade *** }
  TAboutProp = Class(TStringProperty)
    function GetAttributes: TPropertyAttributes; override;
    procedure Edit; override;
  End;

Procedure register;

implementation

Procedure register;
begin
  RegisterComponents('PBMS', [TpbmFuncionalGatewaySales]);
  RegisterPropertyEditor(TypeInfo(String), TpbmFuncionalGatewaySales, 'About', TAboutProp);
end;

{ ====================================TAboutProp================================ }

procedure TAboutProp.Edit;
var
  formFuncionalGatewayAbout: TformFuncionalGatewayAbout;
begin
  try
    formFuncionalGatewayAbout := TformFuncionalGatewayAbout.Create(nil);
    formFuncionalGatewayAbout.ShowModal();
  finally
    freeandnil(formFuncionalGatewayAbout);
  end;
end;

function TAboutProp.GetAttributes: TPropertyAttributes;
begin
  Result := [paDialog, paReadOnly];
end;

end.
