// public delegate void showFun(bool b); //显示游戏界面中其他玩家界面 private void showGameRoom(int tableIdx, int seatIdx) { myLogic.gameArea.UnGameStatus(); gameTable tablesInfo = hall.tables[tableIdx]; int mypos = seatIdx; int t = 0; for (int i = mypos + 1; i < mypos + 4; i++) { int k = i % 4; if (tablesInfo.seatUser[k] != "") { otherPlayersLogic[t].SetPlayer(tablesInfo.seatUser[k]); GameArea ga = otherPlayersLogic[t].gameArea; ga.UnGameStatus(); ga.Show(); } else { GameArea ga = otherPlayersLogic[t].gameArea; ga.UnGameStatus(); //ga.Show(); } t++; } }
//初始化所有桌子 public void InitControl() { //this.ControlBox = false; tables = new List <gameTable>(); const int MaxTableNum = 9; const int TableNumInRow = 3; int startX = 2; int startY = 2; Size tableSize = new Size(150, 130); for (int i = 0; i < MaxTableNum; i++) { gameTable table = new gameTable(i); table.Location = new Point(startX + tableSize.Width * (i % TableNumInRow), startY + tableSize.Height * (i / TableNumInRow)); table.Size = tableSize; if (mainLogic != null) { table.clickSeatCallback += mainLogic.ClickSeat; } tables.Add(table); this.panelTables.Controls.Add(table); //this.afterLogin.Controls.Add(table); } }