void GitTree_MouseMove(object sender, MouseEventArgs e)
{
TreeView gitTree = (TreeView)sender;
//DRAG
// If the mouse moves outside the rectangle, start the drag.
if (gitTreeDragBoxFromMouseDown != Rectangle.Empty &&
!gitTreeDragBoxFromMouseDown.Contains(e.X, e.Y))
{
StringCollection fileList = new StringCollection();
//foreach (GitItemStatus item in SelectedItems)
if (gitTree.SelectedNode != null)
{
GitItem item = gitTree.SelectedNode.Tag as GitItem;
if (item != null)
{
string fileName = Path.Combine(Module.WorkingDir, item.FileName);
fileList.Add(fileName.Replace('/', '\\'));
}
DataObject obj = new DataObject();
obj.SetFileDropList(fileList);
// Proceed with the drag and drop, passing in the list item.
DoDragDrop(obj, DragDropEffects.Copy);
gitTreeDragBoxFromMouseDown = Rectangle.Empty;
}
}
}
#endregion