//[NonSerialized] //public BACnetTreeNode Parent; //public BACnetTreeNode(BACnetTreeNode parentNode) //{ // this.Parent = parentNode; // //CopyParentData(); //} //public void CopyParentData() //{ // foreach (var kvp in Parent.data) // this.data.Add(kvp.Key, kvp.Value); //} public void CopyNodeData(BACnetTreeNode otherNode) { foreach (var kvp in otherNode.data) { this.data.Add(kvp.Key, kvp.Value); } }
public BACnetTreeNode GetTreeNode() { var tn = new BACnetTreeNode(); tn.title = this.TypeString; tn.children = this.GetChildNodes(); tn.data["node_type"] = "object_type"; return(tn); }
public BACnetTreeNode GetTreeNode() { var tn = new BACnetTreeNode(); tn.title = this.IpAddress; tn.lazy = true; tn.data["ip_address"] = this.IpAddress; tn.data["node_type"] = "network"; return(tn); }
public BACnetTreeNode GetTreeNode() { var tn = new BACnetTreeNode(); tn.title = "Device " + this.InstanceNumber + " - " + this.BacnetAddress.ToString(); //TODO: use device name instead? tn.lazy = true; tn.CopyNodeData(this.BacnetNetwork.GetTreeNode()); tn.data["device_instance"] = this.InstanceNumber; tn.data["node_type"] = "device"; return(tn); }
public BACnetTreeNode GetTreeNode() { var tn = new BACnetTreeNode(); //tn.children = null; tn.title = this.Name; tn.CopyNodeData(this.BacnetDevice.GetTreeNode()); tn.data["object_type"] = (Int32)this.BacnetObjectId.Type; //could have done string, probably...but Int is more consistent (it's the underlying type) tn.data["object_instance"] = this.BacnetObjectId.Instance; tn.data["node_type"] = "object"; return(tn); }
public static BACnetTreeNode RootNode() { var tn = new BACnetTreeNode(); tn.title = "All networks"; tn.folder = true; tn.lazy = true; //tn.children = null; //tn.data["is_global_network"] = true; tn.data["node_type"] = "global_network"; return(tn); }