コード例 #1
0
 private void OnNextScorecard()
 {
     CurrentScorecardViewModel.OnSaveChanges();
     CurrentScorecardViewModel.NextScorerRequested -= HandleNextScorecardRequest;
     CurrentScorecardViewModel = new ScorerRoundScorecardViewModel();
     CurrentScorerNum         += 1;
     CurrentScorecardViewModel.SetRoundAndScorer(new RoundScoringParams(_gs, CurrentRoundIndex), CurrentScorer);
     CurrentScorecardViewModel.NextScorerRequested += HandleNextScorecardRequest;
 }
コード例 #2
0
 public ScoringRoundMasterViewModel()
 {
     _currentScorerNum         = 0;
     CurrentScorecardViewModel = new ScorerRoundScorecardViewModel();
     NextScorecardCommand      = new RelayCommand(OnNextScorecard, NextScorecardExists);
     PreviousScorecardCommand  = new RelayCommand(OnPrevScorecard, PrevScorecardExists);
     CancelAndReturnCommand    = new RelayCommand(OnCancel);
     SaveAndReturnCommand      = new RelayCommand(OnSaveAndReturn);
 }
コード例 #3
0
        public ScoringWindowViewModel()
        {
            _scoringOverviewViewModel         = ContainerHelper.Container.Resolve <ScoringOverviewViewModel>();
            _scorerRoundScorecardViewModel    = ContainerHelper.Container.Resolve <ScorerRoundScorecardViewModel>();
            _scoringRoundMasterViewModel      = ContainerHelper.Container.Resolve <ScoringRoundMasterViewModel>();
            _bonusScoringRoundMasterViewModel = ContainerHelper.Container.Resolve <BonusScoringRoundMasterViewModel>();
            _saveHandler = ContainerHelper.Container.Resolve <GameStateSaveHandler>();

            CurrentViewModel = _scoringOverviewViewModel;

            _scoringOverviewViewModel.GoToRoundRequested         += OnScoreRound;
            _scoringOverviewViewModel.GoToBonusRoundRequested    += OnScoreBonusRound;
            _scoringOverviewViewModel.FinishGameRequested        += OnFinishGame;
            _scoringRoundMasterViewModel.RoundComplete           += OnRoundComplete;
            _scoringRoundMasterViewModel.RoundCanceled           += OnRoundCanceled;
            _bonusScoringRoundMasterViewModel.RoundCanceled      += OnRoundCanceled;
            _bonusScoringRoundMasterViewModel.BonusRoundComplete += OnBonusRoundComplete;

            TimerCommand      = new RelayCommand(OnStartTimer);
            ScoreboardCommand = new RelayCommand(OnOpenScoreboard);
            ExitCommand       = new RelayCommand(OnExit);
        }