Exemplo n.º 1
0
        private void gameInitializeTimer_Callback(object state)
        {
            bool gameLoaded = IconInteractionUtility.IsGameLoaded();

            if (gameLoaded)
            {
                System.Threading.Thread.Sleep(1000);
                IconInteractionUtility.DoPostInitialization();
                DoPostGameLaunchOperations();
                gameInitializeTimer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
            }
            else
            {
                gameInitializeTimer.Change(100, System.Threading.Timeout.Infinite);
            }
        }
        private void gameInitializeTimer_Callback(object state)
        {
            bool gameLoaded = iconInteractionUtility.IsGameLoaded();

            if (gameLoaded)
            {
                System.Threading.Thread.Sleep(1000);
                iconInteractionUtility.DoPostInitialization();
                DoPostGameLaunchOperations();
                gameInitializeTimer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
                this.eventAggregator.PublishOnUIThread(new GameLaunchedEvent());
            }
            else
            {
                gameInitializeTimer.Change(100, System.Threading.Timeout.Infinite);
            }
        }