private void buildTree() { treeView.Nodes.Clear(); var rootNode = new DialogTreeNode(dialog.RootNode, dialog.RootNode.ToString()); treeView.Nodes.Add(rootNode); processNode(rootNode, dialog.RootNode); }
private void processNode(DialogTreeNode treeNode, DialogNode dialogNode) { foreach (DialogNode n in dialogNode.Nodes) { DialogTreeNode tn = new DialogTreeNode(n, n.ToString()); treeNode.Nodes.Add(tn); processNode(tn, n); treeNode.Expand(); } }