/// <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)
            {
                var dlg = new LaunchMSHelpViewerDlg(project, options.MSHelpViewerPath);
                dlg.ShowModalDialog();
            }
        }
        /// <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>
        protected override 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();
                }
            }
        }
示例#3
0
        /// <summary>
        /// View the last build HTML Help 1 file, MS Help 2 file, MS Help Viewer, or website Index.aspx page
        /// </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)
                {
                    this.ViewBuiltHelpFile(project, PkgCmdIDList.ViewHtmlHelp);
                }
                else
                if ((project.HelpFileFormat & HelpFileFormats.MSHelp2) != 0)
                {
                    this.ViewBuiltHelpFile(project, PkgCmdIDList.ViewHxSHelp);
                }
                else
                if ((project.HelpFileFormat & HelpFileFormats.OpenXml) != 0)
                {
                    this.ViewBuiltHelpFile(project, PkgCmdIDList.ViewDocxHelp);
                }
                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();
                        }
                    }
                }
            }
        }
示例#4
0
        /// <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;
                }

#pragma warning disable VSTHRD010
                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)
                    {
                        var dlg = new LaunchMSHelpViewerDlg(project, options.MSHelpViewerPath);
                        dlg.ShowModalDialog();
                    }
                }
#pragma warning restore VSTHRD010
            }
        }
示例#5
0
 /// <summary>
 /// Launch the MS Help Viewer to view a 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 miViewMSHelpViewer_Click(object sender, EventArgs e)
 {
     using(LaunchMSHelpViewerDlg dlg = new LaunchMSHelpViewerDlg(project, Settings.Default.MSHelpViewerPath))
     {
         dlg.ShowDialog();
     }
 }