update 20240812
This commit is contained in:
@@ -119,9 +119,11 @@ namespace OnDoc.Versandstrasse
|
||||
TreeNodeAdv sourceNode = (TreeNodeAdv)e.Data.GetData(typeof(TreeNodeAdv));
|
||||
this.currentSourceNode = sourceNode;
|
||||
droppable = this.CanDrop(sourceNode, destinationNode);
|
||||
//if (droppable == true) { if (destinationNode.Tag.ToString() != "Druckpaket") { droppable = false; } }
|
||||
}
|
||||
else
|
||||
droppable = false;
|
||||
|
||||
if (droppable)
|
||||
e.Effect = DragDropEffects.Move;
|
||||
else
|
||||
@@ -130,10 +132,27 @@ namespace OnDoc.Versandstrasse
|
||||
}
|
||||
private bool CanDrop(TreeNodeAdv sourceNode, TreeNodeAdv destinationNode)
|
||||
{
|
||||
if (destinationNode == null || destinationNode == sourceNode )
|
||||
TreeNodeAdv xdestinationNode = this.treeViewDragHighlightTracker.HighlightNode;
|
||||
TreeViewDropPositions dropPosition = this.treeViewDragHighlightTracker.DropPosition;
|
||||
|
||||
|
||||
if (destinationNode == null || destinationNode == sourceNode)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
if (xdestinationNode.Level == 1 && dropPosition != TreeViewDropPositions.OnNode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (xdestinationNode.Level == 2 ) { return true; }
|
||||
}
|
||||
catch { }
|
||||
|
||||
|
||||
return true; }
|
||||
}
|
||||
|
||||
private void treeViewAdv1_ItemDrag(object sender, ItemDragEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user