Beispiel #1
0
        protected void SwapBoatScore(ref BoatScore boatScore1, ref BoatScore boatScore2)
        {
            var tempFinishPosition = boatScore1.FinishPosition;

            boatScore1.FinishPosition = boatScore2.FinishPosition;
            boatScore2.FinishPosition = tempFinishPosition;
        }
Beispiel #2
0
        protected void AddScore(int position, BoatScore boatScore)
        {
            var item = new ListItem
            {
                Text  = boatScore.FinishPosition + ": " + boatScore.SailNumber + (!boatScore.IsNormalPenalty ? " (" + boatScore.PenaltyName + ")" : ""),
                Value = boatScore.BoatId.ToString(CultureInfo.InvariantCulture)
            };

            if (position < 0)
            {
                listBoatsScored.Items.Add(item);
                _boatScores.Add(boatScore);
            }
            else
            {
                listBoatsScored.Items.Insert(position, item);
                _boatScores.Insert(position, boatScore);
            }
        }
Beispiel #3
0
        protected void AddScore(int position, int fleetId, int boatId, string sailNumber, int finishPlace, int penaltyId, string penaltyName, bool isNormalPenalty)
        {
            var boatScore = new BoatScore(fleetId, boatId, sailNumber, finishPlace, penaltyId, penaltyName, isNormalPenalty);

            AddScore(position, boatScore);
        }