Example #1
0
        protected void AddChildToIntermediate(BrowserTreeNode childNode,
                                              IntermediateNodeType intNodeType,
                                              int intIndex)
        {
            // Look for the intermediate node with the right type
            bool found = false;

            foreach (BrowserTreeNode intNode in Nodes)
            {
                if (intNode is IntermediateTreeNode && ((IntermediateTreeNode)intNode).NodeType ==
                    intNodeType)
                {
                    intNode.AddLogicalNode(childNode, ++intIndex);
                    found = true;
                    break;
                }
            }
            // Add a new intermediate node
            if (!found)
            {
                IntermediateTreeNode intNode = new IntermediateTreeNode(intNodeType, this);
                intNode._useIntermediates = _useIntermediates;
                intNode.SetPresInfo(intNodeType.PresentationInfo);
                ((TreeListView)TreeView).Add(Nodes, intNode);
                intNode.AddLogicalNode(childNode, ++intIndex);
                _hasChildIntNodes = true;
            }
        }
		protected void AddChildToIntermediate(BrowserTreeNode childNode,
											 IntermediateNodeType intNodeType,
											 int intIndex)
		{
			// Look for the intermediate node with the right type
			bool found = false;
			foreach (BrowserTreeNode intNode in Nodes) {
				if (intNode is IntermediateTreeNode && ((IntermediateTreeNode)intNode).NodeType ==
					intNodeType) {
					intNode.AddLogicalNode(childNode, ++intIndex);
					found = true;
					break;
				}
			}
			// Add a new intermediate node
			if (!found) {
				IntermediateTreeNode intNode = new IntermediateTreeNode(intNodeType, this);
				intNode._useIntermediates = _useIntermediates;
				intNode.SetPresInfo(intNodeType.PresentationInfo);
				((TreeListView)TreeView).Add(Nodes, intNode);
				intNode.AddLogicalNode(childNode, ++intIndex);
				_hasChildIntNodes = true;
			}
		}