private void DrawGraphic(Context currentGraphic, Graphics g) { List<Point> graphicPoints = currentGraphic.ExecuteOperation(panel1.Height, panel1.Width); for (int i = 0; i < graphicPoints.Count - 1; i++) { Point prevPoint = new Point(graphicPoints[i]); g.DrawLine(graphPen, prevPoint.X, prevPoint.Y, graphicPoints[i + 1].X, graphicPoints[i + 1].Y); } }