示例#1
0
 public void Delete()
 {
     if (!isDirected)     // irányított
     {
         for (int i = 0; i < Edges.Count;)
         {
             Edge temp = Edges[i];
             Edges.RemoveAt(i);
             temp.DeleteEdge();
             EdgeAdded();
         }
     }
     else     // nem irányított
     {
         for (int i = 0; i < InEdges.Count;)
         {
             Edge temp = InEdges[i];
             InEdges.RemoveAt(i);
             temp.DeleteEdge();
             EdgeAdded();
         }
         for (int i = 0; i < OutEdges.Count;)
         {
             Edge temp = OutEdges[i];
             OutEdges.RemoveAt(i);
             temp.DeleteEdge();
             EdgeAdded();
         }
     }
     this.parent.Children.Remove(this);
     this.Visibility = System.Windows.Visibility.Hidden;
 }
示例#2
0
 internal void RemoveInEdge(VisibilityEdge edge)
 {
     for (int ii = InEdges.Count - 1; ii >= 0; --ii)
     {
         if (InEdges[ii] == edge)
         {
             InEdges.RemoveAt(ii);
             break;
         }
     }
 }