Exemplo n.º 1
0
 private void joinGame(JoinGameResponse response)
 {
     this.Invoke(new Action(() => form.ShowTable(loginResponse, response)));
     //table =  new GameTable(loginResponse, response, clientSocket);
     //table.PlayerIndex = response.PlayerIndex;
     //table.Show();
 }
Exemplo n.º 2
0
 public GameTable(LoginResponse loginResponse, JoinGameResponse joinGameResponse, Socket clientSocket)
 {
     LoginResponse     = loginResponse;
     JoinGameResponse  = joinGameResponse;
     this.ClientSocket = clientSocket;
     InitializeComponent();
 }
Exemplo n.º 3
0
        private void HandleJoinGameResponse(string joinGameResponse)
        {
            JoinGameResponse response = JsonConvert.DeserializeObject <JoinGameResponse>(joinGameResponse);

            if (response != null)
            {
                joinGame(response);
            }
        }
Exemplo n.º 4
0
        internal void ShowTable(LoginResponse loginResponse, JoinGameResponse response)
        {
            GameTable table = new GameTable(loginResponse, response, clientsocket);

            tableLayoutPanel1.Controls.Clear();
            table.Parent = tableLayoutPanel1;
            tableLayoutPanel1.Controls.Add(table);
            this.Size = table.MaximumSize;
        }
Exemplo n.º 5
0
 public void run(JoinGameResponse res)
 {
     form.ShowTable(loginResponse, res);
 }