public IntroductionPlayScreenVM(Navigator navigator, List <String> players) : base(navigator)
        {
            this.players = players;

            GoToLoginScreen        = new SwitchScreenCommand(() => SwitchTo(new LoginScreenVM(navigator, players)));
            this.GoToAddUserScreen = new SwitchScreenCommand(() => SwitchTo(new AddPlayerScreenVM(navigator)));
        }
Example #2
0
        public LoginScreenVM(Navigator navigator, List <String> players) : base(navigator)
        {
            this.players = players;

            GoToSelectionScreen     = new SwitchScreenCommand(() => SwitchTo(new SelectionScreenVM(navigator)));
            GotToIntroductionScreen = new SwitchScreenCommand(() => SwitchTo(new IntroductionPlayScreenVM(navigator, players)));
        }
        public AddPlayerScreenVM(Navigator navigator) : base(navigator)
        {
            this.players = new List <string>();

            GotToIntroductionScreen = new SwitchScreenCommand(() => SwitchTo(new IntroductionPlayScreenVM(navigator, players)));
            name      = "Name";
            added     = false;
            AddPlayer = new AddPlayerCommand(name, playerLibrary, players, added);
        }
Example #4
0
        public PlayScreenVM(Navigator navigator, Puzzle puzzle) : base(navigator)
        {
            GoToSelectionScreen = new SwitchScreenCommand(() => SwitchTo(new SelectionScreenVM(navigator)));

            this.puzzle            = puzzle;
            this.facade            = new PiCrossFacade();
            this.playablePuzzle    = facade.CreatePlayablePuzzle(this.puzzle);
            this.playablePuzzleVM  = new PlayablePuzzleVM(playablePuzzle);
            this.RowConstraints    = playablePuzzleVM.RowConstraints;
            this.ColumnConstraints = playablePuzzleVM.ColumnConstraints;
            this.Grid     = playablePuzzleVM.Grid;
            this.IsSolved = playablePuzzle.IsSolved;

            ResetPuzzle = new SwitchScreenCommand(() => SwitchTo(new PlayScreenVM(navigator, puzzle)));

            lastTick        = DateTime.Now;
            timer           = new DispatcherTimer(TimeSpan.FromMilliseconds(10), DispatcherPriority.Background, OnTimerTick, Dispatcher.CurrentDispatcher);
            timer.IsEnabled = true;
        }
Example #5
0
        public SelectionScreenVM(Navigator navigator) : base(navigator)
        {
            addPuzzels();

            GoToPlayScreen = new SwitchScreenCommand(() => SwitchTo(new PlayScreenVM(navigator, SelectedPuzzle)));
        }