示例#1
0
 void ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings)
 {
     AboutPage.CheckForUpdatesIfEnabledAsync(spySettings).ContinueWith(
         delegate(Task <string> task) {
         if (task.Result != null)
         {
             updateAvailableDownloadUrl      = task.Result;
             updateAvailablePanel.Visibility = Visibility.Visible;
         }
     },
         TaskScheduler.FromCurrentSynchronizationContext()
         );
 }
示例#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());
        }
示例#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);
        }