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

📄 wndbreg.pas

📁 万能查询控件WNQuery2.0(带源码),Delphi+ADO功能强大.
💻 PAS
字号:
unit WNDBReg;
interface

uses
  Windows, Messages, AdoConEd, SysUtils, WNADOCQuery,
  DesignEditors, Classes, Graphics, Controls, Forms, Dialogs;

type
  TConnectStringProperty = class;
  TConnectStringProperty = class(TStringProperty)
  private
    { Private declarations }
  protected
    { Protected declarations }
  public
    { Public declarations }
    function GetAttributes:TPropertyAttributes; Override;
    function getvalue:string;override;
    procedure Edit; Override;

  published
    { Published declarations }
  end;

procedure Register;

implementation

function TConnectStringProperty.getvalue:string;
begin
  Result :=GetStrValue;
end;

function TConnectStringProperty.GetAttributes:TPropertyAttributes;
begin
   Result := [paDialog];
end;

procedure TConnectStringProperty.Edit;
var
  ConnectEditor:TConnEditForm;
begin
  ConnectEditor :=TConnEditForm.Create(Application);
  ConnectEditor.UseConnectionString.Checked :=True;
  ConnectEditor.ConnectionString.Text :=GetStrValue;
  ConnectEditor.ShowModal;
  SetStrValue(ConnectEditor.ConnectionString.Text);
  ConnectEditor.Free;
end;

procedure Register;
begin
  RegisterpropertyEditor(typeinfo(string),nil,'ConnectString',TConnectStringProperty);
end;

end.

⌨️ 快捷键说明

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