Пример #1
0
        //still needs to be able to override it.
        //so for game of life, has the option for another screen.
        protected override async Task GetStartingScreenAsync()
        {
            if (ColorScreen != null)
            {
                await CloseSpecificChildAsync(ColorScreen);
            }

            ColorScreen = MainContainer.Resolve <IBeginningColorViewModel>();
            await LoadScreenAsync(ColorScreen);
        }
Пример #2
0
        public UIMainFrame()
        {
            InitializeComponent();
            MainContainer.TabVisible = false;
            MainContainer.BringToFront();
            MainContainer.TabPages.Clear();

            MainContainer.BeforeRemoveTabPage += MainContainer_BeforeRemoveTabPage;
            MainContainer.AfterRemoveTabPage  += MainContainer_AfterRemoveTabPage;
        }
Пример #3
0
        public virtual void RegisterCurrentDependencyResolver()
        {
            MainContainer container = new MainContainer();

            container.RegisterControllers(typeof(BaseController).Assembly);
            container.RegisterServices();
            container.EnableMvc();

            DependencyResolver.SetResolver(new LightInjectMvcDependencyResolver(container));
        }
Пример #4
0
        public FirebaseContextBase()
        {
            _networkService       = MainContainer.ResolveInstance <INetworkService>();
            _firebaseSettings     = MainContainer.ResolveInstance <IFirebaseSettings>();
            _modelConfiguration   = MainContainer.ResolveInstance <IDocumentConfiguration <TModel> >();
            _documentModelBuilder = MainContainer.ResolveInstance <IDocumentModelBuilder <TModel> >();

            Configure(_modelConfiguration);

            _documentModelBuilder.SetModelConfiguration(_modelConfiguration);
        }
Пример #5
0
        public static void Initalization()
        {
            var settings = MainContainer.ResolveInstance <IFirebaseSettings>();

            if (settings == null)
            {
                throw new InvalidConfigException(ExceptionMessages.MISSING_IMPLEMENTATION);
            }

            settings.Load();
        }
Пример #6
0
 private void ButtonNext_Click(object sender, RoutedEventArgs e)
 {
     if (MainContainer.Content is IWizardPage)
     {
         Page nextPage;
         if (((IWizardPage)MainContainer.Content).TryCreateNextPage(_context, out nextPage))
         {
             MainContainer.Navigate(nextPage);
         }
     }
 }
        public async Task LoadColorScreenAsync()
        {
            if (ColorScreen != null)
            {
                return;
            }
            await CloseMainAsync("Already closed main to load colors.  Rethink");

            ColorScreen = MainContainer.Resolve <RageColorViewModel>();
            await LoadScreenAsync(ColorScreen);
        }
Пример #8
0
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            // Syncfusion key
            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MjQ3MzU2QDMxMzgyZTMxMmUzMFk3T0E4L09Pb1lyYmpqd25jM3RNNzZmSXVkTFJDeXRhSDNzVEYwQ01MZE09");

            this.InitializeComponent();
            this.Suspending += OnSuspending;

            MainContainer.RegisterService();
            _Context = MainContainer.Container.GetService <DeskberryContext>();
        }
Пример #9
0
        async Task INewGameNM.NewGameReceivedAsync(string data)
        {
            if (OpeningScreen != null)
            {
                throw new BasicBlankException("The opening screen should have been closed.  Rethink");
            }
            await RestoreAsync(); //take a risk here.

            IClientUpdateGame clientUpdate = MainContainer.Resolve <IClientUpdateGame>();
            await clientUpdate.UpdateGameAsync(data);
        }
 private void SetObjects()
 {
     if (_deckInfo != null)
     {
         return;
     }
     PopulateContainer(this);
     _deckInfo   = MainContainer !.Resolve <ThreeLetterFunDeckInfo>(); //need the full one.
     _thisGlobal = MainContainer.Resolve <GlobalHelpers>();
     _mainGame   = MainContainer.Resolve <ThreeLetterFunMainGameClass>();
 }
Пример #11
0
        async Task IHandleAsync <RoundOverEventModel> .HandleAsync(RoundOverEventModel message)
        {
            NewRoundScreen = MainContainer.Resolve <INewRoundVM>();
            await LoadScreenAsync(NewRoundScreen);

            CommandContainer.ManuelFinish = true;
            CommandContainer.IsExecuting  = true;
            //i think this may be it (?)
            //CommandContainer.ManuelFinish = false;
            //CommandContainer.IsExecuting = false;
        }
 private void LoadControls()
 {
     if (IsLoaded == true)
     {
         return;
     }
     ScoreSheets = MainContainer.Resolve <BowlingScoresCP>();
     DiceBoard   = MainContainer.Resolve <BowlingDiceSet>();
     DiceBoard.FirstLoad(); //forgot this.
     IsLoaded = true;       //i think needs to be here.
 }
        public async Task LoadBidScreenAsync()
        {
            if (BidScreen != null)
            {
                return;
            }
            await CloseMainAsync("Already closed main to load bidding.  Rethink");

            BidScreen = MainContainer.Resolve <RageBiddingViewModel>();
            await LoadScreenAsync(BidScreen);
        }
Пример #14
0
        protected override async Task GetStartingScreenAsync()
        {
            LifeBoardGameSaveInfo saveRoot = MainContainer.Resolve <LifeBoardGameSaveInfo>();

            if (saveRoot.GameStatus == EnumWhatStatus.NeedChooseGender)
            {
                await LoadGenderAsync();

                return;
            }
            await base.GetStartingScreenAsync();
        }
Пример #15
0
        public void Dispose()
        {
            _controller.SoundPlayed -= OnSoundPlayed;

            foreach (var player in _soundPlayers)
            {
                player.Value.Dispose();
            }

            _controller.Dispose();
            MainContainer.Dispose();
        }
Пример #16
0
        public Node ParsePass()
        {
            Token varname = consume(TokenType.IDENTIFIER, "Expected variable name after 'pass'");

            consume(TokenType.LEFT_BRACE, "Expected '{' for the pass statement");

            MainContainer block = new MainContainer(GetBlock());

            consume(TokenType.SEMICOLON, "Expected ';' after pass statement");

            return(new PassNode(varname, block));
        }
Пример #17
0
        private async Task LoadMainScreenAsync()
        {
            if (FirstScreen == null)
            {
                return; //because main screen is already loaded.
            }
            await CloseSpecificChildAsync(FirstScreen);

            FirstScreen = null;
            MainVM      = MainContainer.Resolve <GolfCardGameMainViewModel>();
            await LoadScreenAsync(MainVM);
        }
        private async Task LoadMainGameAsync()
        {
            if (FaceoffScreen == null)
            {
                throw new BasicBlankException("Faceoff should have been loaded first.  Rethink");
            }
            await CloseSpecificChildAsync(FaceoffScreen);

            FaceoffScreen = null;
            MainVM        = MainContainer.Resolve <BladesOfSteelMainViewModel>();
            await LoadScreenAsync(MainVM);
        }
Пример #19
0
        async Task IHandleAsync <NewRoundEventModel> .HandleAsync(NewRoundEventModel message)
        {
            ClearSubscriptions();
            await CloseMainAsync("The main screen should have been not null when choosing new round.  Rethink");
            await CloseRoundAsync();
            await NewGameOrRoundRequestedAsync();

            //await LoadGameScreenAsync();
            IRequestNewGameRound gameRound = MainContainer.Resolve <IRequestNewGameRound>();
            await gameRound.RequestNewRoundAsync();

            //hint:  either another message or somebody else would send the same message for the client.
        }
Пример #20
0
 public int GetDeckCount()
 {
     if (_deckCount == null)
     {
         PopulateContainer(this);
         _deckCount = MainContainer !.Resolve <IDeckCount>(); //i think
         if (MainContainer.RegistrationExist <INewCard <D> >())
         {
             _newCard = MainContainer.Resolve <INewCard <D> >();
         }
     }
     return(_deckCount.GetDeckCount());
 }
 private async Task LoadModeAsync()
 {
     if (ModeScreen != null)
     {
         return;
     }
     if (MainVM != null)
     {
         await CloseMainAsync("Cannot close game from mode.  Rethink");
     }
     ModeScreen = MainContainer.Resolve <XactikaModeViewModel>();
     await LoadScreenAsync(ModeScreen);
 }
Пример #22
0
 public static void initColor()
 {
     if (EditorGUIUtility.isProSkin)
     {
         background = MainContainer.fromRGB(124f, 96f, 77f);
         buttons    = MainContainer.fromRGB(193f, 144f, 92f);
     }
     else
     {
         background = MainContainer.fromRGB(209f, 189f, 169f);
         buttons    = MainContainer.fromRGB(203f, 164f, 112f);
     }
 }
Пример #23
0
 void ReleaseDesignerOutlets()
 {
     if (MainContainer != null)
     {
         MainContainer.Dispose();
         MainContainer = null;
     }
     if (NewWordTextField != null)
     {
         NewWordTextField.Dispose();
         NewWordTextField = null;
     }
 }
Пример #24
0
 public MainContainerPresenter(MainContainer mainContainer)
 {
     _mainContainer = mainContainer;
     _editorFactory = Documento.getInstance().EditorFactory;
     _deleters      = new Dictionary <Type, Deleter>();
     FillDeleters();
     FillNuovoMenu();
     OnLibreriaChange(this, EventArgs.Empty);
     _mainContainer.CambiaModelloButton.Click     += OnModelChangeClick;
     _mainContainer.LibreriaView.MouseDoubleClick += OnLibreriaDoubleClick;
     _mainContainer.LibreriaView.MouseClick       += OnLibreriaClick;
     _mainContainer.NuovoProgetto.Click           += OnNuovoProgettoClick;
     Documento.getInstance().LibreriaChanged += OnLibreriaChange;
 }
Пример #25
0
 async Task ILoadGameNM.LoadGameAsync(string data) //first time only.
 {
     if (OpeningScreen != null)
     {
         throw new BasicBlankException("The opening screen should have been closed.  Rethink");
     }
     if (MainVM != null)
     {
         throw new BasicBlankException("The main screen was already opened.  Rethink");
     }
     //await LoadGameScreenAsync();
     ILoadClientGame client = MainContainer.Resolve <ILoadClientGame>();
     await client.LoadGameAsync(data);
 }
Пример #26
0
        public override void LoadContent()
        {
            debugPane = new DebugPane();
            MainContainer.remove(MainContainer.Children.ToArray());
            MainContainer.add(debugPane);

            // TODO temporary solution?
            BattleManager = ((Besmash)ScreenManager.Game).BattleManager;
            BattlePane    = new BattlePane(BattleManager);
            MainContainer.add(BattlePane);
            base.LoadContent();

            TileMap.MapAlpha = 0;
        }
Пример #27
0
        private void btnSaveConnection_Click(object sender, EventArgs e)
        {
            var container = new MainContainer(txtConnectionString.Text, txtScheme.Text, txtTableName.Text);

            var writer = new XmlSerializer(container.GetType());

            var path = Properties.Settings.Default.pathToSettings;

            using (var file = System.IO.File.Create(path))
            {
                writer.Serialize(file, container);
            }
            MessageBox.Show(Resources.App_btnSaveConnection_Click_File_is_Saved);
        }
Пример #28
0
        protected override async Task StartNewGameAsync()
        {
            if (MainVM != null)
            {
                await CloseSpecificChildAsync(MainVM);

                MainVM = null;
            }
            if (FirstScreen != null)
            {
                throw new BasicBlankException("First Screen should be null when loading First Screens");
            }
            FirstScreen = MainContainer.Resolve <FirstViewModel>();
            await LoadScreenAsync(FirstScreen);
        }
Пример #29
0
        protected override async Task OpenStartingScreensAsync()
        {
            //TestScreen = new FroggiesTestViewModel();
            //await LoadScreenAsync(TestScreen);
            OpeningScreen = MainContainer.Resolve <FroggiesOpeningViewModel>(); //i think has to be this way so its fresh everytime.
            await LoadScreenAsync(OpeningScreen);                               //try this way.
            await ShowNewGameAsync();

            //EmulateCloseOpen.Invoke();
            //MainVM = GetMainViewModel();
            //await LoadScreenAsync(MainVM);


            FinishInit();
        }
        private async Task LoadFaceoffAsync()
        {
            if (MainVM != null)
            {
                await CloseSpecificChildAsync(MainVM);

                MainVM = null;
            }
            if (FaceoffScreen != null)
            {
                throw new BasicBlankException("Faceoff should be null when loading faceoffs");
            }
            FaceoffScreen = MainContainer.Resolve <FaceoffViewModel>();
            await LoadScreenAsync(FaceoffScreen);
        }
Пример #31
0
    protected override void innerLaunch()
    {
      LookFeel.SetupNoirModerneLookFeel();

      var sf = new ShowForm
      {
        Text = "SI.RollMonitor"
      };

      var mc = new MainContainer();

      sf.Create(mc);
      mc.Create();

      Application.Run(sf);
    }
Пример #32
0
    static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      AppDomain.CurrentDomain.UnhandledException += handleUnhandledException;

      LookFeel.SetupNoirModerneLookFeel();

      Logger.SetLog4NetGlobalContextProperty("LogFileDir", string.Format("{0}\\SI.RollMonitor.LN", Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)));
      Logger.Configure();
      Logger.Debug("Logging up and running", typeof(Program));

      if (!SymmetryEnvironment.IsInSymmetryDomain)
      {
        DialogResult result;

        using (var loginForm = new SI.Controls.LoginForm())
          result = loginForm.DisplayInShowFormDialog("RollMonitor Login please", null);

        if (result != DialogResult.OK)
          return;
      }

      ShowForm.DefaultIcon = RollMonitorResources.Designcontest_Vintage_Paint_Roll;

      var sf = new ShowForm
      {
        Text =
          string.Format("SI.RollMonitor - {0}",
            System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()),
      };

      var mc = new MainContainer();

      sf.Create(mc);
      mc.Create();

      Application.Run(sf);

    }