界面库

升级
This commit is contained in:
JianjunLiu 2023-10-20 17:19:01 +08:00
parent e47352f843
commit 667772a463
5 changed files with 28 additions and 18 deletions

View File

@ -25,6 +25,8 @@ type teditorform = class(TVCform) //
function editerinfo(); function editerinfo();
begin begin
s := "tsl语言本地编辑器\r\n版本:1.0.0\r\n日期:2022-07-19"; s := "tsl语言本地编辑器\r\n版本:1.0.0\r\n日期:2022-07-19";
sc := get_resource_by_name("tsleditor.tsl.about");
if ifstring(sc) then return sc;
f := tslfilename()+".about"; f := tslfilename()+".about";
if fileexists("",f) then if fileexists("",f) then
begin begin

View File

@ -573,6 +573,8 @@ type TVclDesigner = class(tvcform)
function editerinfo(); function editerinfo();
begin begin
s := "tsl语言界面设计器\r\n版本:1.0.0\r\n日期:2023-01-19"; s := "tsl语言界面设计器\r\n版本:1.0.0\r\n日期:2023-01-19";
sc := get_resource_by_name("vcldesigner.tsl.about");
if sc then return sc;
f := tslfilename()+".about"; f := tslfilename()+".about";
if fileexists("",f) then if fileexists("",f) then
begin begin

View File

@ -4951,7 +4951,7 @@ type TRegKey = class
@param(vn)(string) value Ãû×Ö %% @param(vn)(string) value Ãû×Ö %%
**} **}
if not FHandle then return -1; if not FHandle then return -1;
if not(ifstring(vn))then return -1; if not(ifstring(vn) or ifnil(vn))then return -1;
return RegDeleteValueA(FHandle,vn); return RegDeleteValueA(FHandle,vn);
end end
function DeleteKeyA(vn); function DeleteKeyA(vn);

View File

@ -29,7 +29,7 @@ function intersectrect(rec1,rec2,irec);
function bitcombination(s,v,f); function bitcombination(s,v,f);
function IsTextUTF8(str); function IsTextUTF8(str);
function exportjsonformat(d,tbw,ct); function exportjsonformat(d,tbw,ct);
function get_resource_by_name(n);
//**************************** //****************************
/////////////////// ///////////////////
function ParserCommandLine(s); //解析命令行参数 function ParserCommandLine(s); //解析命令行参数
@ -3643,9 +3643,29 @@ begin
end end
return ""; return "";
end end
function get_resource_by_name(n);
begin
global g_w_tfm_resource;
return g_w_tfm_resource[n];
end
function uinit();
begin
global g_w_tfm_resource;
g_w_tfm_resource := array();
try
getglobalcache("@@tsl-resource@@",rs);
for i,v in rs do
begin
if ifstring(i) and ifstring(v) then
begin
g_w_tfm_resource[lowercase(i)] := v;
end
end
except
end
end
initialization initialization
uinit();
end. end.
//////////////////////暂时没用到的类型/////////////////////////////////////// //////////////////////暂时没用到的类型///////////////////////////////////////

View File

@ -2353,20 +2353,6 @@ begin
end end
function Sinitlib(); function Sinitlib();
begin begin
global g_w_tfm_resource;
g_w_tfm_resource := array();
try
getglobalcache("@@tsl-resource@@",rs);
for i,v in rs do
begin
if ifstring(i) and ifstring(v) then
begin
g_w_tfm_resource[lowercase(i)] := v;
end
end
except
end
types := array( //"tpropertytype", types := array( //"tpropertytype",
"tpropertynatural", "tpropertynatural",
"tpropertyinteger", "tpropertyinteger",