/// <summary> /// Launch the MS Help Viewer to view the last built Microsoft Help Viewer file. This /// will optionally install it first. /// </summary> /// <param name="sender">The sender of the event</param> /// <param name="e">The event arguments</param> private void ViewMshcHelpExecuteHandler(object sender, EventArgs e) { SandcastleProject project = CurrentSandcastleProject; var options = this.GeneralOptions; if(project != null && options != null) using(LaunchMSHelpViewerDlg dlg = new LaunchMSHelpViewerDlg(project, options.MSHelpViewerPath)) { dlg.ShowDialog(); } }
/// <summary> /// View the last built help output /// </summary> /// <param name="projectNode">The project node for which to open the help file</param> internal void ViewBuiltHelpFile(SandcastleBuilderProjectNode projectNode) { if(projectNode != null) { SandcastleProject project = projectNode.SandcastleProject; if(project == null) return; if((project.HelpFileFormat & HelpFileFormats.HtmlHelp1) != 0) ViewBuiltHelpFile(project, PkgCmdIDList.ViewHtmlHelp); else if((project.HelpFileFormat & HelpFileFormats.OpenXml) != 0) ViewBuiltHelpFile(project, PkgCmdIDList.ViewDocxHelp); else if((project.HelpFileFormat & HelpFileFormats.Markdown) != 0) ViewBuiltHelpFile(project, 0); else if((project.HelpFileFormat & HelpFileFormats.Website) != 0) Utility.OpenUrl(projectNode.StartWebServerInstance()); else { // This format opens a modal dialog box so we'll use it last if nothing else // is selected. var options = this.GeneralOptions; if(options != null) using(LaunchMSHelpViewerDlg dlg = new LaunchMSHelpViewerDlg(project, options.MSHelpViewerPath)) { dlg.ShowDialog(); } } } }