; --------------------------------------------------------------------------------------------; Copyright (c) Fantaisie Software. All rights reserved.; Dual licensed under the GPL and Fantaisie Software licenses.; See LICENSE and LICENSE-FANTAISIE in the project root for license information.; --------------------------------------------------------------------------------------------Procedure AddHelpFiles_Init()AddHelpFiles_Count = 0; all extensions are now accepted as help files (unknown ones are opened in the fileviewer);If ExamineDirectory(0, PureBasicPath$+#DEFAULT_HelpPath, "*")While NextDirectoryEntry(0)If DirectoryEntryType(0) = 1Type$ = UCase(GetExtensionPart(DirectoryEntryName(0)))If Type$ <> "GID" And Type$ <> "CNT" And Type$ <> "CHW" And Left(DirectoryEntryName(0), 1) <> "." ; hide hidden files (mac and linux)AddHelpFiles_Count + 1HelpFiles(AddHelpFiles_Count-1) = DirectoryEntryName(0)EndIfEndIfWendFinishDirectory(0)EndIfSortArray(HelpFiles(), 0, 0, AddHelpFiles_Count-1)EndProcedureProcedure AddHelpFiles_AddMenuEntries()For i = 0 To AddHelpFiles_Count-1MenuItem(#MENU_AddHElpFiles_Start + i, ReplaceString(HelpFiles(i), "&", "&&")) ; escape the "help underline char"; If GetExtensionPart(HelpFiles(i)) = "" ; files without extension; MenuItem(#MENU_AddHElpFiles_Start + i, HelpFiles(i)); Else; MenuItem(#MENU_AddHElpFiles_Start + i, Left(HelpFiles(i), Len(HelpFiles(i))-Len(GetExtensionPart(HelpFiles(i)))-1)); EndIfNext iEndProcedureProcedure AddHelpFiles_Display(MenuID)File$ = HelpFiles(MenuID - #MENU_AddHelpFiles_Start)CompilerIf #CompileWindowsIf LCase(GetExtensionPart(File$)) = "hlp" Or LCase(GetExtensionPart(File$)) = "chm" ; on windows, open these with the help lib.OpenHelp(PureBasicPath$+#DEFAULT_HelpPath+File,ドル "")ProcedureReturnEndIfCompilerEndIf; open any external help with the internal file viewer (or external tool if the user configured it like that);FileViewer_OpenFile(PureBasicPath$+#DEFAULT_HelpPath+File$)EndProcedure
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。