Exemplo n.º 1
0
 private void delete(TTNode current)
 {
     if (current != null)
     {
         foreach (LineShape line in current.linesToChildren)
         {
             line.Dispose();
         }
         current.linesToChildren.Clear();
         if (current.parent != null)
         {
             current.parent.children.Clear();
         }
         current.delete();
     }
 }
Exemplo n.º 2
0
 public void delete()
 {
     foreach (TTNode child in children)
     {
         child.delete();
     }
     tb.Dispose();
     cb.Dispose();
     linesToChildren.Clear();
     if (lineToParent != null)
     {
         lineToParent.Dispose();
         lineToParent = null;
     }
     if (parent != null)
     {
         parent.linesToChildren.Clear();
     }
     if (sibling != null && !siblingDeleted)
     {
         siblingDeleted = true;
         sibling.delete();
     }
 }