public void Paint(Graphics gr) { // int yTopBase = (int)sbge.RectF.Top + 17; foreach (MPG mpg in m_plmpg) { Font font = new Font("Tahoma", 10); SolidBrush brushBlue = new SolidBrush(Color.Blue); Pen pen = new Pen(brushBlue, 1); SBGE sbge = (SBGE)mpg.Plsbge[0]; const int dxSep = 30; const int dxLeft = 20; int xLeft = (int)m_rcf.Left + dxLeft; int yTop = (int)sbge.RectF.Top; MP mp = mpg.Mp; gr.DrawString(mp.SGetDescription(), font, brushBlue, sbge.RectF.Left - 150, yTop - 15); gr.DrawRectangle(pen, xLeft - 4, yTop, dxSep * 4 + 4, 43); gr.DrawLine(pen, xLeft + dxSep - 1, yTop, xLeft + dxSep - 1, yTop + 43); gr.DrawLine(pen, xLeft + dxSep * 2 - 1, yTop, xLeft + dxSep * 2 - 1, yTop + 43); gr.DrawLine(pen, xLeft + dxSep * 3 - 1, yTop, xLeft + dxSep * 3 - 1, yTop + 43); gr.DrawLine(pen, xLeft - 4, yTop + 20, xLeft + dxSep * 4, yTop + 20); gr.DrawString("M+0", font, brushBlue, xLeft, yTop + 3); gr.DrawString("M+1", font, brushBlue, xLeft + dxSep * 1, yTop + 3); gr.DrawString("M+2", font, brushBlue, xLeft + dxSep * 2, yTop + 3); gr.DrawString("M+4", font, brushBlue, xLeft + dxSep * 3, yTop + 3); for (int i = 0; i < 4; i++) { gr.DrawString(mp.NGetAvgForMpt((MP.MPT)i).ToString(), font, brushBlue, xLeft + i * dxSep, yTop + 23); } yTop += 50; xLeft = (int)m_rcf.Left + dxLeft + 30; gr.DrawRectangle(pen, xLeft - 4, yTop, dxSep * 2 + 4, 43); gr.DrawLine(pen, xLeft + dxSep - 1, yTop, xLeft + dxSep - 1, yTop + 43); gr.DrawLine(pen, xLeft - 4, yTop + 20, xLeft + dxSep * 2, yTop + 20); gr.DrawString("Post", font, brushBlue, xLeft, yTop + 3); gr.DrawString("Morn", font, brushBlue, xLeft + dxSep * 1, yTop + 3); for (int i = 0; i < 2; i++) { gr.DrawString(mp.NGetAvgForMpt((MP.MPT)i + 4).ToString(), font, brushBlue, xLeft + i * dxSep, yTop + 23); } sbge.SetNoCurves(); sbge.PaintGraphGridlines(gr); foreach (SBGE sbgeT in mpg.Plsbge) { sbgeT.PaintGraph(gr); } } }