Exemplo n.º 1
0
 private void OnNodeCreated_Event(object sender, GraphNodeEventArgs e)
 {
     foreach (var node in e.Nodes)
     {
         if (node is SCBaseDomainNode)
         {
             var baseNode = node as SCBaseDomainNode;
             baseNode.SnapNode();
         }
     }
 }
Exemplo n.º 2
0
 private void OnNodeDragged_Event(object sender, GraphNodeEventArgs e)
 {
     foreach (var node in e.Nodes)
     {
         if (node is SCBaseDomainNode)
         {
             var  baseNode         = node as SCBaseDomainNode;
             var  snappedCenter    = SCBaseDomainNode.GetSnapPosition(baseNode.Bounds.center);
             bool bCannotBeSnapped = baseNode.ContainsOtherNodeAt(snappedCenter);
             baseNode.IsSnapped = !bCannotBeSnapped;
         }
     }
 }
Exemplo n.º 3
0
 private void OnNodeDragStart_Event(object sender, GraphNodeEventArgs e)
 {
 }
Exemplo n.º 4
0
 private void OnNodeDragEnd_Event(object sender, GraphNodeEventArgs e)
 {
     SnapNodes(e.Nodes);
     HandleGraphStateChanged();
 }