コード例 #1
0
        public DeprecatedFrameworkWindow(INuGetUIContext uiContext)
        {
            _initialized = false;
            _uiContext   = uiContext;
            InitializeComponent();
            _doNotShowCheckBox.IsChecked = DotnetDeprecatedPrompt.GetDoNotShowPromptState();

            _initialized = true;
        }
コード例 #2
0
ファイル: NuGetUI.cs プロジェクト: WeilerWebServices/NuGet
        private bool WarnAboutDotnetDeprecationImpl(IEnumerable<NuGetProject> projects)
        {
            var window = new DeprecatedFrameworkWindow(UIContext)
            {
                DataContext = DotnetDeprecatedPrompt.GetDeprecatedFrameworkModel(projects)
            };

            var dialogResult = window.ShowModal();
            return dialogResult ?? false;
        }
コード例 #3
0
ファイル: NuGetUI.cs プロジェクト: sohaib928/NuGet.Client
        public async Task <bool> WarnAboutDotnetDeprecationAsync(IEnumerable <IProjectContextInfo> projects, CancellationToken cancellationToken)
        {
            var result = false;

            DeprecatedFrameworkModel dataContext = await DotnetDeprecatedPrompt.GetDeprecatedFrameworkModelAsync(projects, cancellationToken);

            InvokeOnUIThread(() => { result = WarnAboutDotnetDeprecationImpl(dataContext); });

            return(result);
        }
コード例 #4
0
        public DeprecatedFrameworkWindow(INuGetUIContext uiContext)
        {
            _initialized = false;
            _uiContext   = uiContext;
            InitializeComponent();
            _doNotShowCheckBox.IsChecked = DotnetDeprecatedPrompt.GetDoNotShowPromptState();

            if (StandaloneSwitch.IsRunningStandalone)
            {
                Background = SystemColors.WindowBrush;
            }
            _initialized = true;
        }
コード例 #5
0
ファイル: UIActionEngine.cs プロジェクト: An575/NuGet.Client
        /// <summary>
        /// Warns the user about the fact that the dotnet TFM is deprecated.
        /// </summary>
        /// <returns>Returns true if the user wants to ignore the warning or if the warning does not apply.</returns>
        private bool ShouldContinueDueToDotnetDeprecation(
            INuGetUI uiService,
            IEnumerable <ResolvedAction> actions,
            CancellationToken token)
        {
            var projects = DotnetDeprecatedPrompt.GetAffectedProjects(actions);

            if (projects.Any())
            {
                return(uiService.WarnAboutDotnetDeprecation(projects));
            }

            return(true);
        }
コード例 #6
0
        private UserSettings LoadSettings()
        {
            var settings = Model.Context.UserSettingsManager.GetSettings(GetSettingsKey());

            if (PreviewWindow.IsDoNotShowPreviewWindowEnabled())
            {
                settings.ShowPreviewWindow = false;
            }

            if (DotnetDeprecatedPrompt.GetDoNotShowPromptState())
            {
                settings.ShowDeprecatedFrameworkWindow = false;
            }

            return(settings);
        }
コード例 #7
0
        private void SaveDoNotShowPreviewWindowSetting(bool doNotshow)
        {
            _uiContext.UserSettingsManager.ApplyShowDeprecatedFrameworkSetting(!doNotshow);

            DotnetDeprecatedPrompt.SaveDoNotShowPromptState(doNotshow);
        }