Ejemplo n.º 1
0
 public void Add(NFLPlayer player)
 {
     if (Runners.Contains(player))
     {
         Announce(string.Format("Duplicate player {0}", player.PlayerName));
     }
     else
     {
         Runners.Add(player);
     }
 }
Ejemplo n.º 2
0
 public void Add(NFLPlayer player)
 {
     if (Runners.Contains(player))
     {
         Announce(
             $"Duplicate player {player.PlayerName}");
     }
     else
     {
         Runners.Add(player);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Removes <see cref="SelectedRunner"/> from <see cref="Runners"/>.
 /// </summary>
 public void RemoveRunner()
 {
     if (!_canRemoveRunner || SelectedRunner == null || !Runners.Contains(SelectedRunner))
     {
         return;
     }
     Runners.Remove(SelectedRunner);
     SelectedRunner.PropertyChanged -= Runner_PropertyChanged;
     ReCalculateRaceMargin();
     _canAddRunner = Runners.Count < _maxRunnerCount;
     OnPropertyChanged(nameof(CanAddRunner));
 }