public bool IsUpdateRequired() { var honorSkippedVersion = !forceUpgrade; return(m_autoUpdator.IsUpdateRequired(m_autoUpdator.GetApplicationConfig(), out versionInfo, honorSkippedVersion)); }
public void Update() { var autoUpdaterConfig = autoUpdater.GetApplicationConfig(); NetSparkleAppCastItem latestVersion; if (autoUpdater.IsUpdateRequired(autoUpdaterConfig, out latestVersion)) { autoUpdater.ShowUpdateNeededUI(latestVersion); } }
private void bckWorker_DoWork(object sender, DoWorkEventArgs e) { // get the config NetSparkleConfiguration config = _sparkle.GetApplicationConfig(); // check for updats NetSparkleAppCastItem latestVersion; Boolean bUpdateRequired = _sparkle.IsUpdateRequired(config, out latestVersion); // save the result SparkleRequestedUpdate = bUpdateRequired; this.latestVersion = latestVersion; }
private void bgworkerUpdate_DoWork(object sender, DoWorkEventArgs e) { NetSparkleAppCastItem lastVersion; if (m_autoUpdator.IsUpdateRequired(m_autoUpdator.GetApplicationConfig(), out lastVersion)) { e.Result = lastVersion; } else { e.Result = null; } }
/// <summary> /// Check for product updates. /// </summary> private void mainCheckForUpdates_Click(object sender, EventArgs e) { bool useBeta = Preferences.StandardPreferences.UseBeta; _sparkle = new Sparkle(useBeta ? Constants.BetaAppCastURL : Constants.AppCastURL); // Make sure INI file changes get preserved Preferences.Save(); NetSparkleConfiguration config = _sparkle.GetApplicationConfig(); NetSparkleAppCastItem latestVersion; Boolean bUpdateRequired = _sparkle.IsUpdateRequired(config, out latestVersion); _sparkle.installAndRelaunch += _sparkle_installAndRelaunch; if (bUpdateRequired) { _sparkle.ShowUpdateNeededUI(latestVersion); } else { MessageBox.Show(String.Format(Resources.LatestVersion, Program.VersionString), Resources.LatestVersionTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); } }