private void collect_nodes(Division_Tree Tree, List<BriefItem_FileGrouping> Groupings, List<BriefItem_TocElement> Toc) { // If not roots, do nothing! if (( Tree == null ) || ( Tree.Roots == null ) || ( Tree.Roots.Count == 0 )) return; // Create the stack used for determining the TOC Stack<BriefItem_TocElement> currDivStack = new Stack<BriefItem_TocElement>(); // Start at the very top? List<abstract_TreeNode> rootNodes = Tree.Roots; if ((rootNodes.Count == 1) && (!rootNodes[0].Page)) { // This was a division node Division_TreeNode divNode = (Division_TreeNode) Tree.Roots[0]; if ((divNode.Nodes != null) && (divNode.Nodes.Count > 0)) { rootNodes = divNode.Nodes; } } // Now, step through all the nodes foreach (abstract_TreeNode thisNode in rootNodes) { recurse_through_nodes(thisNode, Groupings, Toc, currDivStack, 1); } }
/// <summary> Constructor creates a new instance of the Divison_Info class </summary> public Division_Info() { physicalDivisionTree = new Division_Tree(); downloadDivisionTree = new Division_Tree(); source_directory = String.Empty; suppress_checksum = true; directly_set_page_count = 0; }
private void collect_extensions(Division_Tree Tree, List<string> Extensions) { // If not roots, do nothing! if ((Tree == null) || (Tree.Roots == null) || (Tree.Roots.Count == 0)) return; // Now, step through all the nodes foreach (abstract_TreeNode thisNode in Tree.Roots) { recurse_through_nodes(thisNode, Extensions); } }