private void TryInitializeXna()
        {
            RegisterCommonEngineSingletons();
            game   = new XnaGame(this);
            window = new XnaWindow(game);
            window.ViewportPixelSize = settings.Resolution;
            RegisterInstance(window);
            RegisterSingleton <WindowsSystemInformation>();
            var device = new XnaDevice(game, window, settings);

            RegisterInstance(device);
            RegisterSingleton <Drawing>();
            RegisterSingleton <BatchRenderer2D>();
            RegisterSingleton <BatchRenderer3D>();
            game.StartXnaGameToInitializeGraphics();
            RegisterInstance(game);
            RegisterInstance(game.Content);
            RegisterSingleton <XnaSoundDevice>();
            RegisterSingleton <XnaScreenshotCapturer>();
            RegisterSingleton <XnaMouse>();
            RegisterSingleton <XnaKeyboard>();
            RegisterSingleton <XnaTouch>();
            RegisterSingleton <XnaGamePad>();
            Register <InputCommands>();
            if (IsAlreadyInitialized)
            {
                throw new UnableToRegisterMoreTypesAppAlreadyStarted();
            }
        }
		private void TryInitializeXna()
		{
			RegisterCommonEngineSingletons();
			game = new XnaGame(this);
			window = new XnaWindow(game);
			window.ViewportPixelSize = settings.Resolution;
			RegisterInstance(window);
			RegisterSingleton<WindowsSystemInformation>();
			var device = new XnaDevice(game, window, settings);
			RegisterInstance(device);
			RegisterSingleton<Drawing>();
			RegisterSingleton<BatchRenderer2D>();
			RegisterSingleton<BatchRenderer3D>();
			game.StartXnaGameToInitializeGraphics();
			RegisterInstance(game);
			RegisterInstance(game.Content);
			RegisterSingleton<XnaSoundDevice>();
			RegisterSingleton<XnaScreenshotCapturer>();
			RegisterSingleton<VideoPlayer>();
			RegisterSingleton<XnaMouse>();
			RegisterSingleton<XnaKeyboard>();
			RegisterSingleton<XnaTouch>();
			RegisterSingleton<XnaGamePad>();
			Register<InputCommands>();
			if (IsAlreadyInitialized)
				throw new UnableToRegisterMoreTypesAppAlreadyStarted();
		}