private void addplayers(LineupSetting lineupsetting) { foreach (Lineup pos in lineupsetting.Quarterback) { pos.Players.Clear(); foreach (Player player in pos.ExistPlayers) { pos.Players.Add(player); } } foreach (Lineup pos in lineupsetting.Receivers) { pos.Players.Clear(); foreach (Player player in pos.ExistPlayers) { pos.Players.Add(player); } } foreach (Lineup pos in lineupsetting.Runningbacks) { pos.Players.Clear(); foreach (Player player in pos.ExistPlayers) { pos.Players.Add(player); } } foreach (Lineup pos in lineupsetting.OffensiveLinemen) { pos.Players.Clear(); foreach (Player player in pos.ExistPlayers) { pos.Players.Add(player); } } foreach (Lineup pos in lineupsetting.TightEnds) { pos.Players.Clear(); foreach (Player player in pos.ExistPlayers) { pos.Players.Add(player); } } foreach (Lineup pos in lineupsetting.Cornerbacks) { pos.Players.Clear(); foreach (Player player in pos.ExistPlayers) { pos.Players.Add(player); } } foreach (Lineup pos in lineupsetting.Linebackers) { pos.Players.Clear(); foreach (Player player in pos.ExistPlayers) { pos.Players.Add(player); } } }
private void DelSelPlayer(LineupSetting lineupsetting) { foreach (Lineup pos in lineupsetting.Quarterback) { if (pos.Player != null) { Lineup.ExistPlayers.Remove(pos.Player); } } foreach (Lineup pos in lineupsetting.Receivers) { if (pos.Player != null) { Lineup.ExistPlayers.Remove(pos.Player); } } foreach (Lineup pos in lineupsetting.Runningbacks) { if (pos.Player != null) { Lineup.ExistPlayers.Remove(pos.Player); } } foreach (Lineup pos in lineupsetting.OffensiveLinemen) { if (pos.Player != null) { Lineup.ExistPlayers.Remove(pos.Player); } } foreach (Lineup pos in lineupsetting.TightEnds) { if (pos.Player != null) { Lineup.ExistPlayers.Remove(pos.Player); } } foreach (Lineup pos in lineupsetting.Cornerbacks) { if (pos.Player != null) { Lineup.ExistPlayers.Remove(pos.Player); } } foreach (Lineup pos in lineupsetting.Linebackers) { if (pos.Player != null) { Lineup.ExistPlayers.Remove(pos.Player); } } }
private void setplayer(LineupSetting lineupsetting) { foreach (Lineup pos in lineupsetting.Quarterback) { foreach (Player player in ObjTeam.Players) { if (pos.Id == player.ID.ToString()) { pos.Player = player; } } } foreach (Lineup pos in lineupsetting.Receivers) { foreach (Player player in ObjTeam.Players) { if (pos.Id == player.ID.ToString()) { pos.Player = player; } } } foreach (Lineup pos in lineupsetting.Runningbacks) { foreach (Player player in ObjTeam.Players) { if (pos.Id == player.ID.ToString()) { pos.Player = player; } } } foreach (Lineup pos in lineupsetting.OffensiveLinemen) { foreach (Player player in ObjTeam.Players) { if (pos.Id == player.ID.ToString()) { pos.Player = player; } } } foreach (Lineup pos in lineupsetting.TightEnds) { foreach (Player player in ObjTeam.Players) { if (pos.Id == player.ID.ToString()) { pos.Player = player; } } } foreach (Lineup pos in lineupsetting.Cornerbacks) { foreach (Player player in ObjTeam.Players) { if (pos.Id == player.ID.ToString()) { pos.Player = player; } } } foreach (Lineup pos in lineupsetting.Linebackers) { foreach (Player player in ObjTeam.Players) { if (pos.Id == player.ID.ToString()) { pos.Player = player; } } } }