update 20240812

This commit is contained in:
Stefan Hutter
2024-08-12 16:35:06 +02:00
parent 43c44e0aad
commit fc8811829d
7922 changed files with 205978 additions and 91947 deletions

View File

@@ -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)