public void AddShape(Shape s) { IndexedShape ishape = new IndexedShape(s, this.Vertices.Count); if (!allShapes.Contains(ishape)) { AddVertices(s); allShapes.Add(ishape); s.ShapeUpdated += new ShapeChangeEventHandler(s_ShapeUpdated); this.Update(); } }
public bool RemoveShape(Shape s) { IndexedShape ishape = new IndexedShape(s, 0); bool ret = allShapes.Remove(ishape); if (ret) { s.ShapeUpdated -= s_ShapeUpdated; RebuildList(); this.Update(); } return ret; }