BinaryTreeViewer is a C# library that draws binary trees on runtime into HTML files.
To use the BinaryTreeViewer, you need to use the BinaryTreeViewer.BinaryTree class as your Binary Tree structure.
For example:
BinaryTree<int> tree = new BinaryTree<int>(1);
tree.SetLeft(new BinaryTree<int>(5));To show the tree -> pass the head of the tree as an argument to BinaryTreeViewer.BTViewer as the following:
BTViewer.View(tree);The binary-tree HTML files are saved in chronological order by using a counter. The file name structure for the trees is "BINTREE.html".
If you want to delete the temporary binary trees -> use the function ClearTrees inside BTViewer as the following:
BTViewer.ClearTrees(TreesToClear treesToClear);Delete the files that were created on the current run -> treesToClear.CurrentRun Delete the files that were created on previous runs -> treesToClear.PreviousRuns Delete all of the BINTREE temporary files -> (treesToClear.PreviousRuns | treesToClear.CurrentRun)