private async Task CheckForUpdates() { if (IsCheckInProgress || IsLatestVersionAvailable) { return; } IsCheckInProgress = true; IsLatestVersionAvailable = false; UpdateText = string.Empty; await CheckForUpdatesComplete(applicationUpdateService.GetLatestReleaseFromServer()); }
private void CheckForUpdates() { if (IsCheckInProgress) { return; } IsCheckInProgress = true; IsLatestVersionAvailable = false; UpdateText = string.Empty; Task.Run(() => _applicationUpdateService.GetLatestReleaseFromServer(includeAlpha: true)) .ContinueWith(CheckForUpdatesComplete); }
private void CheckForUpdates() { if (IsCheckInProgress) { return; } IsCheckInProgress = true; IsLatestVersionAvailable = false; UpdateText = string.Empty; var scheduler = TaskScheduler.FromCurrentSynchronizationContext(); Task <string> .Factory.StartNew(() => _applicationUpdateService.GetLatestReleaseFromServer(true)) .ContinueWith(CheckForUpdatesComplete, scheduler); }
public async void Run() { ShellViewModel.IsQueueViewVisible = true; ShellViewModel.Show(); // Let the UI to initialize first before loading the queuelist. await Dispatcher.CurrentDispatcher.InvokeAsync(ManagerController.RestoreColumn, DispatcherPriority.ApplicationIdle); await Dispatcher.CurrentDispatcher.InvokeAsync(QueueController.Run, DispatcherPriority.ApplicationIdle); if (await CheckFor64BitVersion()) { _appSettings.TMLastCheck = DateTime.MinValue.ToUniversalTime(); return; } if (_appSettings.LastUpdateCheck != DateTime.Today) { var executingUpdate = await CheckForUpdatesComplete(_applicationUpdateService.GetLatestReleaseFromServer()); _appSettings.LastUpdateCheck = DateTime.Today; if (executingUpdate) { _appSettings.TMLastCheck = DateTime.MinValue.ToUniversalTime(); return; } } CheckForWritableFolder(); await CheckForTMData(); ShellViewModel.SetThumbButtonInfosCommands(); CheckForVCRedistributable(); }
public async void Run() { ShellViewModel.IsQueueViewVisible = true; ShellViewModel.Show(); // Let the UI to initialize first before loading the queuelist. await Dispatcher.CurrentDispatcher.InvokeAsync(ManagerController.RestoreColumn, DispatcherPriority.ApplicationIdle); await Dispatcher.CurrentDispatcher.InvokeAsync(QueueController.Run, DispatcherPriority.ApplicationIdle); if (_appSettings.LastUpdateCheck != DateTime.Today) { await CheckForUpdatesComplete(_applicationUpdateService.GetLatestReleaseFromServer()); _appSettings.LastUpdateCheck = DateTime.Today; } }