Ejemplo n.º 1
0
 public virtual void RemoveHandles(Shapes.DiagramShape obj)
 {
     if (this.myHandles != null)
     {
         object obj1 = this.myHandles[obj];
         if (obj1 != null)
         {
             if (this.View != null)
             {
                 ArrayList list1 = obj1 as ArrayList;
                 if (list1 != null)
                 {
                     for (int num1 = 0; num1 < list1.Count; num1++)
                     {
                         IShapeHandle        handle1 = (IShapeHandle)list1[num1];
                         Shapes.DiagramShape obj2    = handle1.DiagramShape;
                         handle1.SelectedObject = null;
                         if (obj2 != null)
                         {
                             DiagramLayer layer1 = obj2.Layer;
                             if (layer1 != null)
                             {
                                 layer1.Remove(obj2);
                             }
                         }
                     }
                 }
                 else
                 {
                     IShapeHandle handle2 = (IShapeHandle)obj1;
                     handle2.SelectedObject = null;
                     Shapes.DiagramShape obj3 = handle2.DiagramShape;
                     if (obj3 != null)
                     {
                         DiagramLayer layer2 = obj3.Layer;
                         if (layer2 != null)
                         {
                             layer2.Remove(obj3);
                         }
                     }
                 }
             }
             this.myHandles.Remove(obj);
         }
     }
 }