在 c# 表单中,我创建了一个新的绘制方法:
private void thisPolygon(PaintEventArgs e)
{
Pen clrBlue = new Pen(Color.Blue, 3);
Point[] Wst = new Point[5];
Wst[0] = new Point(20, 350);
Wst[1] = new Point(110, 200);
Wst[2] = new Point(200, 190);
Wst[3] = new Point(210, 275);
Wst[4] = new Point(190, 400);
Wst[5] = new Point(50, 390);
e.Graphics.DrawPolygon(clrBlue, Wst);
}
现在,我该怎么称呼它?我不能让它工作,这不起作用:
private void Form1_Load(object sender, EventArgs e)
{
thisPolygon(); ///I've tried adding some stuff in brackets area, failed.
}