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();
        }
Exemplo n.º 3
0
 public async Task Activate()
 {
     await loadScreen.Activate();
 }