从MDB文件中读取数据做曲线图
public void initGDI()
{
//画图初始化
Bitmap bmap = new Bitmap(pcWendu.Width, pcWendu.Height);
Graphics gph = Graphics.FromImage(bmap);
gph.Clear(Color.White);
PointF cpt = new PointF(40,390);//中心点
PointF[] xpt = new PointF[3] { new PointF(pcWendu.Width, cpt.Y), new PointF(pcWendu.Width - 15, cpt.Y - 8), new PointF(pcWendu.Width - 15, cpt.Y + 8) };//x轴三角形
PointF[] ypt = new PointF[3] { new PointF(cpt.X, cpt.X - 25), new PointF(cpt.X - 8, cpt.X - 10), new PointF(cpt.X + 8, cpt.X - 10) };//y轴三角形
//画x轴
gph.DrawLine(Pens.Black, cpt.X, cpt.Y, pcWendu.Width - 10, cpt.Y);
gph.DrawPolygon(Pens.Black, xpt);
gph.FillPolygon(new SolidBrush(Color.Black), xpt);
gph.DrawString("时间", new Font("宋体", 10), Brushes.Black, new PointF(pcWendu.Width - 35, cpt.Y + 10));
//画y轴
gph.DrawLine(Pens.Black, cpt.X, cpt.Y, cpt.X, cpt.X - 10);
gph.DrawPolygon(Pens.Black, ypt);
gph.FillPolygon(new SolidBrush(Color.Black), ypt);
IOValue("0", cBSelect.Text, out string KuBunn);
gph.DrawString(KuBunn, new Font("宋体", 10), Brushes.Black, new PointF(0, 7));
//画x轴坐标
float[] LactionZhD = new float[24]; //00:00
float[] LactionBD = new float[24]; //30:00
for (int i = 0; i < 24; i++)
{
gph.DrawString((i + 1).ToString("00") + ":00", new Font("宋体", 8, FontStyle.Bold), Brushes.Black, new PointF(cpt.X + i * 46 + 18, cpt.Y + 20));
gph.DrawLine(Pens.Gray, cpt.X + i * 46 + 37, cpt.Y, cpt.X + i * 46 + 37, cpt.X);