public override void Copy(DrawingItem obj) { base.Copy(obj); DrawClosedCurve v = obj as DrawClosedCurve; if (v != null) { this.width = v.width; this.fill = v.fill; this.tension = v.tension; this.fillColor = v.fillColor; int n = v.PointCount; if (n > 0) { pts = new Point[n]; Point pt; for (int i = 0; i < n; i++) { pt = v.GetPoint(i); pts[i] = new Point(pt.X, pt.Y); } ArrayToPointList(); calculateBrounds(); } else { pts = null; } } }
public void LoadData(DrawClosedCurve obj, Form frm) { objPolygon = obj; txtName.Text = objPolygon.Name; txtWidth.Text = objPolygon.LineWidth.ToString(); lblColor.BackColor = objPolygon.Color; chkFill.Checked = objPolygon.Fill; lblFillColor.BackColor = objPolygon.FillColor; if (objPolygon.Points != null) { for (int i = 0; i < objPolygon.Points.Count; i++) { listBox1.Items.Add(objPolygon.Points[i].Point); } } frmOwner = frm; }