private void button1_Click(object sender, EventArgs e)
{
Graphics graphics = this.CreateGraphics();
Pen myPen = new Pen(Color.Blue, 1);
int beginX = 50;
int beginY = 60;
int height = 40;
int width = 55;
Point X1 = new Point(beginX, beginY);
Point Y1 = new Point(beginX + 210, beginY);
Point X2 = new Point(beginX, beginY - 45);
Point Y2 = new Point(beginX, beginY + 45);
graphics.DrawLine(myPen, X1, Y1);
graphics.DrawLine(myPen, X2, Y2);
graphics.DrawBezier(myPen, beginX, beginY, beginX + 15, beginY - height, beginX + 40, beginY - height, beginX + width, beginY);
graphics.DrawBezier(myPen, beginX + width , beginY, beginX + width + 15, beginY + height, beginX + width + 40, beginY + height, beginX + width * 2, beginY);
graphics.DrawBezier(myPen, beginX + width * 2, beginY, beginX + width * 2 + 15, beginY - height, beginX + width * 2 + 40, beginY - height, beginX + width * 3, beginY);
graphics.DrawBezier(myPen, beginX + width * 3, beginY, beginX + width * 3 + 15, beginY + height, beginX + width * 3 + 40, beginY + height, beginX + width * 4, beginY);
}
繪製波形圖