private void _makeRootNode(string ViewName, CswNbtViewRoot ViewRoot, string IconFileName, bool Selectable) { if (_RootNode == null) { _makeNbtTreeNode(_TreeNode, Elements.Node, null, ViewName, 0, 0, IconFileName, Selectable, ViewRoot, CswEnumNbtNodeSpecies.Root, true, false, false, (ViewRoot != null) && ViewRoot.Included, null, out _RootNode, out _RootNodeKey); _CurrentNode = _RootNode; } else { throw new CswDniException("CswNbtTreeNodes attempted to add a second root node to the tree"); } }
public static CswNbtViewNode makeViewNode( CswNbtResources CswNbtResources, CswNbtView View, CswDelimitedString ViewNodeString ) { CswNbtViewNode newNode = null; CswEnumNbtViewNodeType type = (CswEnumNbtViewNodeType) ViewNodeString[0]; if( type == CswEnumNbtViewNodeType.CswNbtViewRelationship ) { newNode = new CswNbtViewRelationship( CswNbtResources, View, ViewNodeString ); } else if( type == CswEnumNbtViewNodeType.CswNbtViewProperty ) { newNode = new CswNbtViewProperty( CswNbtResources, View, ViewNodeString ); } else if( type == CswEnumNbtViewNodeType.CswNbtViewPropertyFilter ) { newNode = new CswNbtViewPropertyFilter( CswNbtResources, View, ViewNodeString ); } else if( type == CswEnumNbtViewNodeType.CswNbtViewRoot ) { newNode = new CswNbtViewRoot( CswNbtResources, View, ViewNodeString ); } else { throw new CswDniException( CswEnumErrorType.Error, "Invalid ViewNode", "CswNbtViewNode.makeViewNode() got an invalid ViewNodeString: " + ViewNodeString.ToString() ); } return newNode; } // makeViewNode()
public void makeRootNode(CswNbtViewRoot ViewRoot) { _makeRootNode(ViewRoot.ViewName, ViewRoot, ViewRoot.IconFileName, ViewRoot.Selectable); }