This commit is contained in:
2025-02-27 16:28:05 +08:00
parent a0717b7cd3
commit d295888137
17 changed files with 1371 additions and 1169 deletions
+7 -4
View File
@@ -2886,6 +2886,7 @@ type TEditer=class(TCustomcontrol) //
subit.Parent := it;
subit.OnClick := thisfunction(PageEditerMenuClick);
end
FPageEditerMenus[v] := it;
continue;
end
FPageEditerMenus[v]:= it;
@@ -2900,10 +2901,11 @@ type TEditer=class(TCustomcontrol) //
begin
zd := GetCurrentItem().FEditer.Readonly;
rd.Checked := zd;
it := FPageEditerMenus["粘贴(V)"];
if it then it.Enabled := not zd;
it := FPageEditerMenus["剪切(X)"];
if it then it.Enabled := not zd;
for ii,vv in array("转换为大写","转换为小写","删除尾空白","粘贴(V)","剪切(X)","文档格式") do
begin
it := FPageEditerMenus[vv];
if it then it.Enabled := not zd;
end
end
rd := FPageEditerMenus["查看"];
if rd then
@@ -3523,6 +3525,7 @@ type TEditer=class(TCustomcontrol) //
function upperorlowercase(f);
begin
ed := GetCurrentEditer();
if ed.ReadOnly then return ;
IF not ed then return;
s := ed.SelText;
if s then
+9 -8
View File
@@ -85,8 +85,8 @@ type TFTSLScriptcustomMemo=class(TSYNmemoNorm)
begin
fy :=(FirstLine-TopLine) * LineHeight;
r := ClientRect;
if fy<r[1]then return;
if fy>r[3]then return;
if fy<(r[1]-2) then return;
if fy>(r[3]+2)then return;
r[0]:= GutterWidth;
r[1]:= max(0,fy);
InvalidateRect(r,false);
@@ -447,7 +447,7 @@ type TTslDebuga=class(TCustomControl)
return filedelete("",(TS_ModulePath()+"FunCache.ini"));
end
public
property runbtncall read frunbtncall write frunbtncall;
property runbtncall read frunbtncall write frunbtncall;
function addbtns(btns); //添加菜单
begin
FBtns := btns;
@@ -615,8 +615,8 @@ type TTslDebuga=class(TCustomControl)
FDebugUsr := 0;
FDebugPwd := 0;
deletefuncacheini();
getdebuger(pms);
exestr := format('"%s" "%s" -DEBUGSERVER -DEBUGLOGIN 0 -WAITATTACH -DEBUGPORT %d -libpath "%s" ',FDebugExe,FRuningfile,FDebugport,dirs);
getdebuger(pms,pdir);
exestr := format('"%s" "%s" -DEBUGSERVER -DEBUGLOGIN 0 -WAITATTACH -DEBUGPORT %d -libpath "%s" ',FDebugExe,FRuningfile,FDebugport,(pdir?pdir:dirs));
exestr += pms;
fremotedbugstart := true;
fscriptbrks := array();
@@ -1320,7 +1320,7 @@ type TTslDebuga=class(TCustomControl)
begin
fdefaultdbger := gettslexefullpath();
end
function getdebuger(pms); //获得调试程序
function getdebuger(pms,pdir); //获得调试程序
begin
p := static pluginpath();
global g_debug_chooser;
@@ -1356,9 +1356,10 @@ type TTslDebuga=class(TCustomControl)
while idx<length(ps) do
begin
psi := ps[idx];
if lowercase(psi)="-libpath" then
if lowercase(psi)="-libpath" then //屏蔽此处,让debug和运行的参数保持一致
begin
idx += 2;
pdir :=ps[idx+1];
idx += 2;
continue;
end
pms += " "+tostn(psi);
+15 -5
View File
@@ -452,10 +452,10 @@ type TVclDesigner = class(tvcform)
end
function CreateTpjFomFile();//新建工程
begin
FProjectFileOpener.caption := "新建";
if FProjectFileOpener.OpenDlg() then
FProjectFilesave.caption := "新建";
if FProjectFilesave.OpenDlg() then
begin
f := FProjectFileOpener.FileName;
f := FProjectFilesave.FileName;
if parseregexpr(".tpj$",f,"",pp1,pp2,pp3)<>1 then f+=".tpj";
FProjectsManager.CreateTpjFomFile(f);
end
@@ -1089,6 +1089,12 @@ type TVclDesigner = class(tvcform)
function toplevelwndkeydown(o,e);
begin
cd := e.CharCode;
if cd=vk_f12 then
begin
FProjectManager.GoToAFunction(nil);//DBLClickComponent(o,e);
FProjectManager.ShowEditor();
e.skip := true;
end
if cd = VK_ESCAPE then return select_parent();
c := e.char;
if not((c in array("X","V","C","Z")) or cd=VK_DELETE) then return ;
@@ -1376,7 +1382,7 @@ type TVclDesigner = class(tvcform)
end
FTree.Loading := nil;
end
function loadtfmtotree(p,d,node,wr,prs,obarray,inhname,first,outobjs);//当如信息
function loadtfmtotree(p,d,node,wr,prs,obarray,inhname,first, outobjs);//当如信息
begin
{**
@explan(说明) 导入tfm文件 %%
@@ -1609,9 +1615,12 @@ type TVclDesigner = class(tvcform)
ic.Readvcon(HexFormatStrToTsl(GetTsIconBitmapInfo()));
self.FormICon := ic;
//文件打窗口
FProjectFileOpener := new TSavefileADlg(self);
FProjectFileOpener := new TOpenFileADlg(self);
FProjectFilesave := new TSavefileADlg(self);
FProjectFileOpener.filter := array("tvcl工程":"*.tpj");
FProjectFilesave.filter := array("tvcl工程":"*.tpj");
FProjectFileOpener.parent := self;
FProjectFilesave.parent := self;
FProjectManager.FTslEditer.setdbugruncall(thisfunction(debugproject)); //设置调试回调
FProjectManager.newmenu.parent := ffilemenu;//
FProjectManager.goformmenu.parent := fviewmenu;//
@@ -1729,6 +1738,7 @@ EB43A8AA7C90DAF18A0686290EA76BBE8743AF0DD966D8F5347F12A789A415120
A9CF93B033F9EA579B5AA7EC4E00000000049454E44AE42608200";
end
FProjectFileOpener;
FProjectFilesave;
end