⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frxodaceditor.pas

📁 ODAC 6 最新版的﹐網上找了好久才找到﹐不太好找啊﹐大家一起共享
💻 PAS
字号:

{******************************************}
{                                          }
{             FastReport v4.0              }
{      ODAC components design editors      }
{                                          }

// Created by: CoreLab
// E-mail: odac@crlab.com

{                                          }
{******************************************}

unit frxODACEditor;

interface

{$I frx.inc}

implementation

uses
  Windows, Classes, SysUtils, Forms, Dialogs, frxODACComponents, frxCustomDB,
  frxDsgnIntf, frxRes, Ora, frxDACEditor
{$IFDEF Delphi6}
, Variants
{$ENDIF};


type
  TfrxOraDatabaseProperty = class(TfrxComponentProperty)
  public
    function GetValue: String; override;
  end;

  TfrxOraTableNameProperty = class(TfrxTableNameProperty)
  public
    procedure GetValues; override;
  end;

{ TfrxOraDatabaseProperty }

function TfrxOraDatabaseProperty.GetValue: String;
var
  db: TfrxODACDatabase;
begin
  db := TfrxODACDatabase(GetOrdValue);
  if db = nil then begin
    if (ODACComponents <> nil) and (ODACComponents.DefaultDatabase <> nil) then
      Result := ODACComponents.DefaultDatabase.Name
    else
      Result := frxResources.Get('prNotAssigned');
  end
  else
    Result := inherited GetValue;
end;
  
{ TfrxOraTableNameProperty }

procedure TfrxOraTableNameProperty.GetValues;
begin
  inherited;
  
  with TfrxODACTable(Component).Table do
    if Session <> nil then
      Session.GetTableNames(Values, False);
end;

initialization
  frxPropertyEditors.Register(TypeInfo(TfrxODACDatabase), TfrxODACTable, 'Database',
    TfrxOraDatabaseProperty);
  frxPropertyEditors.Register(TypeInfo(TfrxODACDatabase), TfrxODACQuery, 'Database',
    TfrxOraDatabaseProperty);
  frxPropertyEditors.Register(TypeInfo(String), TfrxODACTable, 'TableName',
    TfrxOraTableNameProperty);

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -