public static void SendServerReadyMessage(PokerUser user) { Poker.Shared.Message m = new Shared.Message("ServerReady", MessageType.ServerReady); m.Content = "ServerReady"; if ((user != null) && (user.TcpClient != null) && (user.TcpClient.Connected)) { user.SendMessage(m); } }
public static void SendCasinoMessage(PokerUser user) { Poker.Shared.Message m = new Shared.Message("CasinoUpdate", MessageType.CasinoUpdate); m.Content = ClientView.CasinoView.Serialize(); if ((user != null) && (user.TcpClient != null) && (user.TcpClient.Connected)) { user.SendMessage(m); } }
public static void SendPlayerBankBalanceMessage(PokerUser user) { Poker.Shared.Message m = new Shared.Message("PlayerBankBalance", MessageType.PlayerBankBalance); Tuple <decimal, decimal> temp = PlayerBankingService.Instance().GetBankBalance(user.UserName); string temp1 = temp.Item1.ToString() + ";" + temp.Item2.ToString(); m.Content = temp1; if ((user != null) && (user.TcpClient != null) && (user.TcpClient.Connected)) { user.SendMessage(m); } }