public void Execute() { foreach (IObjectChangeCollection changeObj in changeObjList) { IWorldContainer parent = changeObj.Parent; fromCollection.Add((IObjectCollectionParent)parent); parent.Remove(changeObj as IWorldObject); toCollection.Add(changeObj as IWorldObject); changeObj.Parent = toCollection as IWorldContainer; changeObj.Node.Select(); } }
public void UnExecute() { int i = 0; foreach (IObjectChangeCollection changeObj in changeObjList) { IWorldObject obj = changeObj as IWorldObject; toCollection.Remove(obj); IObjectCollectionParent from = fromCollection[i]; from.Add(obj); changeObj.Parent = from as IWorldContainer; i++; } }