private void Umod_InstallEnded(object sender, uMod.ProcessEndedEventArgs e) { this.Dispatcher.Invoke(() => { btnuModInstall.IsEnabled = true; if (e.ExitCode == 0) { var mmb = new ModernMessageBox(this); mmb.Show("uMod installation compelete.", "uMod Installed", MessageBoxButton.OK, MessageBoxImage.Information); } else { var mmb = new ModernMessageBox(this); mmb.Show($"uMod terminated with code {e.ExitCode}, which indicates an error.", "uMod Installation Error", MessageBoxButton.OK, MessageBoxImage.Error); } }); }
private void Umod_UpdateEnded(object sender, uMod.ProcessEndedEventArgs e) { this.Dispatcher.Invoke(() => { btnuModUpdate.IsEnabled = true; if (e.ExitCode == 0) { var mmb = new ModernMessageBox(this); mmb.Show("uMod update compelete.", "uMod Updated", MessageBoxButton.OK, MessageBoxImage.Information); } else if (e.ExitCode == 2) { var mmb = new ModernMessageBox(this); mmb.Show($"uMod did not need to install any updates.", "No Update Needed", MessageBoxButton.OK, MessageBoxImage.Information); } else { var mmb = new ModernMessageBox(this); mmb.Show($"uMod terminated with code {e.ExitCode}; unable to update uMod core or uMod apps.", "uMod Update Error", MessageBoxButton.OK, MessageBoxImage.Error); } }); }