internal void AddBrandingPanel()
        {
            if (!HasBeenActivated)
            {
                string basePath   = "";
                string recipeName = "";
                Microsoft.VisualStudio.VSHelp.Help helpService = null;

                try
                {
                    IConfigurationService s = this.GetService(typeof(IConfigurationService)) as IConfigurationService;
                    basePath = s.BasePath;

                    helpService = (Microsoft.VisualStudio.VSHelp.Help)base.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help));

                    IDictionaryService dictionaryService = GetService(typeof(IDictionaryService)) as IDictionaryService;
                    recipeName = dictionaryService.GetValue("RecipeName").ToString();
                }
                catch
                {
                    //MessageBox.Show(ex.ToString());
                }

                bPanel = new BrandingPanel();
                this.Controls.Add(bPanel);
                bPanel.UpdateImage(GetBasePath());
                bPanel.UpdateHelpPage(basePath, recipeName, helpService);
            }
        }
Example #2
0
        /// <summary>
        /// Shows help for the help topic.
        /// </summary>
        protected virtual void ShowHelp()
        {
            Microsoft.VisualStudio.VSHelp.Help help = this.serviceProvider.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help)) as Microsoft.VisualStudio.VSHelp.Help;

            if (help != null)
            {
                help.DisplayTopicFromF1Keyword(this.helpTopic);
            }
        }
        private void WixBuildEventEditorForm_HelpRequested(object sender, HelpEventArgs hlpevent)
        {
            Microsoft.VisualStudio.VSHelp.Help help = this.serviceProvider.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help)) as Microsoft.VisualStudio.VSHelp.Help;

            if (help != null)
            {
                help.DisplayTopicFromF1Keyword("cs.ProjectPropertiesBuildEventsBuilder");
            }

            hlpevent.Handled = true;
        }
Example #4
0
        void IPropertyPage.Help(string pszHelpDir)
        {
            IServiceProvider serviceProvider = _site as IServiceProvider;

            if (serviceProvider != null)
            {
                Help helpService = serviceProvider.GetService(typeof(Help)) as Help;
                if (helpService != null)
                {
                    helpService.DisplayTopicFromF1Keyword(HelpKeyword);
                }
            }
        }
Example #5
0
        public void Help(string pszHelpDir)
        {
            System.IServiceProvider serviceProvider = IPropertyPageSite as System.IServiceProvider;

            if (null != serviceProvider)
            {
                Microsoft.VisualStudio.VSHelp.Help helpService = serviceProvider.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help)) as Microsoft.VisualStudio.VSHelp.Help;
                if (null != helpService)
                {
                    helpService.DisplayTopicFromF1Keyword(HelpKeyword);
                }
            }
        }
Example #6
0
        /// <summary>
        /// See <see cref="WizardForm.OnHelpButtonClicked"/>
        /// </summary>
        /// <param name="e"></param>
        protected override void OnHelpButtonClicked(CancelEventArgs e)
        {
            base.OnHelpButtonClicked(e);

            string helpRelativeLocation = this.wizardConfig.Help;

            Uri    baseLocation = null;
            string helpLocation = string.Empty;

            if (Uri.TryCreate(helpRelativeLocation, UriKind.RelativeOrAbsolute, out baseLocation))
            {
                if (baseLocation != null)
                {
                    if (baseLocation.IsAbsoluteUri)
                    {
                        if (baseLocation.IsFile)
                        {
                            helpLocation = baseLocation.LocalPath;
                        }
                        else
                        {
                            helpLocation = baseLocation.AbsoluteUri;
                        }
                    }
                    else
                    {
                        helpLocation = Path.Combine(basePath, helpRelativeLocation);
                    }
                }
            }
            else
            {
                throw new Exception(string.Format(Resources.WizardGatheringService_CannotGetHelpResource, helpLocation));
            }


            Microsoft.VisualStudio.VSHelp.Help help = (Microsoft.VisualStudio.VSHelp.Help)base.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help));
            if (help != null)
            {
                try
                {
                    help.DisplayTopicFromURL(helpLocation);
                    Cursor.Current = Cursors.Arrow;
                }
                catch (Exception ex)
                {
                    throw new Exception(string.Format(Resources.WizardGatheringService_CannotGetHelpResource, helpLocation), ex);
                }
            }
        }
Example #7
0
        /// <summary>
        /// Invoke the property page help in response to an end-user request.
        /// </summary>
        /// <param name="pszHelpDir"></param>
        public void Help(string pszHelpDir)
        {
            System.IServiceProvider iPropertyPageSite =
                this.PropertyPageSite as System.IServiceProvider;
            if (iPropertyPageSite != null)
            {
                Microsoft.VisualStudio.VSHelp.Help service = iPropertyPageSite.GetService(
                    typeof(Microsoft.VisualStudio.VSHelp.Help)) as Microsoft.VisualStudio.VSHelp.Help;

                if (service != null)
                {
                    service.DisplayTopicFromF1Keyword(this.HelpKeyword);
                }
            }
        }
 public void UpdateHelpPage(string basepath, string recipeName, Microsoft.VisualStudio.VSHelp.Help helpService)
 {
     this.helpService = helpService;
     try
     {
         helpPage = GetHelpPage(basepath, recipeName);
         if (helpPage != "")
         {
             this.WizardPage.Wizard.HelpButton = true;
             this.WizardPage.Wizard.HelpButtonClicked += new CancelEventHandler(Wizard_HelpButtonClicked);
         }
     }
     catch (Exception)
     {
     }
 }
Example #9
0
 public void UpdateHelpPage(string basepath, string recipeName, Microsoft.VisualStudio.VSHelp.Help helpService)
 {
     this.helpService = helpService;
     try
     {
         helpPage = GetHelpPage(basepath, recipeName);
         if (helpPage != "")
         {
             this.WizardPage.Wizard.HelpButton         = true;
             this.WizardPage.Wizard.HelpButtonClicked += new CancelEventHandler(Wizard_HelpButtonClicked);
         }
     }
     catch (Exception)
     {
     }
 }
Example #10
0
        /// <summary>
        /// Opens a given uri in the help window.
        /// </summary>
        /// <param name="uri">The URI.</param>
        private void ShowHelp(string uri)
        {
            string helpLocation = ParseUri(uri);

            Microsoft.VisualStudio.VSHelp.Help help = (Microsoft.VisualStudio.VSHelp.Help)base.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help));
            if (help != null)
            {
                try
                {
                    help.DisplayTopicFromURL(helpLocation);
                    Cursor.Current = Cursors.Arrow;
                }
                catch (Exception ex)
                {
                    throw new Exception(string.Format(Resources.Navigator_CannotGetHelpResource, helpLocation), ex);
                }
            }
        }
Example #11
0
 private void wbPackageOverview_Navigating(object sender, WebBrowserNavigatingEventArgs e)
 {
     if (e.Url.ToString().ToLower().StartsWith("ms-help"))
     {
         Microsoft.VisualStudio.VSHelp.Help help = (Microsoft.VisualStudio.VSHelp.Help)base.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help));
         if (help != null)
         {
             e.Cancel = true;
             try
             {
                 help.DisplayTopicFromURL(e.Url.ToString());
                 Cursor.Current = Cursors.Arrow;
             }
             catch (Exception ex)
             {
                 throw new Exception(string.Format(Resources.Navigator_CannotGetHelpResource, e.Url.ToString()), ex);
             }
         }
     }
     return;
 }
Example #12
0
 void Wizard_HelpButtonClicked(object sender, CancelEventArgs e)
 {
     if (helpPage != "")
     {
         if (helpService == null)
         {
             helpService = (Microsoft.VisualStudio.VSHelp.Help)base.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help));
         }
         if (helpService != null)
         {
             try
             {
                 helpService.DisplayTopicFromURL(helpPage);
             }
             catch (Exception)
             {
             }
         }
         e.Cancel = true;
     }
 }
Example #13
0
        /// <devdoc>
        ///     Shows the given help topic.  This should contain a Url to the help
        ///     topic.  The topic will be displayed in
        ///     the environment's integrated help system.
        /// </devdoc>
        void IHelpService.ShowHelpFromUrl(string helpUrl)
        {
            Debug.Assert(provider != null, "Help service is in an invalid state.");
            Debug.Assert(helpUrl != null, "IHelpService.ShowHelpFromUrl called with a null string.");
            if ((provider == null) || (helpUrl == null))
            {
                return;
            }

            Microsoft.VisualStudio.VSHelp.Help help =
                (Microsoft.VisualStudio.VSHelp.Help)provider.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help));

            if (help != null)
            {
                try {
                    // Don't throw in case of topic not found.
                    help.DisplayTopicFromURL(helpUrl);
                } catch (COMException) {
                    // IVsHelp can causes a ComException to be thrown if the help
                    // topic isn't found.
                }
            }
        }
Example #14
0
        /// <devdoc>
        ///     Shows the help topic corresponding the specified keyword.
        ///     The topic will be displayed in
        ///     the environment's integrated help system.
        /// </devdoc>
        void IHelpService.ShowHelpFromKeyword(string helpKeyword)
        {
            Debug.Assert(provider != null, "Help service is in an invalid state.");
            Debug.Assert(helpKeyword != null, "IHelpService.ShowHelpFromKeyword called with a null string.");
            if ((provider == null) || (helpKeyword == null))
            {
                return;
            }

            Microsoft.VisualStudio.VSHelp.Help help =
                (Microsoft.VisualStudio.VSHelp.Help)provider.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help));

            bool topicFound = false;

            if (help != null)
            {
                try {
                    // This call will throw if the topic is not found.
                    help.DisplayTopicFromF1Keyword(helpKeyword);
                    // If the previous call doesn't throw, then the topic was found.
                    topicFound = true;
                } catch (COMException) {
                    // IVsHelp can causes a ComException to be thrown if the help
                    // topic isn't found.
                }
                if (!topicFound)
                {
                    try {
                        help.DisplayTopicFromKeyword(helpKeyword);
                    } catch (COMException) {
                        // IVsHelp can causes a ComException to be thrown if the help
                        // topic isn't found.
                    }
                }
            }
        }
 private void DeleteCourseDialog_HelpRequested(object sender, System.Windows.Forms.HelpEventArgs hlpevent)
 {
     Microsoft.VisualStudio.VSHelp.Help help = (Microsoft.VisualStudio.VSHelp.Help)m_applicationObject.GetObject("Help");
     help.DisplayTopicFromF1Keyword("vs.AMDeleteCourse");
 }
 void Wizard_HelpButtonClicked(object sender, CancelEventArgs e)
 {
     if (helpPage != "")
     {
         if (helpService == null)
         {
             helpService = (Microsoft.VisualStudio.VSHelp.Help)base.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help));
         }
         if (helpService != null)
         {
             try
             {
                 helpService.DisplayTopicFromURL(helpPage);
             }
             catch (Exception)
             {
             }
         }
         e.Cancel = true;
     }
 }