public void UpdateAlertMadeChoice(SUUpdateAlert anAlert, SUUpdateAlertChoice choice, bool shouldCloseWindowIfNeeded) { Host.SetObjectForUserDefaultsKey(null, SUConstants.SUSkippedVersionKey); switch (choice) { case SUUpdateAlertChoice.SUInstallUpdateChoice: // Download! anAlert.SwitchToDownloadAction(); DownloadUpdate(); break; case SUUpdateAlertChoice.SUSkipThisVersionChoice: Host.SetObjectForUserDefaultsKey(updateItem.VersionString, SUConstants.SUSkippedVersionKey); anAlert.Delegate = null; if (shouldCloseWindowIfNeeded) { anAlert.Window.Close(); } alert = null; AbortUpdate(); break; case SUUpdateAlertChoice.SURemindMeLaterChoice: anAlert.Delegate = null; if (shouldCloseWindowIfNeeded) { anAlert.Window.Close(); } alert = null; AbortUpdate(); break; } }
private void MakeChoice(SUUpdateAlertChoice choice) { if (Delegate != null) { Delegate.UpdateAlertMadeChoice(this, choice, true); } else { // Eeek! Panic! this.Window.Close(); } }