public HelpBrowserTab ShowHelp(string URI) { HelpBrowserTab helpBrowserTab = FindHelpTab(); if (helpBrowserTab == null) { helpBrowserTab = new HelpBrowserTab(); } helpBrowserTab.URI = URI; helpBrowserTab.Show(MainForm.mainForm.dockPanel); helpBrowserTab.webBrowser.Navigate(URI); return(helpBrowserTab); }
private IDockContent GetContentFromPersistString(string persistString) { if (persistString == typeof(CodeBrowserDock).ToString()) { return(codeBrowser); } else if (persistString == typeof(HelpBrowserDock).ToString()) { return(helpBrowserDock); } else { // DummyDoc overrides GetPersistString to add extra information into persistString. // Any DockContent may override this value to add any needed information for deserialization. string[] parsedStrings = persistString.Split(new char[] { ',' }); if (parsedStrings.Length != 2) { return(null); } if (parsedStrings[0] == typeof(EditorTab).ToString()) { EditorTab editorTab = null; if (parsedStrings[1] != string.Empty) { editorTab = OpenFile(parsedStrings[1]); } return(editorTab); } else if (parsedStrings[0] == typeof(HelpBrowserTab).ToString()) { HelpBrowserTab helpTab = null; if (parsedStrings[1] != string.Empty) { helpTab = helpBrowserDock.ShowHelp(parsedStrings[1]); } return(helpTab); } else { return(null); } } }
private void LoadPHPContextualHelp() { if (MainForm.mainForm.phpHelp != null) { IndexItem item = MainForm.mainForm.phpHelp.Index.SearchIndex( TextUtilities.GetWordAt(editor.ActiveTextAreaControl.Document, editor.ActiveTextAreaControl.Caret.Offset - 1) + "?", IndexType.KeywordLinks); if (item != null) { HelpBrowserTab helpBrowserTab = HelpBrowserDock.FindHelpTab(); if (helpBrowserTab == null) { helpBrowserTab = new HelpBrowserTab(); } helpBrowserTab.Show(MainForm.mainForm.dockPanel); helpBrowserTab.webBrowser.Navigate((item.Topics[0] as IndexTopic).URL); } } }