Ejemplo n.º 1
0
        protected TestOptions? TestData; //this is very important to have too.

        /// <summary>
        /// Called by the bootstrapper's constructor at runtime to start the framework.
        /// </summary>
        protected async Task StartRuntimeAsync()
        {
            if (_mode == EnumGamePackageMode.None)
            {
                MessageBox.Show("The mode must be debug or production.  Therefore, closing out");
                CloseApp();
                return;
            }
            Application = Application.Current;
            StartUp();
            OS = EnumOS.WindowsDT;
            SetPersonalSettings(); //i think
            PrepareApplication();
            OurContainer = new GamePackageDIContainer();
            cons = OurContainer;
            ShowCurrentUser();
            FirstRegister();
            await ConfigureAsync();
            if (_mode == EnumGamePackageMode.Debug)
            {
                await RegisterTestsAsync();
            }
            if (UseMultiplayerProcesses)
            {
                ///MessageBox.Show("Needs to figure out the multiplayer processes");
                //UIPlatform.ExitApp();
                //return;
                OurContainer.RegisterType<BasicMessageProcessing>(true);
                IRegisterNetworks tempnets = OurContainer.Resolve<IRegisterNetworks>();
                tempnets.RegisterMultiplayerClasses(OurContainer);
            }
            LinkViewModelViewAssemblies();
            await DisplayRootViewForAsync(); //has to do here now.
        }
        protected TestOptions?TestData;  //this is very important to have too.

        /// <summary>
        /// Called by the bootstrapper's constructor at runtime to start the framework.
        /// </summary>
        protected async Task StartRuntimeAsync()
        {
            if (_mode == EnumGamePackageMode.None)
            {
                //no messageboxes are allowed.
                return;
            }
            Application = Application.Current;
            StartUp();
            OurContainer = new GamePackageDIContainer();
            CustomPlatform.SetUp(OurContainer);
            //IScreen screen = OurContainer.Resolve<IScreen>();
            IGamePackageScreen screen = OurContainer.Resolve <IGamePackageScreen>();

            screen.CalculateScreens(); //try here.
            cons = OurContainer;
            FirstRegister();
            await ConfigureAsync();

            if (_mode == EnumGamePackageMode.Debug)
            {
                await RegisterTestsAsync();
            }
            if (UseMultiplayerProcesses)
            {
                ///MessageBox.Show("Needs to figure out the multiplayer processes");
                //UIPlatform.ExitApp();
                //return;
                OurContainer.RegisterType <BasicMessageProcessing>(true);
                IRegisterNetworks tempnets = OurContainer.Resolve <IRegisterNetworks>();
                tempnets.RegisterMultiplayerClasses(OurContainer);
            }
            LinkViewModelViewAssemblies();
            await DisplayRootViewForAsync(); //has to do here now.
        }