private void timer_0_Tick(object sender, EventArgs e) { Point pt = this.treeView_0.PointToClient(Control.MousePosition); TreeNode nodeAt = this.treeView_0.GetNodeAt(pt); if (nodeAt != null) { if (pt.Y < 30) { if (nodeAt.PrevVisibleNode != null) { nodeAt = nodeAt.PrevVisibleNode; Class27.ImageList_DragShowNolock(false); nodeAt.EnsureVisible(); this.treeView_0.Refresh(); Class27.ImageList_DragShowNolock(true); } } else if ((pt.Y > (this.treeView_0.Size.Height - 30)) && (nodeAt.NextVisibleNode != null)) { nodeAt = nodeAt.NextVisibleNode; Class27.ImageList_DragShowNolock(false); nodeAt.EnsureVisible(); this.treeView_0.Refresh(); Class27.ImageList_DragShowNolock(true); } } }
private void treeView_0_DragOver(object sender, DragEventArgs e) { Point point = this.treeView_0.PointToClient(new Point(e.X, e.Y)); Class27.ImageList_DragMove(point.X - this.treeView_0.Left, point.Y - this.treeView_0.Top); TreeNode nodeAt = this.treeView_0.GetNodeAt(this.treeView_0.PointToClient(new Point(e.X, e.Y))); if (nodeAt == null) { e.Effect = DragDropEffects.None; } else { e.Effect = DragDropEffects.Move; if (this.treeNode_1 != nodeAt) { Class27.ImageList_DragShowNolock(false); this.treeView_0.SelectedNode = nodeAt; Class27.ImageList_DragShowNolock(true); this.treeNode_1 = nodeAt; } for (TreeNode node2 = nodeAt; node2.Parent != null; node2 = node2.Parent) { if (node2.Parent == this.treeNode_0) { e.Effect = DragDropEffects.None; } } } }