public RegisteredPlayer(PotentialPlayer player)
 {
     firstName   = player.firstName;
     lastName    = player.lastName;
     points      = player.points;
     womenPoints = player.womenPoints;
     rank        = player.rank;
 }
        private void TeamsPotentialPlayerFix_Click(object sender, RoutedEventArgs e)
        {
            PotentialPlayer player = (sender as Button).Tag as PotentialPlayer;

            TeamsFixBoxFirstName = player.firstName;
            TeamsFixBoxLastName  = player.lastName;

            teamsFixingPlayer = player;
        }
Ejemplo n.º 3
0
        private void PotentialPlayer_Click(object sender, RoutedEventArgs e)
        {
            PotentialPlayer player = (sender as Button).Tag as PotentialPlayer;

            if (player.bExactMatch)
            {
                AddNameFromRegisteredPlayersEnterTextBox(player);
            }
            else
            {
                FixBoxFirstName = player.firstName;
                FixBoxLastName  = player.lastName;
            }
        }
        private void UpdateTeamsPotentialPlayer_Click(object sender, RoutedEventArgs e)
        {
            RegisteredPlayer player = (sender as Button).Tag as RegisteredPlayer;

            // Go through all potential team members and replace teamsFixingPlayer with the found registered player
            foreach (PotentialTeam pt in foundTeams)
            {
                if (pt.potentialPlayers.Remove(teamsFixingPlayer))
                {
                    pt.registeredPlayers.Insert(0, player);

                    pt.OnPropertyChanged("IsValidTeam");
                }
            }


            teamsFixingPlayer = null;
        }
        private void AddRegisteredPlayer(PotentialPlayer player)
        {
            RegisteredPlayer newPlayer = new RegisteredPlayer(player);

            registeredPlayers.Add(newPlayer);
        }
Ejemplo n.º 6
0
        private void AddNameFromRegisteredPlayersEnterTextBox(PotentialPlayer player)
        {
            AddRegisteredPlayer(player);

            foundPlayers.Remove(player);
        }
Ejemplo n.º 7
0
        private void AddRegisteredPlayerFromPotentialMatches_Click(object sender, RoutedEventArgs e)
        {
            PotentialPlayer player = (sender as Button).Tag as PotentialPlayer;

            AddNameFromRegisteredPlayersEnterTextBox(player);
        }