public static void LoadPanelIntoToolbox(HtmlDom domForToolbox, ToolboxTool tool, List<string> checkedBoxes, string toolboxFolder) { // For all the toolbox tools, the tool name is used as the name of both the folder where the // assets for that tool are kept, and the name of the main htm file that represents the tool. var fileName = tool.ToolId + "ToolboxPanel.html"; var path = BloomFileLocator.sTheMostRecentBloomFileLocator.LocateFile(fileName); Debug.Assert(!string.IsNullOrEmpty(path)); AppendToolboxPanel(domForToolbox, path); checkedBoxes.Add(tool.ToolId + "Check"); }
public static void LoadPanelIntoToolbox(HtmlDom domForToolbox, ToolboxTool tool, List <string> checkedBoxes, string toolboxFolder) { // For all the toolbox tools, the tool name is used as the name of both the folder where the // assets for that tool are kept, and the name of the main htm file that represents the tool. var fileName = tool.ToolId + "ToolboxPanel.html"; var path = BloomFileLocator.sTheMostRecentBloomFileLocator.LocateFile(fileName); Debug.Assert(!string.IsNullOrEmpty(path)); AppendToolboxPanel(domForToolbox, path); checkedBoxes.Add(tool.ToolId + "Check"); }
private static void UpdateActiveToolSetting(Book.Book book, string toolName, bool enabled) { var tools = book.BookInfo.Tools; var item = tools.FirstOrDefault(t => t.ToolId == toolName); if (item == null) { item = ToolboxTool.CreateFromToolId(toolName); tools.Add(item); } item.Enabled = enabled; }