public DatabaseUpdater() { LogProvider.Log("Initializing Database updater"); myDispatcher = Dispatcher.CurrentDispatcher; ldScreen = new LoadingScreen("Updating database..."); ldScreen.Show(); ldScreen.Activate(); }
public void GetGames() { Games = null; LoadingScreen loadingScreen = new LoadingScreen("Detecting installed games..."); loadingScreen.Show(); loadingScreen.Activate(); Dispatcher myThread = Dispatcher.CurrentDispatcher; Task task = new Task(async() => { Games = new ObservableCollection <Game>(GamesUtil.GetInstalledGames()); await myThread.BeginInvoke(DispatcherPriority.Normal, new Action(() => { loadingScreen.Close(); })); }); task.Start(); }
public async Task Activate() { await loadScreen.Activate(); }