wndbreg.pas
来自「万能查询控件WNQuery2.0(带源码),Delphi+ADO功能强大.」· PAS 代码 · 共 57 行
PAS
57 行
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 + =
减小字号Ctrl + -
显示快捷键?