private void OnUserConnected(string nick) { ConnectedPlayers.Add(new ListItem { Nick = nick }); AvailablePlayers.Add(nick); }
private void OnPlayerFinished(string nick) { if (ConnectedPlayers.Select(item => item.Nick).Contains(nick)) { ConnectedPlayers.First(item => item.Nick == nick).IsPlaying = false; } AvailablePlayers.Add(nick); }
public void RemoveSelectedMember() { if (SelectedMember != null) { AvailablePlayers.Add(SelectedMember); TeamMembers.Remove(SelectedMember); } ValidateAllData(); }
public void RemovePlayer(object parameter) { playerEngine.ActivePlayers.Remove(SelectedPlayer); AvailablePlayers.Add(SelectedPlayer); if (SelectedPlayer != null) { SelectedPlayers.Remove(SelectedPlayer); SelectedPlayer = null; } SelectedPlayer = null; }
public void AddPlayerCommandHandler(object args) { AvailablePlayers.Add( new Player { FullName = NewPlayerName, DCINumber = NewPlayerDCINumber, EmailAddress = NewPlayerEmailAddress, PhoneNumber = NewPlayerPhoneNumber }); AddPlayerCommand.RaiseCanExecuteChanged(); OnPropertyChanged("AvailablePlayers"); OnPropertyChanged("FilteredAvailablePlayers"); }
private void AddNewPlayer(object parameter) { Player player; player = new Player { Firstname = _Firstname, Lastname = _Lastname, Nickname = _Nickname }; if (CheckForNicknameAvailability()) { dbOps.RegisterPlayer(player); AvailablePlayers.Add(player); GetFilteredPlayers(); _Firstname = null; _Lastname = null; _Nickname = null; } else { MessageBox.Show("Användarnamnet är upptaget. Välj ett annat!"); } }