设计器

修正tfm文件名问题
This commit is contained in:
JianjunLiu 2022-10-24 17:29:33 +08:00
parent f5c545746f
commit 3a0479746d
2 changed files with 13 additions and 12 deletions

View File

@ -110,6 +110,7 @@ type TVclDesigner = class(tvcform)
if not tr then return ;
it := tr.RootItem;
node := (it.items)[0];
ifnit := true;
end
if not ifarray(itemnames) then itemnames := array();
if not ifarray(lib) then lib := array();
@ -136,8 +137,8 @@ type TVclDesigner = class(tvcform)
ihp := "("+tc.inheritedparent+")";
end
end
r+= oorinh + tc.name +":"+tc.dclassname+ihp+"\r\n";
itemnames[length(itemnames)] := array(tc.name,tc.dclassname);
r+= oorinh + tcname +":"+tcclassname+ihp+"\r\n";
itemnames[length(itemnames)] := array(tcname,tcclassname);
cr := tc.GetChangedPublish();
for i,v in cr do
begin
@ -147,7 +148,7 @@ type TVclDesigner = class(tvcform)
end
for i := 0 to node.ItemCount-1 do
begin
r += tablelines( call(thisfunction,lib,(node.items)[i],itemnames),tab);
r += tablelines( TreeNode2tfmsub(lib,(node.items)[i],itemnames),tab);
end
r += "end";
end
@ -827,11 +828,12 @@ type TVclDesigner = class(tvcform)
FComponentCreater := cct;
end
function CloseShowForm(); //主窗口关闭
function CloseShowForm(o,e); //主窗口关闭
begin
{**
@explan(说明)关闭当前工程窗口%%
**}
FProjectManager.CloseCurrentEdit(nil,true);
end
public //设计器中绑定事件
@ -1042,7 +1044,6 @@ type TVclDesigner = class(tvcform)
it := new TDPanelForm();
end else return ;
it.dclassname(d["class"]);
it.Imgs := fdimagelist.GetImageId("tdcreateform");
end
comp := it.ComponentCreater(node,wr);

View File

@ -39,8 +39,9 @@ type TDComponent = class()
static fdcomponentobjects;
protected
fiscontainerdcmp;
private //基础数据
fcomponentclassname;
private //基础数据
feventnametable; //消息处理表
FTreeNode; //树结点
FCwnd; //对应控件
@ -407,6 +408,7 @@ type TDComponent = class()
tn.SelImgId := Imgs;
end
o := createobject({ClassObject()}self(true).classinfo(1),owner);
if ifnil(o.dclassname()) then o.dclassname(self(true).dclassname());
o.imgs := imgs;
if not o then return 0;
o.TreeNode := tn;
@ -865,9 +867,8 @@ type TDForm = class(TDComponent)
{**
@explan(说明) 主窗口 %%
**}
private
static FClassName;
static FParser;
private
function closecurrentform(o,e); //关闭当前窗口
begin
cp := o.Component;
@ -941,10 +942,9 @@ type TDForm = class(TDComponent)
begin
if ifstring(v) and v then
begin
FClassName := v;
fcomponentclassname := v;
end
if not FClassName then return "tdcreateform";
return FClassName;
return fcomponentclassname;
end
function bitmapinfo();override;
begin