Exemplo n.º 1
0
 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();
     }
 }
Exemplo n.º 2
0
 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;
 }