예제 #1
0
        private async Task CheckForUpdates()
        {
            if (IsCheckInProgress || IsLatestVersionAvailable)
            {
                return;
            }

            IsCheckInProgress        = true;
            IsLatestVersionAvailable = false;
            UpdateText = string.Empty;
            await CheckForUpdatesComplete(applicationUpdateService.GetLatestReleaseFromServer());
        }
예제 #2
0
        private void CheckForUpdates()
        {
            if (IsCheckInProgress)
            {
                return;
            }

            IsCheckInProgress        = true;
            IsLatestVersionAvailable = false;
            UpdateText = string.Empty;
            Task.Run(() => _applicationUpdateService.GetLatestReleaseFromServer(includeAlpha: true))
            .ContinueWith(CheckForUpdatesComplete);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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();
        }
예제 #5
0
        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;
            }
        }