Skip to content

Commit

Permalink
Installation bugfix for 19041.329
Browse files Browse the repository at this point in the history
  • Loading branch information
slavanap committed Jul 15, 2020
1 parent cd67fb5 commit 4ba56ee
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
namespace w10mu {

class UpdateItem {
dynamic _update;
readonly dynamic _update;

int GetSizeOrder(decimal size) {
int order;
Expand Down Expand Up @@ -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; } }
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 4ba56ee

Please sign in to comment.