/// <summary> /// Sets the node, and its subnode according to the content of the explanation /// </summary> /// <param name="part"></param> /// <param name="node"></param> /// <param param name="level">the level in which the explanation is inserted</param> private void innerSetExplanation(DataDictionary.Interpreter.ExplanationPart part, ExplainTreeNode node, int level) { foreach (DataDictionary.Interpreter.ExplanationPart subPart in part.SubExplanations) { ExplainTreeNode subNode = new ExplainTreeNode(subPart); innerSetExplanation(subPart, subNode, level + 1); node.Nodes.Add(subNode); } if (level <= 2) { node.Expand(); } else { node.Collapse(); } }