From 4ba56ee3b4907e5ec29609d391ea6f26753522cf Mon Sep 17 00:00:00 2001 From: Vyacheslav Napadovsky Date: Wed, 15 Jul 2020 18:28:40 -0400 Subject: [PATCH] Installation bugfix for 19041.329 --- MainWindow.xaml.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index fbc0755..d1a24c6 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -34,7 +34,7 @@ namespace w10mu { class UpdateItem { - dynamic _update; + readonly dynamic _update; int GetSizeOrder(decimal size) { int order; @@ -111,7 +111,6 @@ public UpdateItem(dynamic update) { public bool IsChecked { get; set; } public string Title { get; } public string Description { get; } - //public bool IsHidden { get; set; } public dynamic Update { get { return _update; } } public bool EulaAccepted { get { return _update.EulaAccepted; } } @@ -195,16 +194,7 @@ private async void Install_Click(object sender, RoutedEventArgs e) { downloader.Updates = updatesToInstall; await Task.Run(() => { downloader.Download(); }); - bool rebootMayBeRequired = false; - for (int i = 0; i < updatesToInstall.Count; ++i) - if (updatesToInstall.Item(i).InstallationBehavior.RebootBehavior > 0) - rebootMayBeRequired = true; - - string warnText = rebootMayBeRequired - ? "These updates may require a reboot." - : "Installation ready."; - - if (MessageBox.Show(this, warnText + " Continue?", "Notice", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { + if (MessageBox.Show(this, "Installation ready. Continue?", "Notice", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { _status.Text = "Installing updates..."; dynamic installer = _updateSession.CreateUpdateInstaller();