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(); }
public GameTable(LoginResponse loginResponse, JoinGameResponse joinGameResponse, Socket clientSocket) { LoginResponse = loginResponse; JoinGameResponse = joinGameResponse; this.ClientSocket = clientSocket; InitializeComponent(); }
private void HandleJoinGameResponse(string joinGameResponse) { JoinGameResponse response = JsonConvert.DeserializeObject <JoinGameResponse>(joinGameResponse); if (response != null) { joinGame(response); } }
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; }
public void run(JoinGameResponse res) { form.ShowTable(loginResponse, res); }