Ejemplo n.º 1
0
        private void checkNowButton_Click(object sender, EventArgs e)
        {
            uc = new UpdateChecker(UPDATE_CHECKER_USERINITIATED);

            if (uc.isNewUpdate)
            {
                sets.shouldCheckForUpdates = enableAutoUpdates.Checked;
                sets.Save(); // save in case the user changed the update setting before clicking Check Now
                             // so that their setting is preserved in the popup

                UpdateInformation updateInfoWindow = new UpdateInformation(uc.releaseNotes, uc.downloadURL);
                updateInfoWindow.ShowDialog();
            }

            // reload options in case they changed in that dialogue

            sets.Reload();
            enableAutoUpdates.Checked = sets.shouldCheckForUpdates;
            if (!hasChangedSpinBox) // but not if the user was editing here a moment ago
            {
                checkIntervalSpinBox.Value = sets.updateCheckFrequency;
            }

            if (sets.shouldCheckForUpdates == false)
            {
                checkIntervalSpinBox.Enabled = false;
            }
        }
Ejemplo n.º 2
0
 private void updateCheckWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (updateChecker.isNewUpdate)
     {
         UpdateInformation updateInfoWindow = new UpdateInformation(updateChecker.releaseNotes, updateChecker.downloadURL);
         updateInfoWindow.ShowDialog();
     }
 }