Beispiel #1
0
            /// <summary>
            /// Initializes a new instance of the <see cref="TreeNode"/> class.
            /// </summary>
            public TreeNode(TreeNode parentNode, NetConfig.NodeParams nodeParams)
            {
                // Set fields
                this.ParentNode = parentNode;
                this.Params     = nodeParams;

                // If this region is parent of lower regions/sensors in the hierarchy then create and add nodes to them.
                foreach (var childNodeParams in this.Params.Children)
                {
                    var childTreeNode = new TreeNode(this, childNodeParams);
                    this.Children.Add(childTreeNode);
                }
            }
            /// <summary>
            /// Initializes a new instance of the <see cref="TreeNode"/> class.
            /// </summary>
            public TreeNode(TreeNode parentNode, NetConfig.NodeParams nodeParams)
            {
                // Set fields
                this.ParentNode = parentNode;
                this.Params = nodeParams;

                // If this region is parent of lower regions/sensors in the hierarchy then create and add nodes to them.
                foreach (var childNodeParams in this.Params.Children)
                {
                    var childTreeNode = new TreeNode(this, childNodeParams);
                    this.Children.Add(childTreeNode);
                }
            }