| | |
| | | case DeviceType.TemperatureSensor: |
| | | // conditionIcon.UnSelectedImagePath = "ZigeeLogic/temperature.png"; |
| | | var dev = deviceinof as TemperatureSensor; |
| | | if (conditions["Cluster_ID"]=="1026") { |
| | | if (conditions["Cluster_ID"] == "1026") |
| | | { |
| | | dev.SensorDiv = 1; |
| | | } else { |
| | | } |
| | | else |
| | | { |
| | | dev.SensorDiv = 2; |
| | | } |
| | | string s = ""; |
| | | switch (conditions["Range"]) |
| | | { |
| | | case "0": |
| | | { |
| | | s = ">"; |
| | | } |
| | | break; |
| | | case "1": |
| | | { |
| | | s = "="; |
| | | } |
| | | break; |
| | | case "2": |
| | | { |
| | | s = "<"; |
| | | } |
| | | break; |
| | | case "6": |
| | | { |
| | | s = "≥"; |
| | | } |
| | | break; |
| | | case "7": |
| | | { |
| | | s = "≤"; |
| | | } |
| | | break; |
| | | } |
| | | if (conditions["Cluster_ID"] == "1026") |
| | | { |
| | | conditionIcon.UnSelectedImagePath = "ZigeeLogic/temperature.png"; |
| | | devicestatus.Text = ">" + conditions["AttriButeData1"] + "℃"; |
| | | devicestatus.Text = s + conditions["AttriButeData1"] + "℃"; |
| | | } |
| | | else |
| | | { |
| | | conditionIcon.UnSelectedImagePath = "ZigeeLogic/humidity.png"; |
| | | devicestatus.Text = "<" + conditions["AttriButeData1"] + "%"; |
| | | devicestatus.Text = s + conditions["AttriButeData1"] + "%"; |
| | | } |
| | | break; |
| | | |