public DeprecatedFrameworkWindow(INuGetUIContext uiContext) { _initialized = false; _uiContext = uiContext; InitializeComponent(); _doNotShowCheckBox.IsChecked = DotnetDeprecatedPrompt.GetDoNotShowPromptState(); _initialized = true; }
private bool WarnAboutDotnetDeprecationImpl(IEnumerable<NuGetProject> projects) { var window = new DeprecatedFrameworkWindow(UIContext) { DataContext = DotnetDeprecatedPrompt.GetDeprecatedFrameworkModel(projects) }; var dialogResult = window.ShowModal(); return dialogResult ?? false; }
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); }
public DeprecatedFrameworkWindow(INuGetUIContext uiContext) { _initialized = false; _uiContext = uiContext; InitializeComponent(); _doNotShowCheckBox.IsChecked = DotnetDeprecatedPrompt.GetDoNotShowPromptState(); if (StandaloneSwitch.IsRunningStandalone) { Background = SystemColors.WindowBrush; } _initialized = true; }
/// <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); }
private UserSettings LoadSettings() { var settings = Model.Context.UserSettingsManager.GetSettings(GetSettingsKey()); if (PreviewWindow.IsDoNotShowPreviewWindowEnabled()) { settings.ShowPreviewWindow = false; } if (DotnetDeprecatedPrompt.GetDoNotShowPromptState()) { settings.ShowDeprecatedFrameworkWindow = false; } return(settings); }
private void SaveDoNotShowPreviewWindowSetting(bool doNotshow) { _uiContext.UserSettingsManager.ApplyShowDeprecatedFrameworkSetting(!doNotshow); DotnetDeprecatedPrompt.SaveDoNotShowPromptState(doNotshow); }