private void GetUpdateInfo()
        {
            var e = DownloadString(UpdateChannelInfo.GetUpdateChannelInfo());

            if (!e.Cancelled && e.Error == null)
            {
                CurrentUpdateInfo = UpdateInfo.FromString(e.Result);

                Settings.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
                if (!Settings.Default.UpdatePending)
                {
                    Settings.Default.UpdatePending = IsUpdateAvailable();
                }
            }

            GetUpdateInfoCompletedEventEvent?.Invoke(this, e);
        }
Esempio n. 2
0
        private void GetUpdateInfo()
        {
            Uri updateFileUri = new Uri(new Uri(Convert.ToString(Settings.Default.UpdateAddress)), new Uri(UpdateChannelInfo.FileName, UriKind.Relative));
            DownloadStringCompletedEventArgs e = DownloadString(updateFileUri);

            if (!e.Cancelled && e.Error == null)
            {
                _currentUpdateInfo = UpdateInfo.FromString(e.Result);

                Settings.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
                if (!Settings.Default.UpdatePending)
                {
                    Settings.Default.UpdatePending = IsUpdateAvailable();
                }
            }

            GetUpdateInfoCompletedEventEvent?.Invoke(this, e);
        }