private async Task CheckNewVersionAsync(Window window, bool exitApp) { var available = await this.Core.CheckNewVersionAsync(); if (!available) { return; } bool?dialogResult = null; var dialog = new VersionCheckWindow() { WindowStartupLocation = WindowStartupLocation.CenterOwner, Owner = window, }; dialogResult = dialog.ShowDialog(); //if (window != null) //{ // window.PopupDialog.Show(new VersionCheckPopup(), new Thickness(0), // HorizontalAlignment.Stretch, VerticalAlignment.Center, null, true); //} if (dialogResult == true) { Process.Start(this.Core.ProjectHomeUrl); if (exitApp) { await this.ExitAllAfterLibraryUnLockedAsync(); } } }
private void PresentVersionDialog(Check versionCheck) { // we will now offer this version, so it is the new reference for "wait until next release" LastReturnedVersion = versionCheck.AvailableVersion; // reset (to 7 day checks) ReminderForNextRelease = false; // present dialog VersionCheckWindow dialog = new VersionCheckWindow { DataContext = new VersionCheckViewModel(versionCheck) }; dialog.ShowDialog(); }