private void NewPlayer_Click(object sender, RoutedEventArgs e)
 {
     Player player = new Player();
     GetDataContext().AddPlayer(player);
 }
Exemplo n.º 2
0
 private void MemberRemoved(Player memberToRemove)
 {
     memberToRemove.OnPlayerRemoved -= MemberRemoved;
     members.Remove(memberToRemove);
     this.RaisePropertyChanged("Members");
 }
Exemplo n.º 3
0
 public void addPlayer(Player newMember)
 {
     newMember.OnPlayerRemoved += MemberRemoved;
     members.Add(newMember);
     this.RaisePropertyChanged("Members");
 }
Exemplo n.º 4
0
 private void PlayerRemoved(Player playerToDelete)
 {
     playerToDelete.OnPlayerRemoved -= PlayerRemoved;
     players.Remove(playerToDelete);
     RaisePropertyChanged("Players");
 }
Exemplo n.º 5
0
 public void AddPlayer(Player newPlayer)
 {
     newPlayer.OnPlayerRemoved += PlayerRemoved;
     players.Add(newPlayer);
     RaisePropertyChanged("Players");
 }
 void setModel(Player player)
 {
     this.DataContext = player;
 }