コード例 #1
0
 /// <summary>
 /// This function is the callback used to execute the command when the menu item is clicked.
 /// See the constructor to see how the menu item is associated with this function using
 /// OleMenuCommandService service and MenuCommand class.
 /// </summary>
 /// <param name="sender">Event sender.</param>
 /// <param name="e">Event args.</param>
 private void Execute(object sender, EventArgs e)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     if (!File.Exists(data.GetValuePath()))
     {
         string title = "Error! “File not founded";
         string mess  = "To add see: TOOLS->options->Custom Help Category. file://c:\\File.chm";
         VsShellUtilities.ShowMessageBox(
             this.package,
             mess,
             title,
             OLEMSGICON.OLEMSGICON_INFO,
             OLEMSGBUTTON.OLEMSGBUTTON_OK,
             OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
         return;
     }
     else
     {
         form2.HelpMethod();
         // form2.Close();
     }
 }
コード例 #2
0
        public void HelpMethod()
        {
            HelpNavigator navigator = HelpNavigator.KeywordIndex;

            Help.ShowHelp(this, data.GetValuePath(), navigator, data.GetValue());
        }