Esempio n. 1
0
        public void SetActiveApplication(IApplicationInstance application)
        {
            if (ActiveApplication != null)
            {
                // Suspend all screen activity - event listeners
                ActiveApplication.Suspend();
            }

            // Probably need to think of a nicer way to do this, but for now passing in null brings us back to our home screen
            ActiveApplication = application;

            // Ensure that the application has been initialized
            if (!ActiveApplication.IsInitialized)
            {
                ActiveApplication.Initialize();
            }
            else
            {
                // Every time an application becomes active, we call start, regardless of initialization status.
                ActiveApplication.Start();
            }
        }