예제 #1
0
        public bool IsUpdateRequired()
        {
            var honorSkippedVersion = !forceUpgrade;

            return(m_autoUpdator.IsUpdateRequired(m_autoUpdator.GetApplicationConfig(),
                                                  out versionInfo,
                                                  honorSkippedVersion));
        }
예제 #2
0
        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;
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
        /// <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);
            }
        }