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)));
        }
示例#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);
        }
示例#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;
        }
示例#5
0
        public SelectionScreenVM(Navigator navigator) : base(navigator)
        {
            addPuzzels();

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