예제 #1
0
        private void LearnMoreHyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
        {
            if (e.Uri == null)
            {
                return;
            }

            VisualStudioNavigateToLinkService.StartBrowser(e.Uri);
            e.Handled = true;
        }
예제 #2
0
        private void OpenDiagnosticHelpLinkHandler(object sender, EventArgs e)
        {
            if (_tracker.SelectedDiagnosticItems.Length != 1)
            {
                return;
            }

            var uri = _tracker.SelectedDiagnosticItems[0].GetHelpLink();

            if (uri != null)
            {
                VisualStudioNavigateToLinkService.StartBrowser(uri);
            }
        }
        private void ShowInfoBarIfRequired()
        {
            if (_infoBarShown)
            {
                return;
            }

            // Show info bar.
            _workspace.Services.GetRequiredService <IErrorReportingService>()
            .ShowGlobalErrorInfo(ServicesVSResources.Visual_Studio_has_suspended_some_advanced_features_to_improve_performance,
                                 exception: null,
                                 new InfoBarUI(ServicesVSResources.Re_enable, InfoBarUI.UIKind.Button, RenableBackgroundAnalysis),
                                 new InfoBarUI(ServicesVSResources.Learn_more, InfoBarUI.UIKind.HyperLink,
                                               () => VisualStudioNavigateToLinkService.StartBrowser(new Uri(LowVMMoreInfoLink)), closeAfterAction: false));

            _infoBarShown = true;
        }
예제 #4
0
        private void ShowInfoBarIfRequired()
        {
            if (_workspace.Options.GetOption(RuntimeOptions.BackgroundAnalysisSuspendedInfoBarShown))
            {
                // Info bar already shown.
                return;
            }

            // Show info bar.
            _workspace.Services.GetRequiredService <IErrorReportingService>()
            .ShowGlobalErrorInfo(ServicesVSResources.Visual_Studio_has_suspended_some_advanced_features_to_improve_performance,
                                 new InfoBarUI(ServicesVSResources.Re_enable, InfoBarUI.UIKind.Button, RenableBackgroundAnalysis),
                                 new InfoBarUI(ServicesVSResources.Learn_more, InfoBarUI.UIKind.HyperLink,
                                               () => VisualStudioNavigateToLinkService.StartBrowser(new Uri(LowVMMoreInfoLink)), closeAfterAction: false));

            // Update info bar shown state.
            _workspace.TryApplyChanges(_workspace.CurrentSolution.WithOptions(_workspace.Options
                                                                              .WithChangedOption(RuntimeOptions.BackgroundAnalysisSuspendedInfoBarShown, true)));
        }