private void Reverse(int index1, int index2) { if (IsRootNode(treeView.SelectedNode)) { if (!actionScript) { script.Reverse(index1, index2); } else { action.Reverse(index1, index2); } } else { int parent = treeView.SelectedNode.Parent.Index; EventCommand esc = script.Commands[parent]; esc.Queue.Reverse(index1, index2); } }