コード例 #1
0
        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;
            }
        }
コード例 #2
0
 private void MakeChoice(SUUpdateAlertChoice choice)
 {
     if (Delegate != null)
     {
         Delegate.UpdateAlertMadeChoice(this, choice, true);
     }
     else
     {
         // Eeek! Panic!
         this.Window.Close();
     }
 }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
ファイル: SUUpdateAlert.cs プロジェクト: klm1/SparkleDotNET
 private void MakeChoice(SUUpdateAlertChoice choice)
 {
     if (Delegate != null) {
         Delegate.UpdateAlertMadeChoice(this, choice, true);
     } else {
         // Eeek! Panic!
         this.Window.Close();
     }
 }