private void lvEquip_ItemDrag(object sender, System.Windows.Forms.ItemDragEventArgs e)
...{
this.DoDragDrop(e.Item,DragDropEffects.Move);
}
private void tvDept_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
...{
e.Effect=DragDropEffects.Move;
}
private void tvDept_DragOver(object sender, System.Windows.Forms.DragEventArgs e)
...{
Point ptScreen=new Point(e.X,e.Y);
Point pt=tvDept.PointToClient(ptScreen);
ListViewItem item=tvDept.GetItemAt(pt.X,pt.Y);
if(item!=null)
item.Selected=true;
}
private void tvDept_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
...{
Add_EquipMent();
}
private void tvDept_SelectedIndexChanged(object sender, System.EventArgs e)
...{
if(tvDept.SelectedItems.Count==0) return;
DeptInfo DeptInfo=(DeptInfo)tvDept.SelectedItems[0].Tag;
this.GetEquipDeptList(DeptInfo.DeptID);
this.Text=DeptInfo.DeptName.ToString();
}