Example #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);
     }
 }
Example #2
0
 public void Execute()//regroup
 {
     undoredo.Undo(1);
     foreach (DrawingObject obj in allChild)
     {
         if (allChild.Count > 0)
         {
             UnGroupCommand cmd = new UnGroupCommand((Rectangle)obj);
             cmd.Execute();
         }
         obj.parentRectangle = this.ParentObject;
         ParentObject.addComponent(obj);
     }
 }