Exemplo n.º 1
0
        private void DnfSelectedChampionshipSession()
        {
            if (_championshipOverviewViewModel.SelectedChampionship == null)
            {
                return;
            }

            ChampionshipDto selectedChampionship = _championshipOverviewViewModel.SelectedChampionship.OriginalModel;

            _championshipManipulator.CommitLastSessionResults(selectedChampionship);
            _championshipsPool.UpdateChampionship(selectedChampionship);

            ShowLastEvenResultWindow(selectedChampionship);
        }
Exemplo n.º 2
0
        private void SessionEventProviderOnPlayerFinishStateChanged(object sender, DataSetArgs e)
        {
            if (!IsChampionshipActive)
            {
                return;
            }

            if (e.DataSet.PlayerInfo.FinishStatus == DriverFinishStatus.Finished && _sessionEventProvider.BeforeLastDataSet?.SessionInfo?.SessionType == SessionType.Race && _isSessionRace && !_hasPlayerFinished)
            {
                _hasPlayerFinished = true;
                _championshipManipulator.AddResultsForCurrentSession(_runningChampionship, e.DataSet);
                _championshipManipulator.CommitLastSessionResults(_runningChampionship);
                _championshipDialogProvider.ShowLastEvenResultWindow(_runningChampionship);
                FinishCurrentEvent(e.DataSet);
                _runningChampionship = null;
            }

            _hasPlayerFinished = e.DataSet.PlayerInfo.FinishStatus == DriverFinishStatus.Finished;
        }