2023年06月07日13:45:26
输出目标:空调,地暖温度范围用实际上传的值作为限制;
| | |
| | | /// <param name="frameLayout">弹窗父控件</param> |
| | | /// <param name="stateValue">之前状态值</param> |
| | | /// <param name="action">返回结果</param> |
| | | public void FLayoutView(FrameLayout frameLayout, string stateValue, Action<string> action) |
| | | public void FLayoutView(FrameLayout frameLayout, string stateValue, Action<string> action,int min,int max) |
| | | { |
| | | FrameLayout frame = new FrameLayout |
| | | { |
| | |
| | | }; |
| | | //初始化列表 |
| | | var temperatureList = new List<string>(); |
| | | for (int i = 16; i < 32; i++) |
| | | for (int i = min; i < max; i++) |
| | | { |
| | | //添加数据 |
| | | temperatureList.Add(i.ToString() + "℃"); |
| | |
| | | { |
| | | SwitchViewMethod(device, acSwitchVie.btnState, 2); |
| | | }; |
| | | 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; |
| | | ///温度点击事件 |
| | | temperatureView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | string set_temp_value = stateStr.Replace("℃", ""); |
| | | //数据封装 |
| | | AddDictionary(keyVlaue, set_temp_value); |
| | | }); |
| | | |
| | | }, min,max); |
| | | |
| | | }; |
| | | ///模式点击事件 |
| | |
| | | ///温度点击事件 |
| | | temperatureView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | 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 tempValue = temperatureView.btnState.Text; |
| | | LogicView.TemperatureView tempView = new LogicView.TemperatureView(); |
| | | tempView.FLayoutView(this, tempValue, (stateStr) => |
| | |
| | | //数据封装 |
| | | AddDictionary(keyVlaue, set_temp_value); |
| | | |
| | | }); |
| | | },min,max); |
| | | |
| | | }; |
| | | ///模式点击事件 |