OnPaint()函数调用base.OnPaint()出现栈溢出
OnPaint()函数 private void OnPaint(object sender, PaintEventArgs e)
{
System.Drawing.Graphics g = this.CreateGraphics();
for (int x = 0; x < 15; x++)
{
for (int y = 0; y < 15; y++)
{
if (checkerBoard[y, x] != None) DrawChess(new Point(x, y), checkerBoard[y, x]);
}
}
ReDrawNextPlayerMark();
base.OnPaint(e);
}
private void ReDrawNextPlayerMark()
{
System.Drawing.Graphics g = this.CreateGraphics();
imageList1.Draw(g, 2, 309, 20, 20, Player);
}