JLChen
2021-08-28 d9fd4c59bea0f21d4c8241920cef90440cf53f43
2021-8-28-05

增加甲醛作为输入条件
8个文件已修改
261 ■■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -955,9 +955,9 @@
7101=*Please set the value in this range (1 ~ 100).
7102=No set value.
7103=Excellent: 0 ~ 35ug/m3
7104=Good: 35 ~ 75ug/m3
7105=Light pollution: 75 ~ 115ug/m3
7106=Moderate pollution: 115 ~ 150ug/m3
7104=Good: 36 ~ 75ug/m3
7105=Light pollution: 76 ~ 115ug/m3
7106=Moderate pollution: 116 ~ 150ug/m3
7107=Heavy pollution: > 150ug/m3
7108=Leak/No Leak
7109=Leak
@@ -1002,6 +1002,8 @@
7148=Disarm
7149=Manually
7150=Smart
7151=Good
    
@@ -2049,9 +2051,9 @@
7101=*请在这个范围(1~100)设置值。
7102=还没有设置值。
7103=优:0~35ug/m³
7104=良:35~75ug/m³
7105=轻度污染:75~115ug/m³
7106=中度污染:115~150ug/m³
7104=良:36~75ug/m³
7105=轻度污染:76~115ug/m³
7106=中度污染:116~150ug/m³
7107=重度污染:>150ug/m³
7108=泄漏/无泄漏
7109=泄漏
@@ -2096,6 +2098,8 @@
7148=撤防
7149=手动
7150=智能
7151=良好
 
9000=请使用新的手机账号登录APP
HDL-ON_iOS/Resources/Language.ini
@@ -955,9 +955,9 @@
7101=*Please set the value in this range (1 ~ 100).
7102=No set value.
7103=Excellent: 0 ~ 35ug/m3
7104=Good: 35 ~ 75ug/m3
7105=Light pollution: 75 ~ 115ug/m3
7106=Moderate pollution: 115 ~ 150ug/m3
7104=Good: 36 ~ 75ug/m3
7105=Light pollution: 76 ~ 115ug/m3
7106=Moderate pollution: 116 ~ 150ug/m3
7107=Heavy pollution: > 150ug/m3
7108=Leak/No Leak
7109=Leak
@@ -1002,6 +1002,8 @@
7148=Disarm
7149=Manually
7150=Smart
7151=Good
    
@@ -2049,9 +2051,9 @@
7101=*请在这个范围(1~100)设置值。
7102=还没有设置值。
7103=优:0~35ug/m³
7104=良:35~75ug/m³
7105=轻度污染:75~115ug/m³
7106=中度污染:115~150ug/m³
7104=良:36~75ug/m³
7105=轻度污染:76~115ug/m³
7106=中度污染:116~150ug/m³
7107=重度污染:>150ug/m³
7108=泄漏/无泄漏
7109=泄漏
@@ -2096,6 +2098,8 @@
7148=撤防
7149=手动
7150=智能
7151=良好
 
9000=请使用新的手机账号登录APP
HDL_ON/Common/R.cs
@@ -2403,15 +2403,15 @@
        /// </summary>
        public const int pmyou = 7103;
        /// <summary>
        /// 良:35~75ug/m³
        /// 良:36~75ug/m³
        /// </summary>
        public const int pmliang = 7104;
        /// <summary>
        /// 轻度污染:75~115ug/m³
        /// 轻度污染:76~115ug/m³
        /// </summary>
        public const int pmqingdu= 7105;
        /// <summary>
        /// 中度污染:115~150ug/m³
        /// 中度污染:116~150ug/m³
        /// </summary>
        public const int pmzhongdu = 7106;
        /// <summary>
@@ -2590,6 +2590,10 @@
        /// smart:智能
        /// </summary>
        public const int zhineng = 7150;
        /// <summary>
        /// 良好
        /// </summary>
        public const int lianghao = 7151;
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -360,17 +360,16 @@
                    }
                    break;
                //甲醛
                case SPK.:
                case SPK.SensorHcho:
                    {
                        ///tvoc
                        LogicView.FunTypeView tvocView = new LogicView.FunTypeView();
                        tvocView.btnText.TextID = StringId.tvoc;
                        fLayout.AddChidren(tvocView.FLayoutView());
                        ///tvoc点击事件
                        tvocView.btnClick.MouseUpEventHandler += (sender, e) =>
                        ///hcho
                        LogicView.FunTypeView hchoView = new LogicView.FunTypeView();
                        hchoView.btnText.TextID = StringId.tvoc;
                        fLayout.AddChidren(hchoView.FLayoutView());
                        ///hcho点击事件
                        hchoView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            PmCo2TvocAction(this, device, "tvoc", StringId.tvoc, index, edit);
                            PmCo2TvocAction(this, device, "hcho", StringId.Formaldehyde, index, edit);
                        };
                    }
@@ -624,7 +623,7 @@
        /// <param name="index"></param>
        /// <param name="edit"></param>
        /// <param name="stateValue">编辑之前的状态值,默认为""</param>
        public void PmCo2TvocAction(FrameLayout frame, Entity.Function device,string key,int title, int index, bool edit, string stateValue = "")
        public void PmCo2TvocAction(FrameLayout frame, Entity.Function device, string key, int title, int index, bool edit, string stateValue = "")
        {
            if (edit)
            {
@@ -637,15 +636,15 @@
                    dicSateteList = inputs.condition;
                }
            }
            PublicInterface view = new PublicInterface();
            var listStr = view.GetViewList(key);
            PublicInterface view = new PublicInterface();
            var listStr = view.GetViewList(key);
            view.SingleSelectionShow(frame, listStr, Language.StringByID(title), view.GetString(key, stateValue)
               , (text) =>
               {
                   var value = view.GetValue(key, text);
                   selectedState = device.spk + "_"+ key;
                   AddDictionary(key, value, "integer","in");
                   Save(device,index, edit);
                   selectedState = device.spk + "_" + key;
                   AddDictionary(key, value, "integer", "in");
                   Save(device, index, edit);
               });
        }
        /// <summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -413,6 +413,13 @@
                                    }
                                    break;
                                case SPK.SensorHcho:
                                    {
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList);
                                        inputView.btnState.Text = str;
                                    }
                                    break;
                            }
                        }
                        break;
@@ -656,6 +663,7 @@
                                || device.spk == SPK.SensorCO2
                                || device.spk == SPK.SensorPm25
                                || device.spk == SPK.SensorTVOC
                                   || device.spk == SPK.SensorHcho
                                )
                                {
                                    //这个设备比较特殊
@@ -708,12 +716,16 @@
                                            case "pm25":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "tvoc":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "tvoc", StringId.tvoc, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "hcho":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "hcho", StringId.tvoc, indexVulae, true, stateValue);
                                                }
                                                break;
                                        }
@@ -2148,6 +2160,11 @@
                            strtext = Language.StringByID(StringId.tvoc) + new PublicInterface { }.GetString("tvoc", value);
                        }
                        break;
                    case "hcho":
                        {
                            strtext = Language.StringByID(StringId.Formaldehyde) + new PublicInterface { }.GetString("hcho", value);
                        }
                        break;
                }
            }
            return strtext;
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -367,6 +367,7 @@
                case SPK.SensorCO2:
                case SPK.SensorPm25:
                case SPK.SensorTVOC:
                case SPK.SensorHcho:
                    {
                        strPath = "LogicIcon/sensor.png";
                    }
@@ -438,6 +439,7 @@
                    || device.spk == SPK.SensorCO2
                      || device.spk == SPK.SensorPm25
                        || device.spk == SPK.SensorTVOC
                          || device.spk == SPK.SensorHcho
            );
            if (sensor != null)
            {
@@ -500,6 +502,7 @@
                functionTypeList.Add(SPK.SensorCO2);
                functionTypeList.Add(SPK.SensorPm25);
                functionTypeList.Add(SPK.SensorTVOC);
                functionTypeList.Add(SPK.SensorHcho);
            }
@@ -546,6 +549,7 @@
                        deviceTypeList.Add(SPK.SensorCO2);
                        deviceTypeList.Add(SPK.SensorPm25);
                        deviceTypeList.Add(SPK.SensorTVOC);
                        deviceTypeList.Add(SPK.SensorHcho);
                    }
                    break;
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
@@ -719,12 +719,12 @@
                      };
                    }
                    break;
                case "tvoc":
                case "hcho":
                    {
                        list = new List<string> {
             Language.StringByID(StringId.zhengchang)+ ":0~399PPB",
             Language.StringByID(StringId.chaobiao)+ ":400~699PPB",
             Language.StringByID(StringId.yanzhong)+":>700PPB",
             Language.StringByID(StringId.youxiu)+ ":(0~0.08mg/m3)",
             Language.StringByID(StringId.lianghao)+":(0.09~0.1mg/m3)",
             Language.StringByID(StringId.chaobiao)+ ":>(0.1mg/m3)",
                      };
                    }
                    break;
@@ -939,71 +939,98 @@
        public string GetString(string type, string strValue)
        {
            string text = "";
            int intValue = 0;
            if (strValue != "")
            {
                intValue = int.Parse(strValue);
            }
            switch (type)
            {
                case "pm25":
                    {
                        if (intValue >= 0 && intValue <= 35)
                        {
                            text = Language.StringByID(StringId.pmyou);
                        switch (strValue) {
                            case "(0,35]": {
                                    text = Language.StringByID(StringId.pmyou);
                                }
                                break;
                            case "(36,75]": {
                                    text = Language.StringByID(StringId.pmliang);
                                } break;
                            case "(76,115]": {
                                    text = Language.StringByID(StringId.pmqingdu);
                                } break;
                            case "(116,150]": {
                                    text = Language.StringByID(StringId.pmzhongdu);
                                } break;
                            case "(150,100000]": {
                                    text = Language.StringByID(StringId.pmzhongduwuran);
                                } break;
                        }
                        else if (intValue >35 && intValue <= 75)
                        {
                            text = Language.StringByID(StringId.pmliang);
                        }
                        else if (intValue > 75 && intValue <= 115)
                        {
                            text = Language.StringByID(StringId.pmqingdu);
                        }
                        else if (intValue >115 && intValue <= 150)
                        {
                            text = Language.StringByID(StringId.pmzhongdu);
                        }
                        else if (intValue > 150)
                        {
                            text = Language.StringByID(StringId.pmzhongduwuran);
                        }
                    }
                    break;
                case "co2":
                    {
                        if (intValue >= 0 && intValue <= 1000)
                        switch (strValue)
                        {
                            text = Language.StringByID(StringId.zhengchang)+ ":0~1000PPM";
                        }
                        else if (intValue > 1000 && intValue <= 2000)
                        {
                            text = Language.StringByID(StringId.piangao) + ":1001~2000PPM";
                        }
                        else if (intValue > 2000)
                        {
                            text = Language.StringByID(StringId.chaobiao) + ":>2000PPM";
                            case "(0,1000]":
                                {
                                    text = Language.StringByID(StringId.zhengchang) + ":0~1000PPM";
                                }
                                break;
                            case "(1001,2000]":
                                {
                                    text = Language.StringByID(StringId.piangao) + ":1001~2000PPM";
                                }
                                break;
                            case "(2000,200000]":
                                {
                                    text = Language.StringByID(StringId.chaobiao) + ":>2000PPM";
                                }
                                break;
                        }
                    }
                    break;
                case "tvoc":
                    {
                        switch (strValue)
                        {
                            case "(0,1000]":
                                {
                                    text = Language.StringByID(StringId.zhengchang) + ":0~399PPB";
                                }
                                break;
                            case "(1001,2000]":
                                {
                                    text = Language.StringByID(StringId.chaobiao) + ":400~699PPB";
                                }
                                break;
                            case "(2000,200000]":
                                {
                                    text = Language.StringByID(StringId.yanzhong) + ":>700PPB";
                                }
                                break;
                        }
                        if (intValue >=1 && intValue <= 3)
                    }
                    break;
                case "hcho":
                    {
                        switch (strValue)
                        {
                            text = Language.StringByID(StringId.zhengchang) + ":0~399PPB";
                            case "(0,0.08]":
                                {
                                    text = Language.StringByID(StringId.youxiu) + ":(0~0.08mg/m3)";
                                }
                                break;
                            case "(0.09,0.1]":
                                {
                                    text = Language.StringByID(StringId.lianghao) + ":(0.09~0.1mg/m3)";
                                }
                                break;
                            case "(0.1,10000]":
                                {
                                    text = Language.StringByID(StringId.chaobiao) + ":>(0.1mg/m3)";
                                }
                                break;
                        }
                        else if (intValue >=4 && intValue<=6)
                        {
                            text = Language.StringByID(StringId.chaobiao) + ":400~699PPB";
                        }
                        else if (intValue >= 7 && intValue <= 9)
                        {
                            text = Language.StringByID(StringId.yanzhong) + ":>700PPB";
                        }
                    }
                    break;
            }
@@ -1025,23 +1052,23 @@
                    {
                        if (text == Language.StringByID(StringId.pmyou))
                        {
                            value = "10";
                            value = "(0,35]";
                        }
                        else if (text == Language.StringByID(StringId.pmliang))
                        {
                            value = "50";
                            value = "(36,75]";
                        }
                        else if (text == Language.StringByID(StringId.pmqingdu))
                        {
                            value = "90";
                            value = "(76,115]";
                        }
                        else if (text == Language.StringByID(StringId.pmzhongdu))
                        {
                            value = "130";
                            value = "(116,150]";
                        }
                        else if (text == Language.StringByID(StringId.pmzhongduwuran))
                        {
                            value = "170";
                            value = "(150,100000]";
                        }
                    }
                    break;
@@ -1049,15 +1076,15 @@
                    {
                        if (text == Language.StringByID(StringId.zhengchang) + ":0~1000PPM")
                        {
                            value = "400";
                            value = "(0,1000]";
                        }
                        else if (text == Language.StringByID(StringId.piangao) + ":1001~2000PPM")
                        {
                            value = "1850";
                            value = "(1001,2000]";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao) + ":>2000PPM")
                        {
                            value = "2200";
                            value = "(2000,200000]";
                        }
                    }
                    break;
@@ -1065,15 +1092,31 @@
                    {
                        if (text == Language.StringByID(StringId.zhengchang) + ":0~399PPB")
                        {
                            value = "2";
                            value = "(0,399]";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao) + ":400~699PPB")
                        {
                            value = "5";
                            value = "(400,699]";
                        }
                        else if (text == Language.StringByID(StringId.yanzhong) + ":>700PPB")
                        {
                            value = "8";
                            value = "(700,70000]";
                        }
                    }
                    break;
                case "hcho":
                    {
                        if (text == Language.StringByID(StringId.youxiu) + ":(0~0.08mg/m3)")
                        {
                            value = "(0,0.08]";
                        }
                        else if (text == Language.StringByID(StringId.lianghao) + ":(0.09~0.1mg/m3)")
                        {
                            value = "(0.09,0.1]";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao) + ":>(0.1mg/m3)")
                        {
                            value = "(0.1,10000]";
                        }
                    }
                    break;
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -470,7 +470,7 @@
                                    var dic = dicSateteList[i];
                                    if (dic.ContainsValue("on_off"))
                                    {
                                        if (dic["on_off"] == "on")
                                        if (dic["value"] == "on")
                                        {
                                            //判断是否存在且是开状态
                                            _bool = true;