diff --git a/designer/utslcodeeditor.tsf b/designer/utslcodeeditor.tsf index 092f737..2abb7df 100644 --- a/designer/utslcodeeditor.tsf +++ b/designer/utslcodeeditor.tsf @@ -3192,38 +3192,6 @@ type TEditer=class(TCustomcontrol) // if not FShortCutshower.Parent then FShortCutshower.Parent := self; InitShowWndPos(FShortCutshower,"surcut",500,150,true); FShortCutshower.Show(); - {s := ""; - s += "ctrl+o 打开\r\n"; - s += "ctrl+N 新建\r\n"; - s += "ctrl+s 保存\r\n"; - s += "ctrl+F 查找窗口\r\n"; - s += "ctrl+R 替换窗口\r\n"; - s += "ctrl+a 全选\r\n"; - s += "ctrl+c 拷贝选择\r\n"; - s += "ctrl+D 复制被插入当前行\r\n"; - s += "ctrl+v 粘贴\r\n"; - s += "ctrl+x 剪切选择\r\n"; - s += "ctrl+G 定位到行\r\n"; - s += "ctrl+L|Y 删除当前行\r\n"; - s += "tab | shift+tab 多行选中时缩进\r\n"; - s += "ctrl+/ 注释当前选择\r\n"; - s += "ctrl+\\ 取消当前注释\r\n"; - s += "ctrl+U 反撤销\r\n"; - s += "ctrl+z 撤销\r\n"; - s += "ctrl+tab 切换标签\r\n"; - s += "F2 跳转到下一个断点行\r\n"; - s += "F5 添加删除断点\r\n"; - s += "Alt+F5 将选中字符串转换为大写\r\n"; - s += "ctl+F5 将选中字符串转换为小写\r\n"; - s += "F3 正向搜索先前搜索的字符\r\n"; - s += "ctrl+F3 反向搜索先前搜索的字符\r\n"; - s += "ctrl+tab 切换标签页\r\n"; - s += "F9 执行当前页的代码\r\n"; - s += "ctrl+F9 打开执行代码编辑器\r\n"; - s += "F7 显示隐藏日志窗口\r\n"; - s += "F1 对于tsl语言查找当前光标所在位置的帮助\r\n"; - s += "alt+m 弹出tsl代码地图\r\n"; - messageboxa(s,"快捷键说明",0,self);} end "撤销": begin @@ -3726,15 +3694,40 @@ type TEditer=class(TCustomcontrol) // FTslChmHelp.ShowTslLangChm(); end function InitShowWndPos(wnd,n,ix,iy,flg); //计算初始位置 - begin + begin if flg or (not FFistShows[n])then - begin + begin FFistShows[n]:= true; + return move_popwnd_to_center2(wnd); xy := Clienttoscreen(ix,iy); wnd.left := xy[0]; wnd.top := xy[1]; end end + function move_popwnd_to_center2(wnd); + begin + ////////////////////窗口居中处理///////////////////////////////// + ////////////////////wnd待居中的窗口///////////////////////////////// + ////////////////////pwnd父窗口///////////////////////////////// + pd := pwnd; + if pd then + begin + while not(pd.wspopup) do + begin + npd := pd.parent; + if npd then pd := npd; + else break; + end + r := pd.ClientRect; + xy := pd.clienttoscreen(r[0],r[1]); + end else + begin + xy := array(0,0); + r := wnd._wapi.GetScreenRect(); + end + wnd.Left := max(0,xy[0]+(r[2]-r[0]-wnd.width)/2) ; + wnd.top := max(0,xy[1]+(r[3]-r[1]-wnd.Height)/2); + end function SetPageItemSyn(it,n); begin if not it then return; diff --git a/editor-install.exe b/editor-install.exe index 2d3dbf4..9822527 100644 Binary files a/editor-install.exe and b/editor-install.exe differ diff --git a/tsleditor.exe b/tsleditor.exe index a333768..31c24a0 100644 Binary files a/tsleditor.exe and b/tsleditor.exe differ diff --git a/tslvcltool.exe b/tslvcltool.exe index 9433e45..cc63998 100644 Binary files a/tslvcltool.exe and b/tslvcltool.exe differ