Ejemplo n.º 1
0
        private void playBtn_Click(object sender, RoutedEventArgs e)
        {
            GameDataGrid gdg         = (GameDataGrid)Display_game_results.SelectedItem;
            InputDialog  inputDialog = new InputDialog("How much credit would you like to use?", "0");
            int          credit      = 0;

            if (inputDialog.ShowDialog() == true)
            {
                credit = Int32.Parse(inputDialog.Answer);
            }
            //Join game function
            manager.JoinGame(gdg.ID, credit);
        }
Ejemplo n.º 2
0
        private void showResults(List <Models.ClientGame> gameList)
        {
            List <GameDataGrid> displayList = new List <GameDataGrid>();

            foreach (Models.ClientGame game in gameList)
            {
                Models.GamePreferences prefs = game.gamePref;
                GameDataGrid           gdg   = new GameDataGrid {
                    ID                = game.id,
                    PlayersInGame     = game.players.Count,
                    MaxPlayers        = prefs.maxPlayers,
                    MinPlayers        = prefs.minPlayers,
                    BigBlind          = prefs.bigBlind,
                    SmallBlind        = prefs.smallBlind,
                    SpectatingAllowed = prefs.allowSpectators
                };
                displayList.Add(gdg);
            }
            Display_game_results.ItemsSource           = displayList;
            Display_game_results.Columns[0].Visibility = Visibility.Collapsed;
        }
Ejemplo n.º 3
0
        private void spectateBtn_Click(object sender, RoutedEventArgs e)
        {
            GameDataGrid gdg = (GameDataGrid)Display_game_results.SelectedItem;

            manager.JoinGameAsSpectator(gdg.ID);
        }