Пример #1
0
 public void DrawPanel(int row, int col, int mines)
 {
     if (board != null)
         this.board.Dispose();
     board = new BoardControl(row, col, mines);
     this.Size = new Size( (row * board.SquareSize + ROW_BUFF), (col * board.SquareSize + COL_BUFF) ); //resize window adding buffers
     board.BorderStyle = BorderStyle.Fixed3D;
     board.Margin = new System.Windows.Forms.Padding(0);
     this.Controls.Add(board);
     this.mainTableLayout.Controls.Add(board);
 }
Пример #2
0
 public void DrawPanel(int row, int col, int mines)
 {
     if (board != null)
     {
         this.board.Dispose();
     }
     board             = new BoardControl(row, col, mines);
     this.Size         = new Size((row * board.SquareSize + ROW_BUFF), (col * board.SquareSize + COL_BUFF)); //resize window adding buffers
     board.BorderStyle = BorderStyle.Fixed3D;
     board.Margin      = new System.Windows.Forms.Padding(0);
     this.Controls.Add(board);
     this.mainTableLayout.Controls.Add(board);
 }