Beispiel #1
0
        async void downloadOrCheckUpdateButtonClick(object sender, RoutedEventArgs e)
        {
            if (updateAvailableDownloadUrl != null)
            {
                MainWindow.OpenLink(updateAvailableDownloadUrl);
            }
            else
            {
                updatePanel.Visibility = Visibility.Collapsed;
                string downloadUrl = await AboutPage.CheckForUpdatesAsync(ILSpySettings.Load());

                AdjustUpdateUIAfterCheck(downloadUrl, true);
            }
        }
Beispiel #2
0
        public void ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings, bool forceCheck = false)
        {
            Task <string> result;

            if (forceCheck)
            {
                result = AboutPage.CheckForUpdatesAsync(spySettings);
            }
            else
            {
                result = AboutPage.CheckForUpdatesIfEnabledAsync(spySettings);
            }
            result.ContinueWith(task => AdjustUpdateUIAfterCheck(task, forceCheck), TaskScheduler.FromCurrentSynchronizationContext());
        }
Beispiel #3
0
        public async Task ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings, bool forceCheck = false)
        {
            // Don't check for updates if we're in an MSIX since they work differently
            if (WindowsVersionHelper.HasPackageIdentity)
            {
                return;
            }

            string downloadUrl;

            if (forceCheck)
            {
                downloadUrl = await AboutPage.CheckForUpdatesAsync(spySettings);
            }
            else
            {
                downloadUrl = await AboutPage.CheckForUpdatesIfEnabledAsync(spySettings);
            }

            AdjustUpdateUIAfterCheck(downloadUrl, forceCheck);
        }