更新tsl64

This commit is contained in:
2024-09-20 14:59:34 +08:00
parent 18c5435bf6
commit cc72d4c6fc
33 changed files with 344 additions and 95 deletions
+8 -21
View File
@@ -1722,25 +1722,25 @@ type TPageEditer=class(TPage) //
end
[weakref]FPageItemOnRClick;
end
type TTslChmHelp=class
type TTslChmHelp=class()
function SearchWord(s);
begin
if not s then return;
pm := format('%s::/%s.htm',FTSLinterpPath+FChmName,s); //>mainwin
HtmlHelpA(GetDesktopWindow(),pm,0,nil);
return;
if fapi then return fapi.open_chm((FTSLinterpPath+FChmName),s);
end
function ShowTslLangChm();
begin
return HtmlHelpA(GetDesktopWindow(),FTSLinterpPath+FChmName,0,nil);
if fapi then return fapi.open_chm((FTSLinterpPath+FChmName));
end
function Create();
function Create(p);
begin
FChmName := "help\\LANGUAGEGUIDE.CHM";
fapi := p;
FChmName := "help"$ioFileseparator()$"LANGUAGEGUIDE.CHM";
FTSLinterpPath := TS_ModulePath();
end
property ChmName read FChmName write FChmName;
private
[weakref]fapi;
FTSLinterpPath;
FHanle;
FChmName;
@@ -1971,7 +1971,7 @@ type TEditer=class(TCustomcontrol) //
FSynClasses["bat"]:= array(class(TBatSynHigLighter),class(TSynCompletion),";bat;cmd;");
FSynClasses["tfm"]:= array(class(ttfmhighlighter),class(TSynCompletion),";tfm;");
FSynClasses["None"]:= array(nil,nil,"");
FTslChmHelp := new TTslChmHelp();
FTslChmHelp := new TTslChmHelp(_wapi);
FCodeFormatInfo := array("wordct":80,"charct":200,"syn":true,"sel":false,"arraytype":0);
FPageEditer.OnDblClick := function(o,e)
begin
@@ -6090,17 +6090,4 @@ begin
end
return trim(s);
end
{$ifdef linux}
function HtmlHelpA()
begin
return 0;
end
function GetDesktopWindow()
begin
return 0;
end
{$else}
function HtmlHelpA(hwndCaller:pointer;pszFile:string;uCommand:integer;dwData:pointer):pointer;stdcall;external "HHCTRL.OCX" name "HtmlHelpA";
function GetDesktopWindow():pointer;stdcall;external "User32.dll" name "GetDesktopWindow";
{$endif}
end.
+4 -4
View File
@@ -592,12 +592,12 @@ type TVclDesigner = class(tvcform)
begin
if not FChmHelper then
begin
FChmHelper := new unit(UtslCodeEditor).TTslChmHelp();
FChmHelper := new unit(UtslCodeEditor).TTslChmHelp(_wapi);
end
case o.caption of
"使用手册":
begin
FChmHelper.ChmName := "help\\designerUserGuid.CHM";
FChmHelper.ChmName := "help"$ioFileseparator()$"designerUserGuid.CHM";
// p := "C:\\Program Files\\Tinysoft\\Analyse.NETplug\\help\\designerUserGuid.pdf" ;//pluginpath()+"..\\help\\designerUserGuid.pdf";
//_wapi.WinExec(format('cmd.exe /C call "start %s"',p),0); //http://bzjj.sinaapp.com/tslvclhelp/index.html
//_wapi.WinExec(format('start "%s"',p),0);
@@ -607,11 +607,11 @@ type TVclDesigner = class(tvcform)
end
"常用控件":
begin
FChmHelper.ChmName := "help\\vclNormalControls.CHM";
FChmHelper.ChmName := "help"$ioFileseparator()$"vclNormalControls.CHM";
end
"控件详情":
begin
FChmHelper.ChmName := "help\\tslvclhelp.chm";
FChmHelper.ChmName := "help"$ioFileseparator()$"tslvclhelp.chm";
end
end
FChmHelper.ShowTslLangChm();