Componentes.Terceros.RemObj.../internal/5.0.23.613/1/RemObjects SDK for Delphi/Source/IDE/uROExtraEditors.pas
david 2824855ea7 - Modificación del paquete RemObjects_Core_D10 para que sea un paquete de runtime/designtime (antes era designtime sólo)
- Recompilación en Delphi10 de todos los paquetes de RO para generar las DCU's en Lib\D10
- Recompilación en Delphi10 de todos los paquetes de DA para generar las DCU's en Lib\D10

git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@9 b6239004-a887-0f4b-9937-50029ccdca16
2007-09-10 14:06:19 +00:00

113 lines
3.0 KiB
ObjectPascal

unit uROExtraEditors;
{----------------------------------------------------------------------------}
{ RemObjects SDK Library - Delphi IDE Integration
{
{ compiler: Delphi 5 and up
{ platform: Win32
{
{ (c)opyright RemObjects Software. all rights reserved.
{
{ Using this code requires a valid license of the RemObjects SDK
{ which can be obtained at http://www.remobjects.com.
{----------------------------------------------------------------------------}
{$IFDEF LINUX}
{$I ../RemObjects.inc}
{$ELSE}
{$I ..\RemObjects.inc}
{$ENDIF LINUX}
interface
uses
Classes, uRODL, uRODynamicRequest,
{$IFDEF DELPHI5}DsgnIntf, DMDesigner;{$ELSE}DesignIntf, DesignEditors;{$ENDIF}
type
{ TRODynRequestServiceNameProperty }
TRODynRequestServiceNameProperty = class(TStringProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetValues(Proc: TGetStrProc); override;
end;
{ TRODynRequestOperationNameProperty }
TRODynRequestOperationNameProperty = class(TStringProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetValues(Proc: TGetStrProc); override;
end;
{ TRODynamicRequestEditor }
TRODynamicRequestEditor = class(TComponentEditor)
public
function GetVerbCount: Integer; override;
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
end;
implementation
uses
SysUtils, Dialogs, uROClientIntf;
{ TRODynRequestServiceNameProperty }
function TRODynRequestServiceNameProperty.GetAttributes: TPropertyAttributes;
begin
result := [paValueList]
end;
procedure TRODynRequestServiceNameProperty.GetValues(Proc: TGetStrProc);
var dynreq : TRODynamicRequest;
i: Integer;
begin
dynreq := TRODynamicRequest(GetComponent(0));
for i := 0 to (dynreq.RODLLibrary.ServiceCount-1) do
Proc(dynreq.RODLLibrary.Services[i].Info.Name);
end;
{ TRODynRequestOperationNameProperty }
function TRODynRequestOperationNameProperty.GetAttributes: TPropertyAttributes;
begin
result := [paValueList]
end;
procedure TRODynRequestOperationNameProperty.GetValues(Proc: TGetStrProc);
var dynreq : TRODynamicRequest;
i: Integer;
svc : TRODLService;
begin
dynreq := TRODynamicRequest(GetComponent(0));
svc := TRODLService(dynreq.RODLLibrary.ItemByName(dynreq.RemoteService.ServiceName));
if (svc=NIL) then Exit;
for i := 0 to (svc.Default.Count-1) do
Proc(svc.Default.Items[i].Info.Name);
end;
{ TRODynamicRequestEditor }
procedure TRODynamicRequestEditor.ExecuteVerb(Index: Integer);
begin
with TRODynamicRequest(GetComponent).Params do begin
Refresh;
MessageDlg(Format('%d parameters have been created. ', [Count]), mtInformation, [mbOK], 0);
end;
end;
function TRODynamicRequestEditor.GetVerb(Index: Integer): string;
begin
result := 'Retrieve parameter list';
end;
function TRODynamicRequestEditor.GetVerbCount: Integer;
begin
result := 1
end;
end.