编辑器

优化
This commit is contained in:
2023-11-29 09:21:06 +08:00
parent 362e8a697b
commit b60fdfdc3e
7 changed files with 54 additions and 48 deletions
+2 -2
View File
@@ -1676,13 +1676,13 @@ type TPageEditer=class(TPage) //
fw := font.Width;
if e.delta<0 then
begin
if fw>8 then
if fw>6 then
begin
finfo := array("width":fw-1,"height":font.height-2);
end
end else
begin
if fw<15 then
if fw<24 then
begin
finfo := array("width":fw+1,"height":font.height+2);
end
+15 -10
View File
@@ -652,7 +652,8 @@ type TTslDebuga=class(TCustomControl)
if h then
begin
ExecuteCommand("dbgcreatechannel");
ExecuteCommand("showeval","调试程序:"+FDebugExe);
ExecuteCommand("showstr","调试程序:"+FDebugExe);
ExecuteCommand("showstr","命令行参数:"+exestr);
if FConnectchannel then
begin
dbgattachwait(FConnectchannel);
@@ -903,7 +904,7 @@ type TTslDebuga=class(TCustomControl)
if recvtype=0 then
begin
FRemoteWait := 0;
ExecuteCommand("showeval","调试结束");
ExecuteCommand("showstr","调试结束");
if FConnectchannel then dbgdeletechannel(FConnectchannel);
FConnectchannel := 0;
g_tsldbgcallback_handle := nil;
@@ -1017,7 +1018,7 @@ type TTslDebuga=class(TCustomControl)
end
FRemoteWait := 0;
if FCurrentgotoitem and FCurrentgotoitem.FEditer then FCurrentgotoitem.FEditer.ExecuteCommand("ecruningto",nil);
ExecuteCommand("showeval","调试结束");
ExecuteCommand("showstr","调试结束");
toolbtnState("停止");
return;
end
@@ -1174,6 +1175,10 @@ type TTslDebuga=class(TCustomControl)
FCommandtext.Text := "";
end
end
"showstr":
begin
FShowText.Text += (ifstring(p)?p:tostn(p)) +"\r\n";
end
"showeval":
begin
FShowText.Text += "ans="+tostn(p)+"\r\n";
@@ -1352,7 +1357,7 @@ type TTslDebuga=class(TCustomControl)
end else
begin
if FDebugExe="1" then
ExecuteCommand("showeval","当前指定的执行程序不存在!!");
ExecuteCommand("showstr","当前指定的执行程序不存在!!");
end
psi := ps[1];
if psi and fileexists("",psi)then
@@ -1378,22 +1383,22 @@ type TTslDebuga=class(TCustomControl)
if(FDebugExe="1")and cmdexe then
begin
FDebugExe := cmdexe;
ExecuteCommand("showeval","<当前执行程序(F9)做调试器>");
ExecuteCommand("showstr","<当前执行程序(F9)做调试器>");
end else
if fileexists("",FDebugExe)then
begin
ExecuteCommand("showeval","<用配置文件给定的调试器>");
ExecuteCommand("showstr","<用配置文件给定的调试器>");
end else
begin
FDebugExe := fdefaultdbger;
ExecuteCommand("showeval","<用编辑器自带的调试器b:>");
ExecuteCommand("showstr","<用编辑器自带的调试器b:>");
end
end
function remotedbugok();
begin
if FAttchedid then
begin
ExecuteCommand("showeval","远程启动脚本:"+FAttchedid["info"]);
ExecuteCommand("showstr","远程启动脚本:"+FAttchedid["info"]);
end
end
function remotewaitinit(d);
@@ -1425,7 +1430,7 @@ type TTslDebuga=class(TCustomControl)
begin
if FDebugtype <> "remotewait" then setbrks(); //设置断点
//showbtns(); //显示按钮
ExecuteCommand("showeval","开始调试");
ExecuteCommand("showstr","开始调试");
//toolbtnState("暂停");
remotedbugok();
return;
@@ -1457,7 +1462,7 @@ type TTslDebuga=class(TCustomControl)
if e then e.skip := true;
if FConnectchannel then dbgdeletechannel(FConnectchannel);
FConnectchannel := 0;
ExecuteCommand("showeval",ifstring(s)?s:"取消远程调试...");
ExecuteCommand("showstr",ifstring(s)?s:"取消远程调试...");
end
function stkdbclk(o,e);
begin