using System; namespace DevComponents.AdvTree { /// /// Represents event arguments for BeforeNodeDrop and AfterNodeDrop events /// public class TreeDragDropEventArgs : AdvTreeMultiNodeCancelEventArgs { public TreeDragDropEventArgs(eTreeAction action, Node[] nodes, Node oldParentNode, Node newParentNode, int insertPosition) : base(action, nodes) { this.NewParentNode = newParentNode; this.OldParentNode = oldParentNode; this.InsertPosition = insertPosition; } public TreeDragDropEventArgs(eTreeAction action, Node[] nodes, Node oldParentNode, Node newParentNode, bool isCopy, int insertPosition) : base(action, nodes) { this.NewParentNode = newParentNode; this.OldParentNode = oldParentNode; this.IsCopy = isCopy; this.InsertPosition = insertPosition; } /// /// Returns reference to the old parent node. /// public readonly Node OldParentNode=null; /// /// Reference to the new parent node if event is not cancelled. /// public readonly Node NewParentNode=null; /// /// Gets or sets whether drag node is being copied instead of moved. /// public bool IsCopy = false; /// /// Gets or sets the new insert position inside of NewParentNode.Nodes collection for the node being dragged. If InsertPosition is -1 /// the ParentNode refers to the current mouse over node and drag & drop node will be added as child node to it. /// public int InsertPosition = 0; } }