public static void SendCasinoMessage()
 {
     Poker.Shared.Message m = new Shared.Message("CasinoUpdate", MessageType.CasinoUpdate);
     m.Content = ClientView.CasinoView.Serialize();
     foreach (PokerUser puser in PokerUserFactory.GetListPokerUsers())
     {
         puser.SendMessage(m);
     }
 }
Example #2
0
        private void btnViewClients_Click(object sender, EventArgs e)
        {
            // list the poker clients connected to the server
            // will have ability to disconnect a client too.
            dataGridView_Clients.Rows.Clear();
            dataGridView_Clients.Columns.Clear();
            dataGridView_Clients.Columns.Add("UserName", "UserName");
            dataGridView_Clients.Columns.Add("TotalChips", "TotalChips");
            dataGridView_Clients.Columns.Add("ChipsAvailable", "ChipsAvailable");
            List <PokerUser> users = PokerUserFactory.GetListPokerUsers();

            foreach (PokerUser user in users)
            {
                dataGridView_Clients.Rows.Add(new object[] { user.UserName, user.TotalChips, user.ChipsAvailable });
            }
        }