wjc
2023-06-07 c1e3ff02ca39fe65d0685b06d1e1f63e25eaedb5
2023年06月07日14:53:51

输出空调地暖设备兼用华摄度单位
3个文件已修改
26 ■■■■ 已修改文件
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TemperatureView.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -1170,8 +1170,8 @@
                                        if (set_temp != "")
                                        {
                                            stateStr += set_temp + "℃,";
                                            string unit = device.GetAttribute("temperature_type") == null ? "°" : device.GetAttribute("temperature_type").state;
                                            stateStr += set_temp + unit+",";
                                        }
                                        if (mode != "")
@@ -1268,8 +1268,8 @@
                                        }
                                        if (set_temp != "")
                                        {
                                            stateStr += set_temp + "℃,";
                                            string unit = device.GetAttribute("temperature_type") == null ? "°" : device.GetAttribute("temperature_type").state;
                                            stateStr += set_temp + unit + ",";
                                        }
                                        if (mode != "")
                                        {
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TemperatureView.cs
@@ -11,7 +11,7 @@
        /// <param name="frameLayout">弹窗父控件</param>
        /// <param name="stateValue">之前状态值</param>
        /// <param name="action">返回结果</param>
        public void FLayoutView(FrameLayout frameLayout, string stateValue, Action<string> action,int min,int max)
        public void FLayoutView(FrameLayout frameLayout, string stateValue, Action<string> action,int min,int max,string unit)
        {
            FrameLayout frame = new FrameLayout
            {
@@ -31,15 +31,15 @@
            for (int i = min; i < max; i++)
            {
                //添加数据
                temperatureList.Add(i.ToString() + "℃");
                temperatureList.Add((i + 0.5).ToString() + "℃");
                temperatureList.Add(i.ToString() + unit);
                temperatureList.Add((i + 0.5).ToString() + unit);
            }
            //加载数据界面的设置方法(列表互不联动)
            view.mUIPickerView.setNPicker(temperatureList, null, null);
            //默认初始选中状态
            view.mUIPickerView.setCurrentItems(9, 0, 0);
            //定义一个局部变量记录选中时间
            string temperature = "25℃";
            string temperature = "25"+ unit;
            for (int i = 0; i < temperatureList.Count; i++)
            {
                if (temperatureList[i] == stateValue)
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -333,6 +333,7 @@
                        };
                        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;
                        ///温度点击事件
                        temperatureView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
@@ -346,10 +347,10 @@
                                //设备属性值,云雀上定义好的;
                                string keyVlaue = "set_temp";
                                selectedState = device.spk + "_" + keyVlaue;
                                string set_temp_value = stateStr.Replace("℃", "");
                                string set_temp_value = stateStr.Replace(unit, "");
                                //数据封装
                                AddDictionary(keyVlaue, set_temp_value);
                            }, min,max);
                            }, min,max, unit);
                        };
                        ///模式点击事件
@@ -438,6 +439,7 @@
                        {
                            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;
                            string tempValue = temperatureView.btnState.Text;
                            LogicView.TemperatureView tempView = new LogicView.TemperatureView();
                            tempView.FLayoutView(this, tempValue, (stateStr) =>
@@ -447,11 +449,11 @@
                                //设备属性值,云雀上定义好的;
                                string keyVlaue = "set_temp";
                                selectedState = device.spk + "_" + keyVlaue;
                                string set_temp_value = stateStr.Replace("℃", "");
                                string set_temp_value = stateStr.Replace(unit, "");
                                //数据封装
                                AddDictionary(keyVlaue, set_temp_value);
                            },min,max);
                            }, min, max, unit);
                        };
                        ///模式点击事件