public bool AddVertex(myVertex vertex, Graphics graphics, Pen pen) { bool result = this.AddVertex(vertex); if (result == true) { vertex.Paint(graphics, pen); new mySection(vertexes[vertexes.Count - 2], vertexes[vertexes.Count - 1]).Paint(graphics, pen); } else new mySection(vertexes[vertexes.Count - 2], vertexes[0]).Paint(graphics, pen); return result; }
public myPolygon(myVertex head, Graphics graphics, Pen pen) { vertexes = new List<myVertex>(); vertexes.Add(head); head.Paint(graphics, pen); }