示例#1
0
        public InfartBootstrap(
            ITextFileLoader textFileAssetsLoader,
            ISettingsRepository settingsRepository,
            IWebPageOpener webPageOpener,
            CultureInfo gameCulture,
            bool isPc,
            bool isFullScreen,
            Uri rateMeUri,
            int?deviceWidth  = null,
            int?deviceHeight = null)
        {
            _isPc = isPc;

            Window.Title = GameName;

            _rateMeUri    = rateMeUri;
            _currentState = RunningStates.Splashscreen;

            _textFileAssetsLoader = textFileAssetsLoader;
            _settingsRepository   = settingsRepository;
            _webPageOpener        = webPageOpener;
            _gameCulture          = gameCulture;

            GraphicsDeviceManager = new GraphicsDeviceManager(this)
            {
                SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeLeft,
                IsFullScreen          = isFullScreen
            };

            if (deviceWidth != null && deviceHeight != null)
            {
                GraphicsDeviceManager.PreferredBackBufferWidth  = deviceWidth.Value;
                GraphicsDeviceManager.PreferredBackBufferHeight = deviceHeight.Value;
            }

            _localizedStringsRepository = new InMemoryLocalizedStringsRepository(new Dictionary <string, string>());
        }
示例#2
0
 private void _splashScreenAssetsLoader_Completed(object sender, EventArgs e)
 {
     _splashScreenAssetsLoader = null;
     _orchestrator.SetMenuState();
     _currentState = RunningStates.Running;
 }
示例#3
0
 public clsRunningResult(RunningStates state, object returnValue, String message)
 {
     ReturnValue  = returnValue;
     RunningState = state;
     this.message = message;
 }
示例#4
0
 private void AddLog(RunningStates state)
 {
     lbLog.Items.Add($"[{DateTime.Now.ToLongTimeString()}{(lightMode ? "" : $" | {totalT}")}]" +
示例#5
0
 public clsRunningResult(RunningStates state, object returnValue)
     : this(state, returnValue, "")
 {
 }