From ab4811d8347508ca28ea3158e259e34cd886b106 Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Mon, 19 Sep 2022 11:13:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化调试工具栏 --- designer/utslvcldebuger.tsf | 57 ++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/designer/utslvcldebuger.tsf b/designer/utslvcldebuger.tsf index 350a24e..b45cd2f 100644 --- a/designer/utslvcldebuger.tsf +++ b/designer/utslvcldebuger.tsf @@ -435,7 +435,12 @@ type TTslDebuga=class(TCustomControl) begin v.onClick := thisfunction(Dbgtooldo); if v.Caption="/ɾϵF5" then continue; - if v.Caption="" then continue; + if v.Caption="" then + begin + v.onClick := thisfunction(dbgtooldorun); + v.Caption := ""; + continue; + end v.Visible := false; end end @@ -560,12 +565,15 @@ type TTslDebuga=class(TCustomControl) end function debugrunredo(); begin + return dbgtooldorun(nil,nil); if FBtns["ֹ"].Visible then begin - Dbgtooldo(new ttempclass(""),nil); + //Dbgtooldo(new ttempclass(""),nil); + dbgtooldorun(nil,nil); end else begin - Dbgtooldo(new ttempclass("ͣ"),nil); + //echo "\r\n ִrun"; + //Dbgtooldo(new ttempclass("ͣ"),nil); end end function Debuglocal(item); //Խű @@ -748,6 +756,26 @@ type TTslDebuga=class(TCustomControl) end return 0; end + function dbgtooldorun(o,e); + begin + if not(FConnectchannel or FRemoteWait) then + begin + return CallMessgeFunction(frunbtncall,nil,nil); + end + //if not( FBtns["ֹ"].Visible) then return ; + toolbtnState(""); + if FCurrentgotoitem and FCurrentgotoitem.FEditer then FCurrentgotoitem.FEditer.ExecuteCommand("ecruningto",nil); + ExecuteCommand("dbgrun"); + {$ifdef linux} + {$else} + if not Fdebugedwhandle then + Fdebugedwhandle := GetWindowHandleByPID(_wapi.GetProcessId(FDebughandle),_wapi); + if Fdebugedwhandle then + begin + _wapi.SetForegroundWindow(Fdebugedwhandle); + end + {$endif} + end function Dbgtooldo(o,e) begin cp := o.Caption; @@ -792,24 +820,7 @@ type TTslDebuga=class(TCustomControl) end "": begin - if not(FConnectchannel or FRemoteWait) then - begin - - //return MessageboxA("ڵ","ʾ",0,self.Handle); - return CallMessgeFunction(frunbtncall,nil,nil); - end - toolbtnState(""); - if FCurrentgotoitem and FCurrentgotoitem.FEditer then FCurrentgotoitem.FEditer.ExecuteCommand("ecruningto",nil); - ExecuteCommand("dbgrun"); - {$ifdef linux} - {$else} - if not Fdebugedwhandle then - Fdebugedwhandle := GetWindowHandleByPID(_wapi.GetProcessId(FDebughandle),_wapi); - if Fdebugedwhandle then - begin - _wapi.SetForegroundWindow(Fdebugedwhandle); - end - {$endif} + dbgtooldorun(o,e); end "ֹ": begin @@ -1498,8 +1509,8 @@ type TTslDebuga=class(TCustomControl) begin for i,v in FBtns do begin - if v.Caption="/ɾϵF5" then continue; - if v.Caption="" then continue; + if i="/ɾϵF5" then continue; + if i="" then continue; v.Visible := false; end //FToolbar.Visible := false;