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); } }
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()); }
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); }