Пример #1
0
 public void UnExecute()//ungroup
 {
     foreach (DrawingObject obj in this.allChild)
     {
         if (allChild.Count > 0)
         {
             UnGroupCommand cmd = new UnGroupCommand((Rectangle)obj);
             undoredo.InsertCommand(cmd);
             cmd.UnExecute();
         }
         obj.parentRectangle = null;
         ParentObject.removeComponent(obj);
     }
 }
Пример #2
0
 public void UnExecute()
 {
     if (this.rectangle != null)
     {
         if (this.rectangle.listChildObject.Count > 0)
         {
             foreach (DrawingObject obj in this.rectangle.listChildObject)
             {
                 DeleteCommand cmd = new DeleteCommand((Rectangle)obj, this.canvas);
                 cmd.UnExecute();
                 undoredo.InsertCommand(cmd);
             }
             this.rectangle.listChildObject.Clear();
         }
         this.canvas.RemoveDrawingObject(this.rectangle);
     }
     else
     {
         this.canvas.RemoveDrawingObject(drawObj);
     }
 }