docieditors.pas
来自「delphi通过OCI访问ORACLE」· PAS 代码 · 共 58 行
PAS
58 行
unit dOCIEditors;
{$INCLUDE dOCI.inc}
interface
uses
Classes
{$IFDEF D4} ,Dsgnintf {$ENDIF}
{$IFDEF D5} ,Dsgnintf {$ENDIF}
{$IFDEF D6} ,DesignIntf, DesignEditors {$ENDIF}
{$IFDEF D7} ,DesignIntf, DesignEditors {$ENDIF}
;
type
TTNSNamesProperty = class(TStringProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetValueList(List: TStrings); virtual;
procedure GetValues(Proc: TGetStrProc); override;
end;
implementation
uses OraDB;
{ TTNSNamesProperty }
function TTNSNamesProperty.GetAttributes: TPropertyAttributes;
begin
Result := [paValueList, paSortList{, paMultiSelect}];
end;
procedure TTNSNamesProperty.GetValues(Proc: TGetStrProc);
var
I: Integer;
Values: TStringList;
begin
Values := TStringList.Create;
try
GetValueList(Values);
for I := 0 to Values.Count - 1 do Proc(Values[I]);
finally
Values.Free;
end;
end;
procedure TTNSNamesProperty.GetValueList(List: TStrings);
var DB:TOraDB;
begin
DB:=GetComponent(0) as TOraDB;
if DB<>nil then DB.GetServicesList(List);
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?