private void ResetComponents()
        {
            GoBackButton.IsEnabled                = true;
            GamesList.Visibility                  = Visibility.Visible;
            CreateGameButton.Visibility           = Visibility.Visible;
            CreateGameButton.IsEnabled            = false;
            JoinGameButton.Visibility             = Visibility.Visible;
            JoinGameButton.IsEnabled              = false;
            NumberOfPlayersComboBox.Visibility    = Visibility.Visible;
            NumberOfPlayersComboBox.SelectedIndex = -1;
            TextBoxGameName.Visibility            = Visibility.Visible;
            TextBoxGameName.Clear();
            Games.Clear();
            KickPlayerColumn.Visibility = Visibility.Visible;
            server.GetGames();

            PlayersGrid.Visibility     = Visibility.Hidden;
            StartGameButton.Visibility = Visibility.Hidden;
            StartGameButton.IsEnabled  = false;
            LeaveGameButton.Visibility = Visibility.Hidden;
            Players.Clear();

            gameName        = null;
            isHost          = false;
            numberOfPlayers = 0;
        }
Ejemplo n.º 2
0
 private void ClearTextBoxes()
 {
     TextBoxGameName.Clear();
     TextBoxRating.Clear();
     TextBoxPrice.Clear();
     TextBoxGenre.Clear();
     TextBoxConsole.Clear();
 }