📄 untvarselect.pas
字号:
unit untVarSelect;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, untBaseDialog, Grids, DBGrids, StdCtrls, ExtCtrls, Buttons, jpeg,
DB, ADODB;
type
TfrmVarSelect = class(TfrmBaseDialog)
pnlLeft: TPanel;
Splitter1: TSplitter;
pnlRight: TPanel;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
DBGrid1: TDBGrid;
DBGrid2: TDBGrid;
adsQG: TADODataSet;
dsQG: TDataSource;
dsQ: TDataSource;
adsQGname: TStringField;
adsQGmemo: TStringField;
adsQ: TADODataSet;
adsQname: TStringField;
adsQcontent: TStringField;
adsQVarTag: TStringField;
adsQGcode: TStringField;
procedure FormShow(Sender: TObject);
procedure btnOKClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function GetVarTag: string;
implementation
uses untDM, untGlobalFun;
function GetVarTag: string;
begin
Result := '';
with TfrmVarSelect.Create(Application) do begin
if ShowModal = mrOk then
Result := adsQ.fieldByName('VarTag').AsString;
Free;
end;
end;
{$R *.dfm}
procedure TfrmVarSelect.FormShow(Sender: TObject);
begin
inherited;
with adsQG do begin
if Active then Active := False;
Active := true;
end;
with adsQ do begin
if Active then Active := false;
Active := True;
end;
end;
procedure TfrmVarSelect.btnOKClick(Sender: TObject);
begin
inherited;
if adsQ.Active and (adsQ.RecordCount>0) then
ModalResult := mrOk
else
MsgOK('当前没有选择任何变量!');
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -