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); }