Exemplo n.º 1
0
 public void Undo()
 {
     if (node.Previous != null)
     {
         node.AttachTo(node.Parent, node.Previous, true, node.Pos);
     }
     else // insert as the first child
     {
         node.AttachTo(node.Parent, node.Parent.FirstChild, false, node.Pos);
     }
 }
Exemplo n.º 2
0
 public void Undo()
 {
     if (siblingAbove != null) //attach after sibling
     {
         node.AttachTo(parent, siblingAbove, true, position);
     }
     else if (parent.FirstChild != null) //insert as the first child
     {
         node.AttachTo(parent, parent.FirstChild, false, position);
     }
     else //attach as only child
     {
         node.AttachTo(parent, null, true, position);
     }
 }