コード例 #1
0
 public DatabaseUpdater()
 {
     LogProvider.Log("Initializing Database updater");
     myDispatcher = Dispatcher.CurrentDispatcher;
     ldScreen     = new LoadingScreen("Updating database...");
     ldScreen.Show();
     ldScreen.Activate();
 }
コード例 #2
0
        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();
        }
コード例 #3
0
 public async Task Activate()
 {
     await loadScreen.Activate();
 }