Exemple #1
0
        /// <summary>
        /// Adds the <paramref name="node" /> to the list of nodes that are children of this instance.
        /// </summary>
        /// <param name="node">The node to add.</param>
        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="node" /> is null.</exception>
        public void AddNode(JsTreeNode node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            if (_nodes == null)
            {
                _nodes = new List <JsTreeNode>();
            }

            _nodes.Add(node);
        }
Exemple #2
0
 /// <summary>
 /// Adds the <paramref name="node" /> to the collection of <see cref="JsTreeNode" /> instances.
 /// </summary>
 /// <param name="node">The node to add.</param>
 public void AddInternalNode(JsTreeNode node)
 {
     _node.AddNode(node);
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TreeNode"/> class. The <see cref="Nodes" /> property is initialized
 /// to an empty collection.
 /// </summary>
 public TreeNode()
 {
     _node = new JsTreeNode();
     Nodes = new TreeNodeCollection(this);
 }