示例#1
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;
        }
示例#2
0
 private void ShowLastEvenResultWindow(ChampionshipDto championship)
 {
     _championshipDialogProvider.ShowLastEvenResultWindow(championship);
 }