代码拉取完成,页面将自动刷新
unit editscriptform;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, SynEdit, SynHighlighterJScript, Forms, Controls,
Graphics, Dialogs, StdCtrls, ExtCtrls, nkTitleBar, nkResizer, BCLabel,
BCButton;
type
{ TfrmEditScript }
TfrmEditScript = class(TForm)
BCButton2: TBCButton;
BCLabel1: TBCLabel;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
nkResizer1: TnkResizer;
nkTitleBar1: TnkTitleBar;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
SynEdit1: TSynEdit;
SynJScriptSyn1: TSynJScriptSyn;
procedure BCButton2Click(Sender: TObject);
procedure BCLabel1Click(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormShow(Sender: TObject);
procedure SynEdit1Change(Sender: TObject);
procedure SynEdit1ChangeUpdating(ASender: TObject; AnUpdating: Boolean);
private
public
end;
var
frmEditScript: TfrmEditScript;
implementation
{$R *.frm}
{ TfrmEditScript }
procedure TfrmEditScript.BCLabel1Click(Sender: TObject);
begin
ModalResult:=mrCancel;
end;
procedure TfrmEditScript.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
if ModalResult=mrOK then
begin
if Trim(ComboBox2.Text)='' then
begin
ComboBox2.Text:='其他';
end;
if Trim(Edit1.Text)='' then
begin
MessageDlg('请输入该例程的简要名称或描述。',mtWarning,[mbOK],0);
Edit1.SetFocus;
CanClose:=False;
Exit;
end;
if Trim(Edit2.Text)='' then
begin
MessageDlg('请输入完整的触发地址。',mtWarning,[mbOK],0);
Edit2.SetFocus;
CanClose:=False;
Exit;
end;
end;
end;
procedure TfrmEditScript.BCButton2Click(Sender: TObject);
begin
ModalResult:=mrOK;
end;
procedure TfrmEditScript.FormShow(Sender: TObject);
begin
SynEdit1.SetFocus;
end;
procedure TfrmEditScript.SynEdit1Change(Sender: TObject);
begin
end;
procedure TfrmEditScript.SynEdit1ChangeUpdating(ASender: TObject;
AnUpdating: Boolean);
begin
Label6.Caption:='行:'+inttostr(SynEdit1.CaretY)+' 列:'+inttostr(SynEdit1.CaretX);
end;
end.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。