设计器

升级
This commit is contained in:
tslediter 2024-04-24 10:00:21 +08:00
parent 8239223d05
commit 126b69f781
2 changed files with 10 additions and 14 deletions

View File

@ -6,7 +6,6 @@ type textcompclassadder=class(tdcreateform)
label2:tlabel; label2:tlabel;
p_imgshow:tpanel; p_imgshow:tpanel;
b_img:tbtn; b_img:tbtn;
b_ok:tbtn; b_ok:tbtn;
b_cancel:tbtn; b_cancel:tbtn;
f_open:topenfileadlg; f_open:topenfileadlg;
@ -14,17 +13,13 @@ type textcompclassadder=class(tdcreateform)
begin begin
inherited; inherited;
end end
function extcompclassadder_close(o;e);virtual; function extcompclassadder_close(o;e);virtual;
begin begin
e.skip := true; e.skip := true;
Visible := false; Visible := false;
EndModal(0); EndModal(0);
inherited; inherited;
end end
function b_cancel_clk(o;e);virtual; function b_cancel_clk(o;e);virtual;
begin begin
EndModal(0); EndModal(0);
@ -37,8 +32,8 @@ type textcompclassadder=class(tdcreateform)
messageboxa("该控件已经注册","提示",0,self); messageboxa("该控件已经注册","提示",0,self);
return ; return ;
end end
o := findclass(s); oc := findclass(s);
if not (o is class(TWinControl)) then if not (oc is class(TWinControl)) then
begin begin
messageboxa("组件类型错误,或者组件不存在","提示",0,self); messageboxa("组件类型错误,或者组件不存在","提示",0,self);
return ; return ;
@ -75,7 +70,6 @@ type textcompclassadder=class(tdcreateform)
vi := nf[i]; vi := nf[i];
if vi=iof then if vi=iof then
begin begin
break; break;
end end
n := vi+n; n := vi+n;

View File

@ -2072,10 +2072,12 @@ function staticInit();
begin begin
global g_orig_lib_path; global g_orig_lib_path;
unit(utssvr_api_c).get_tssvr_api_c(); unit(utssvr_api_c).get_tssvr_api_c();
np := getdesignerpath()+"dcmps"+ioFileseparator(); dcmpdir := getdesignerpath()+"dcmps"+ioFileseparator();
CreateDirWithFileName(np+"1.txt"); CreateDirWithFileName(dcmpdir+"1.txt");
g_orig_lib_path := sysgettsllibpath()+";"+Getfuncextdir();//tsl_getlibpath_() osysdir := trim(sysgettsllibpath());
syssettsllibpath( np+";"+g_orig_lib_path);//tsl_setlibpath_ if osysdir[length(osysdir)]<>";" then osysdir+=";";
g_orig_lib_path := osysdir+Getfuncextdir()+ioFileseparator()+";";
syssettsllibpath( dcmpdir+";"+g_orig_lib_path);
ini := static getdesginerini(); ini := static getdesginerini();
//class(TDSocketServer),class(TDSocketClient), //class(TDSocketServer),class(TDSocketClient),
//注册的componet //注册的componet