Exemplo n.º 1
0
        void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
            try
            {
                if (e.Error == null)
                {
                    string response = e.Result;
                    var    versions = ReleaseVersion.Parse(response);
                    var    updates  = versions.Where(version => version.Version.CompareTo(CurrentVersion) > 0);

                    var update = updates.OrderBy(version => version.Version).LastOrDefault();
                    if (update != null)
                    {
                        UpdateFound = true;
                        UpdateUrl   = update.DownloadPage;
                        Done();
                        return;
                    }
                }
                UpdateUrl   = "";
                UpdateFound = false;
                Done();
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "Exception");
                Done();
            }
        }
Exemplo n.º 2
0
        void CheckForNewerVersion(string releases)
        {
            var versions = ReleaseVersion.Parse(releases);
            var updates  = versions.Where(version => version.Version.CompareTo(CurrentVersion) > 0);

            var update = updates.OrderBy(version => version.Version).LastOrDefault();

            if (update != null)
            {
                UpdateFound = true;
                UpdateUrl   = update.DownloadPage;
                Done();
                return;
            }
            UpdateUrl   = "";
            UpdateFound = false;
            Done();
        }
Exemplo n.º 3
0
        void CheckForNewerVersion(string releases)
        {
            var versions = ReleaseVersion.Parse(releases);
            var updates  = ReleaseVersion.GetNewerVersions(CurrentVersion, AppSettings.CheckForReleaseCandidates, versions);

            var update = updates.OrderBy(version => version.Version).LastOrDefault();

            if (update != null)
            {
                UpdateFound = true;
                UpdateUrl   = update.DownloadPage;
                NewVersion  = update.Version.ToString();
                Done();
                return;
            }
            UpdateUrl   = "";
            UpdateFound = false;
            Done();
        }