| | |
| | | }; |
| | | int min = device.GetAttribute("set_temp") == null ? 16 : device.GetAttribute("set_temp").min; |
| | | int max = device.GetAttribute("set_temp") == null ? 32 : device.GetAttribute("set_temp").max; |
| | | string unit = device.GetAttribute("temperature_type") == null ? "℃" : device.GetAttribute("temperature_type").state; |
| | | if (string.IsNullOrEmpty(unit)) |
| | | { |
| | | //调试软件有空能上传为空 |
| | | unit = "℃"; |
| | | } |
| | | string unit = InpOrOutLogicMethod.Current.GetTemperatureUnit(device); |
| | | ///温度点击事件 |
| | | temperatureView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | string set_temp_value = stateStr.Replace(unit, ""); |
| | | //数据封装 |
| | | AddDictionary(keyVlaue, set_temp_value); |
| | | }, min,max, unit); |
| | | }, min, max, unit); |
| | | |
| | | }; |
| | | ///模式点击事件 |
| | |
| | | { |
| | | int min = device.GetAttribute("set_temp") == null ? 16 : device.GetAttribute("set_temp").min; |
| | | int max = device.GetAttribute("set_temp") == null ? 32 : device.GetAttribute("set_temp").max; |
| | | string unit = device.GetAttribute("temperature_type") == null ? "℃" : device.GetAttribute("temperature_type").state; |
| | | if (string.IsNullOrEmpty(unit)) { |
| | | //调试软件有空能上传为空 |
| | | unit = "℃"; |
| | | } |
| | | string unit = InpOrOutLogicMethod.Current.GetTemperatureUnit(device); |
| | | string tempValue = temperatureView.btnState.Text; |
| | | LogicView.TemperatureView tempView = new LogicView.TemperatureView(); |
| | | tempView.FLayoutView(this, tempValue, (stateStr) => |