wjc
2022-08-25 7b96ea115d51fb721130fef8622500740dea7b08
2022年08月25日18:06:27
15个文件已修改
526 ■■■■■ 已修改文件
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 420 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicFileList.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31SongPlay.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1324,7 +1324,7 @@
                       function.SetAttrState("on_off", status);
                        Dictionary<string, string> dic = new Dictionary<string, string>();
                        dic.Add("on_off", status);
                        Music.SendMethod.mMethod.SendControlCommand(function, dic);
                        Music.SendMethod.Current.SendControlCommand(function, dic);
                    };
                }
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
@@ -219,7 +219,7 @@
                                    m.functionMusic.SetAttrState("on_off", "off");
                                    Dictionary<string, string> dic = new Dictionary<string, string>();
                                    dic.Add("on_off", "off");
                                    Music.SendMethod.mMethod.SendControlCommand(m.functionMusic, dic);
                                    Music.SendMethod.Current.SendControlCommand(m.functionMusic, dic);
                                }
                            }
                        })
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -359,7 +359,7 @@
                a31player.SetAttrState("song_step", "up");
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add("song_step", "up");
                SendMethod.mMethod.SendControlCommand(a31player, dic);
                SendMethod.Current.SendControlCommand(a31player, dic);
            };
            btnPrev.MouseUpEventHandler = (sender, e) =>
            {
@@ -382,7 +382,7 @@
                a31player.SetAttrState("on_off", status);
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add("on_off", status);
                SendMethod.mMethod.SendControlCommand(a31player, dic);
                SendMethod.Current.SendControlCommand(a31player, dic);
            };
            ///下一曲点击事件
            btnNext.MouseDownEventHandler = (sender, e) =>
@@ -391,7 +391,7 @@
                a31player.SetAttrState("song_step", "down");
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add("song_step", "down");
                SendMethod.mMethod.SendControlCommand(a31player, dic);
                SendMethod.Current.SendControlCommand(a31player, dic);
            };
            btnNext.MouseUpEventHandler = (sender, e) =>
            {
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -585,13 +585,13 @@
                        }
                        if (intValue == 1)
                        {
                            //跌倒报警
                            view2.frameLayout.Visible = false;
                        }
                        else if (intValue == 2)
                        {
                            //有人报警
                            view2.frameLayout.Y = Application.GetRealHeight(0);
                        }
                        if (edit)
@@ -995,7 +995,7 @@
               });
        }
        /// <summary>
        ///
        /// 可视对讲专用
        /// </summary>
        /// <param name="frame">当前界面</param>
        /// <param name="device">当前设备</param>
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -48,6 +48,7 @@
                {
                    case "1":
                        {
                            inputView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png";
                            foreach (var dic in dicList)
                            {
@@ -129,12 +130,8 @@
                    case "2":
                        {
                            inputView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png";
                            foreach (var dic in dicList)
                            {
                                string value = dic["value"];
                                inputView.btnText.Text = Language.StringByID(StringId.timeHorizon) + ": " + value;
                            }
                            string value= this.GetKeyValue("timesection", dicList);
                            inputView.btnText.Text = Language.StringByID(StringId.timeHorizon) + ": " + value;
                        }
                        break;
                    case "3":
@@ -175,91 +172,56 @@
                                case SPK.PanelSocket:
                                case SPK.ElectricSocket:
                                    {//开关灯
                                        foreach (var dic in dicList)
                                        string value = this.GetKeyValue("on_off", dicList);
                                        inputView.btnState.Text = Language.StringByID(StringId.offLogic);
                                        if (value == "on")
                                        {
                                            string value = dic["value"];
                                            if (value == "on")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.onLogic);
                                            }
                                            else
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.offLogic);
                                            }
                                            inputView.btnState.Text = Language.StringByID(StringId.onLogic);
                                        }
                                    }
                                    break;
                                //传感器
                                case SPK.SensorHelp:
                                    {
                                        foreach (var dic in dicList)
                                        string value = this.GetKeyValue("alarm_status", dicList);
                                        inputView.btnState.Text = Language.StringByID(StringId.zhengchang);
                                        if (value == "alarm")
                                        {
                                            string value = dic["value"];
                                            if (value == "alarm")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.qiujiu);
                                            }
                                            else
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.zhengchang);
                                            }
                                            inputView.btnState.Text = Language.StringByID(StringId.qiujiu);
                                        }
                                    }
                                    break;
                                case SPK.SensorSmoke:
                                case SPK.SensorGas:
                                    {
                                        foreach (var dic in dicList)
                                        string value = this.GetKeyValue("alarm_status", dicList);
                                        inputView.btnState.Text = Language.StringByID(StringId.wuxieluo);
                                        if (value == "alarm")
                                        {
                                            string value = dic["value"];
                                            if (value == "alarm")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.xieluo);
                                            inputView.btnState.Text = Language.StringByID(StringId.xieluo);
                                            }
                                            else
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.wuxieluo);
                                            }
                                        }
                                    }
                                    break;
                                case SPK.SensorWater:
                                    {
                                        foreach (var dic in dicList)
                                        string value = this.GetKeyValue("alarm_status", dicList);
                                        inputView.btnState.Text = Language.StringByID(StringId.wuluoshui);
                                        if (value == "alarm")
                                        {
                                            string value = dic["value"];
                                            if (value == "alarm")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.luoshui);
                                            }
                                            else
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.wuluoshui);
                                            }
                                            inputView.btnState.Text = Language.StringByID(StringId.luoshui);
                                        }
                                    }
                                    break;
                                case SPK.SensorDryContact:
                                case SPK.SensorDryContact2:
                                    {
                                        foreach (var dic in dicList)
                                        string value = this.GetKeyValue("on_off", dicList);
                                        inputView.btnState.Text = Language.StringByID(StringId.offLogic);
                                        if (value == "on")
                                        {
                                            string value = dic["value"];
                                            if (value == "on")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.onLogic);
                                            }
                                            else
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.offLogic);
                                            }
                                            inputView.btnState.Text = Language.StringByID(StringId.onLogic);
                                        }
                                    }
                                    break;
@@ -267,77 +229,52 @@
                                case SPK.SensorDuiShe:
                                case SPK.SensorPir:
                                    {
                                        foreach (var dic in dicList)
                                        string value = this.GetKeyValue("people_status", dicList);
                                        inputView.btnState.Text = Language.StringByID(StringId.wuren);
                                        if (value == "true")
                                        {
                                            inputView.btnState.Text = Language.StringByID(StringId.youren);
                                            string value = dic["value"];
                                            if (value == "true")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.youren);
                                            }
                                            else
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.wuren);
                                            }
                                        }
                                    }
                                    break;
                                case SPK.SensorDoorWindow:
                                    {
                                        foreach (var dic in dicList)
                                        string value = this.GetKeyValue("contact_status", dicList);
                                        inputView.btnState.Text = Language.StringByID(StringId.bihe);
                                        if (value == "open")
                                        {
                                            string value = dic["value"];
                                            if (value == "open")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.kaiqi);
                                            }
                                            else
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.bihe);
                                            }
                                            inputView.btnState.Text = Language.StringByID(StringId.kaiqi);
                                        }
                                    }
                                    break;
                                case SPK.SensorUtrasonic:
                                    {
                                        string key = this.GetKey(dicList);
                                        string value = this.GetValue(dicList);
                                        string str = "";
                                        foreach (var dic in dicList)
                                        switch (key)
                                        {
                                            string value = dic["value"];
                                            switch (dic["key"])
                                            {
                                                case "status":
                                                case "people_status":
                                            case "status":
                                            case "people_status":
                                                {
                                                    str = Language.StringByID(StringId.wuren);
                                                    if (value == "true")
                                                    {
                                                        if (value == "true")
                                                        {
                                                            str = Language.StringByID(StringId.youren);
                                                        }
                                                        else
                                                        {
                                                            str = Language.StringByID(StringId.wuren);
                                                        }
                                                        str = Language.StringByID(StringId.youren);
                                                    }
                                                    break;
                                                case "dismantle":
                                                }
                                                break;
                                            case "dismantle":
                                                {
                                                    str = Language.StringByID(StringId.buzaixian);
                                                    if (value == "true")
                                                    {
                                                        if (value == "true")
                                                        {
                                                            str = Language.StringByID(StringId.zaixian);
                                                        }
                                                        else
                                                        {
                                                            str = Language.StringByID(StringId.buzaixian);
                                                        }
                                                        str = Language.StringByID(StringId.zaixian);
                                                    }
                                                    break;
                                            }
                                                }
                                                break;
                                        }
                                        inputView.btnState.Text = str;
@@ -345,50 +282,31 @@
                                    break;
                                case SPK.SenesorMegahealth:
                                    {
                                        foreach (var dic in dicList)
                                        string key = this.GetKey(dicList);
                                        string value = this.GetValue(dicList);
                                        if (key == "people_status")
                                        {
                                            string value = dic["value"];
                                            switch (dic["key"])
                                            inputView.btnState.Text = Language.StringByID(StringId.wuren);
                                            if (value == "true")
                                            {
                                                case "people_status":
                                                    {
                                                        if (value == "true")
                                                        {
                                                            inputView.btnState.Text = Language.StringByID(StringId.youren);
                                                        }
                                                        else
                                                        {
                                                            inputView.btnState.Text = Language.StringByID(StringId.wuren);
                                                        }
                                                    }
                                                    break;
                                                case "target_status":
                                                    {
                                                        if (value == "4")
                                                        {
                                                            inputView.btnState.Text = Language.StringByID(StringId.shi);
                                                        }
                                                    }
                                                    break;
                                                inputView.btnState.Text = Language.StringByID(StringId.youren);
                                            }
                                        }
                                        else if (key == "target_status")
                                        {
                                            if (value == "4")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.shi);
                                            }
                                        }
                                    }
                                    break;
                                case SPK.SenesorMegahealth2:
                                    {
                                        foreach (var dic in dicList)
                                        {
                                            string value = dic["value"];
                                            if (value == "fall")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.diedao);
                                            }
                                            else
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.wuren);
                                            }
                                        string value = this.GetValue(dicList);
                                        inputView.btnState.Text = Language.StringByID(StringId.wuren);
                                        if (value == "fall") {
                                            inputView.btnState.Text = Language.StringByID(StringId.diedao);
                                        }
                                    }
                                    break;
@@ -456,7 +374,7 @@
                                case SPK.SensorTemperature:
                                    {
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList, "temperature");
                                        string str =this.GetText(dicList, "temperature");
                                        inputView.btnState.Text = str;
                                    }
                                    break;
@@ -472,26 +390,17 @@
                                case SPK.SensorTVOC:
                                case SPK.SensorHcho:
                                    {
                                        string strvalue = "";
                                        foreach (var dic in dicList)
                                        {
                                            strvalue = dic["value"];
                                            break;
                                        }
                                        string str = new PublicInterface().GetSensorLevelText(device, strvalue, true);
                                        string value = this.GetValue(dicList);
                                        string str = new PublicInterface().GetSensorLevelText(device, value, true);
                                        inputView.btnState.Text = str;
                                    }
                                    break;
                                case SPK.DoorLock:
                                    {
                                        foreach (var dic in dicList)
                                        string value = this.GetValue(dicList);
                                        if (value == "open")
                                        {
                                            string value = dic["value"];
                                            if (value == "open")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.kaiqi);
                                            }
                                            inputView.btnState.Text = Language.StringByID(StringId.kaiqi);
                                        }
                                    }
                                    break;
@@ -503,19 +412,9 @@
                                        }
                                        else
                                        {
                                            foreach (var dic in dicList)
                                            {
                                                string key = dic["key"];
                                                if (key == "user_id")
                                                {
                                                    string userId = dic["value"];
                                                    var FaceItem = this.FaceItem(userId, device.deviceId);
                                                    inputView.btnState.Text = FaceItem.userName;
                                                    // Language.StringByID(StringId.kaiqi);
                                                }
                                            }
                                            string userId = this.GetKeyValue("user_id",dicList);
                                            var FaceItem = this.GetFaceItem(userId, device.deviceId);
                                            inputView.btnState.Text = FaceItem.userName;
                                        }
                                    }
                                    break;
@@ -639,26 +538,18 @@
                    case "8":
                        {
                            inputView.btnIcon.UnSelectedImagePath = "LogicIcon/location.png";
                            foreach (var dic in dicList)
                            string value = this.GetValue(dicList);
                            if (value == "arrive")
                            {
                                string strtext = "";
                                string value = dic["value"];
                                switch (value)
                                {
                                    case "arrive":
                                        {
                                            strtext = Language.StringByID(StringId.daoda);
                                        }
                                        break;
                                    case "leave":
                                        {
                                            strtext = Language.StringByID(StringId.likai);
                                        }
                                        break;
                                }
                                inputView.btnText.TextID = StringId.likiadaoda;
                                inputView.btnState.Text = strtext;
                                value = Language.StringByID(StringId.daoda);
                            }
                            else if (value == "leave")
                            {
                                value = Language.StringByID(StringId.likai);
                            }
                            inputView.btnText.TextID = StringId.likiadaoda;
                            inputView.btnState.Text = value;
                        }
                        break;
                    case "10":
@@ -775,8 +666,6 @@
                                || device.spk == SPK.SensorEnvironment3
                                )
                                {
                                    //这个设备比较特殊
                                    ConditionDeviceFunList conditionDeviceFunList = new ConditionDeviceFunList();
                                    ///当前的索引值数据对象
                                    Input inputedit = Logic.currlogic.input[indexVulae];
                                    ///状态值
@@ -800,7 +689,7 @@
                                                    {
                                                        titleInt = StringId.wendudiyu;
                                                    }
                                                    conditionDeviceFunList.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                                                    ConditionDeviceFunList.Current.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "humidity":
@@ -814,27 +703,27 @@
                                                    {
                                                        titleInt = StringId.shidudiyu;
                                                    }
                                                    conditionDeviceFunList.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                                                    ConditionDeviceFunList.Current.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "co2":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "co2", StringId.co2, indexVulae, true, stateValue);
                                                    ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "co2", StringId.co2, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "pm25":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue);
                                                    ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "tvoc":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "tvoc", StringId.tvoc, indexVulae, true, stateValue);
                                                    ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "tvoc", StringId.tvoc, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "hcho":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "hcho", StringId.Formaldehyde, indexVulae, true, stateValue);
                                                    ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "hcho", StringId.Formaldehyde, indexVulae, true, stateValue);
                                                }
                                                break;
                                        }
@@ -844,37 +733,37 @@
                                else if (device.spk == SPK.SensorTemperature)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "temperature", indexVulae);
                                   this.SensorView(thisView, device, "temperature", indexVulae);
                                }
                                else if (device.spk == SPK.SensorHumidity)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "humidity", indexVulae);
                                    this.SensorView(thisView, device, "humidity", indexVulae);
                                }
                                else if (device.spk == SPK.SensorCO2)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "co2", indexVulae);
                                    this.SensorView(thisView, device, "co2", indexVulae);
                                }
                                else if (device.spk == SPK.SensorPm25)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "pm25", indexVulae);
                                    this.SensorView(thisView, device, "pm25", indexVulae);
                                }
                                else if (device.spk == SPK.SensorTVOC)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "tvoc", indexVulae);
                                    this.SensorView(thisView, device, "tvoc", indexVulae);
                                }
                                else if (device.spk == SPK.SensorHcho)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "hcho", indexVulae);
                                    this.SensorView(thisView, device, "hcho", indexVulae);
                                }
                                else
@@ -1442,11 +1331,11 @@
                if (outputTarget.target_type == "1" || outputTarget.target_type == "3")
                {
                    targetView.btnState.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                    targetView.btnState.Text = this.GetTimeText(outputTarget.delay) + stateStr;
                }
                else
                {
                    targetView.btnText.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                    targetView.btnText.Text = this.GetTimeText(outputTarget.delay) + stateStr;
                }
                //再次编辑条件状态点击事件
                targetView.btnClick.MouseUpEventHandler += (sen, e) =>
@@ -1503,20 +1392,18 @@
                //延时点击事件
                targetView.btnDelay.MouseUpEventHandler += (sen, e) =>
                {
                    InpOrOutLogicMethod inpOrOutLogicMethod = new InpOrOutLogicMethod();
                    inpOrOutLogicMethod.Delayed(thisView, outputTarget.delay, (value) =>
                    {
                        outputTarget.delay = value.ToString();
                        if (outputTarget.target_type == "1")
                        {
                            targetView.btnState.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                        }
                        else
                        {
                            targetView.btnText.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                        }
                    });
                    this.Delayed(thisView, outputTarget.delay, (value) =>
                     {
                         outputTarget.delay = value.ToString();
                         if (outputTarget.target_type == "1")
                         {
                             targetView.btnState.Text = this.GetTimeText(outputTarget.delay) + stateStr;
                         }
                         else
                         {
                             targetView.btnText.Text = this.GetTimeText(outputTarget.delay) + stateStr;
                         }
                     });
                };
                ///删除控件
@@ -2183,13 +2070,8 @@
                    break;
                case SPK.doorgate:
                    {
                        foreach (var dic in dicList)
                        {
                            if (dic["key"] == "user_id")
                            {
                                button2.Text = dic["value"]?.ToString();
                            }
                        }
                        string value = this.GetKeyValue("user_id", dicList);
                        button2.Text = this.GetFaceItem(value, device.deviceId).userName;
                    }
                    break;
            }
@@ -2214,6 +2096,32 @@
            }
            return valueStr;
        }
        /// <summary>
        /// 获取Key值
        /// </summary>
        /// <param name="dicList">注意:永远默认第一个元素</param>
        /// <returns></returns>
        public string GetKey(List<Dictionary<string, string>> dicList)
        {
            if (dicList.Count == 0)
            {
                return "";
            }
            return dicList[0]["key"].ToString();
        }
        /// <summary>
        /// 获取value值
        /// </summary>
        /// <param name="dicList">注意:永远默认第一个元素</param>
        /// <returns></returns>
        public string GetValue(List<Dictionary<string, string>> dicList)
        {
            if (dicList.Count == 0)
            {
                return "";
            }
            return dicList[0]["value"].ToString();
        }
        /// <summary>
        ///获取自动化名称
@@ -2277,19 +2185,12 @@
                                case SPK.AirSwitch:
                                case SPK.LightSwitch:
                                    {//开关灯
                                        foreach (var dic in dicList)
                                        string value = this.GetValue(dicList);
                                        stateStr = Language.StringByID(StringId.offLogic);
                                        if (value == "on")
                                        {
                                            string value = dic["value"];
                                            if (value == "on")
                                            {
                                                stateStr = Language.StringByID(StringId.onLogic);
                                            stateStr = Language.StringByID(StringId.onLogic);
                                            }
                                            else
                                            {
                                                stateStr = Language.StringByID(StringId.offLogic);
                                            }
                                        }
                                    }
                                    break;
@@ -2351,18 +2252,12 @@
                                case SPK.FloorHeatStandard:
                                case SPK.HvacFloorHeat:
                                    {
                                        foreach (var dic in dicList)
                                        string value = this.GetValue(dicList);
                                        stateStr = Language.StringByID(StringId.offLogic);
                                        if (value == "on")
                                        {
                                            string value = dic["value"];
                                            if (value == "on")
                                            {
                                                stateStr = Language.StringByID(StringId.onLogic);
                                            stateStr = Language.StringByID(StringId.onLogic);
                                            }
                                            else if (value == "off")
                                            {
                                                stateStr = Language.StringByID(StringId.offLogic);
                                            }
                                        }
                                    }
@@ -2567,7 +2462,6 @@
        private void SensorView(FrameLayout thisView, Function device, string key, int indexVulae)
        {
            //这个设备比较特殊
            ConditionDeviceFunList conditionDeviceFunList = new ConditionDeviceFunList();
            ///当前的索引值数据对象
            Input inputedit = Logic.currlogic.input[indexVulae];
            ///状态值
@@ -2590,7 +2484,7 @@
                            {
                                titleInt = StringId.wendudiyu;
                            }
                            conditionDeviceFunList.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                            ConditionDeviceFunList.Current.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                        }
                        break;
                    case "humidity":
@@ -2604,27 +2498,27 @@
                            {
                                titleInt = StringId.shidudiyu;
                            }
                            conditionDeviceFunList.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                            ConditionDeviceFunList.Current.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                        }
                        break;
                    case "co2":
                        {
                            conditionDeviceFunList.PmCo2TvocAction(thisView, device, "co2", StringId.co2, indexVulae, true, stateValue);
                            ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "co2", StringId.co2, indexVulae, true, stateValue);
                        }
                        break;
                    case "pm25":
                        {
                            conditionDeviceFunList.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue);
                            ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue);
                        }
                        break;
                    case "tvoc":
                        {
                            conditionDeviceFunList.PmCo2TvocAction(thisView, device, "tvoc", StringId.tvoc, indexVulae, true, stateValue);
                            ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "tvoc", StringId.tvoc, indexVulae, true, stateValue);
                        }
                        break;
                    case "hcho":
                        {
                            conditionDeviceFunList.PmCo2TvocAction(thisView, device, "hcho", StringId.Formaldehyde, indexVulae, true, stateValue);
                            ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "hcho", StringId.Formaldehyde, indexVulae, true, stateValue);
                        }
                        break;
                }
@@ -2634,8 +2528,8 @@
        /// 查找指定userId
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public Face FaceItem(string userId, string deviceId)
        /// <returns></returns>
        public Face GetFaceItem(string userId, string deviceId)
        {
            if (Send.Current.faceList.Count == 0)
            {
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -187,7 +187,7 @@
            var list2 = this.GetVideoDeviceList();
            list.AddRange(list1);
            list.AddRange(list2);
            //GetTestDevice(ref list, true);
            GetTestDevice(ref list, true);
            return list;
        }
        /// <summary>
@@ -1095,9 +1095,14 @@
            {
                //模拟设备
                var functions = new List<Function> {
                 new Entity.Function { sid = "1234567890", name = "超声波传感器", spk = Entity.SPK.SensorUtrasonic },
                  new Entity.Function { sid = "1234567891", name = "温度传感器", spk = Entity.SPK.SensorTemperature },
                   new Entity.Function { sid = "1234567892", name = "湿度传感器", spk = Entity.SPK.SensorHumidity },
                 //new Entity.Function { sid = "1234567890", name = "超声波传感器", spk = Entity.SPK.SensorUtrasonic },
                 // new Entity.Function { sid = "1234567891", name = "温度传感器", spk = Entity.SPK.SensorTemperature },
                 //  new Entity.Function { sid = "1234567892", name = "湿度传感器", spk = Entity.SPK.SensorHumidity },
                 //   new Entity.Function { sid = "1234567893", name = "红外对射传感器", spk = Entity.SPK.SensorDuiShe },
                 //     new Entity.Function { sid = "1234567895", name = "超声波传感器", spk = Entity.SPK.SensorUtrasonic },
                      new Entity.Function { sid = "1234567896", name = "毫米波传感器", spk = Entity.SPK.SenesorMegahealth },
                        new Entity.Function { sid = "1234567897", name = "毫米波传感器1", spk = Entity.SPK.SenesorMegahealth2 },
                       new Entity.Function { sid = "1234567899", name = "门磁传感器", spk = Entity.SPK.SensorDoorWindow },
            };
                foreach (var function in functions)
                {
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -67,13 +67,12 @@
                        logicView.btnSwitchIcon.IsSelected = false;
                        currLogic.enable = "false";
                    }
                    //Send.switchLogic(currLogic);
                    new System.Threading.Thread(() =>
                    {
                        try
                        {
                            //逻辑使能的命令
                            Send.Current.SwitchLogic(currLogic);
                            Send.Current.EnableLogic(currLogic);
                        }
                        catch { }
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -378,7 +378,7 @@
        /// <param name="logic">当前对象</param>
        /// <param name="isTip">是否要提示</param>
        /// <returns></returns>
        public ResponsePackNew SwitchLogic(Logic logic,bool isTip=false)
        public ResponsePackNew EnableLogic(Logic logic,bool isTip=false)
        {
            var jArray = new JArray { };
            var job = new JObject { { "userLogicId", logic.userLogicId }, { "enable", logic.enable } };
@@ -389,14 +389,14 @@
            if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
            {
                RefreshToken();
                SwitchLogic(logic, isTip);
                EnableLogic(logic, isTip);
            }
            if (Check(responsePackNew, isTip) == false)
            {
                return null;
            }
            return responsePackNew;
        }
        }
        /// <summary> 
        /// 自动化地理围栏状态上报
        /// </summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -522,7 +522,7 @@
                                {
                                    //HDL_ON.DriverLayer.Control.Ins.GetMusicDirectory(device);
                                    //var palyListName = Music.SendMethod.mMethod.GetListName(device); 
                                    var palyList= Music.SendMethod.mMethod.GetListMusic(device, "hdl_special");
                                    var palyList= Music.SendMethod.Current.GetListMusic(device, "hdl_special");
                                    List<string> musicNameList = new List<string>();
                                    for (int i = 0; i < palyList.songs.Count; i++)
                                    {
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicFileList.cs
@@ -37,7 +37,7 @@
                {
                    try
                    {
                        SendMethod.mMethod.GetPalyList(A31MusicModel.Current.functionMusic);
                        SendMethod.Current.GetPalyList(A31MusicModel.Current.functionMusic);
                    }
                    catch { }
                    finally
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs
@@ -158,7 +158,7 @@
                    {
                        if (A31MusicModel.Current.palyLists.Count == 0)
                        {
                           SendMethod.mMethod.GetPalyList(A31MusicModel.Current.functionMusic);
                           SendMethod.Current.GetPalyList(A31MusicModel.Current.functionMusic);
                           
                        }
                    }
@@ -189,7 +189,7 @@
                    {
                        try
                        {
                            SendMethod.mMethod.EditDeviceName(A31MusicModel.Current.functionMusic.deviceId,playerName);
                            SendMethod.Current.EditDeviceName(A31MusicModel.Current.functionMusic.deviceId,playerName);
                        }
                        catch { }
@@ -242,8 +242,8 @@
                    {
                        //HDL_ON.DriverLayer.Control.Ins.GetMusicDirectory(device);
                        var palyListName = Music.SendMethod.mMethod.GetListName(A31MusicModel.Current.functionMusic);
                        var palyList = Music.SendMethod.mMethod.GetListMusic(A31MusicModel.Current.functionMusic, "hdl_special");
                        var palyListName = Music.SendMethod.Current.GetListName(A31MusicModel.Current.functionMusic);
                        var palyList = Music.SendMethod.Current.GetListMusic(A31MusicModel.Current.functionMusic, "hdl_special");
                        List<string> musicNameList = new List<string>();
                        for (int i = 0; i < palyList.songs.Count; i++)
                        {
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -145,7 +145,7 @@
                 Dictionary<string, string> dic = new Dictionary<string, string>();
                 dic.Add(KeyProperty.mode, modeValueString);
                 //发送控制指令
                 SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                 SendMethod.Current.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
             };
            ///添加喜爱点击事件;
            playView.loveBtn.MouseUpEventHandler += (sender, e) =>
@@ -192,7 +192,7 @@
                            A31MusicModel.Current.palyLists.Clear();
                            if (A31MusicModel.Current.palyLists.Count == 0)
                            {
                                SendMethod.mMethod.GetPalyList(A31MusicModel.Current.functionMusic);
                                SendMethod.Current.GetPalyList(A31MusicModel.Current.functionMusic);
                            }
                        }
@@ -249,7 +249,7 @@
                    A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.volume, startVolume);
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    dic.Add(KeyProperty.volume, startVolume.ToString());
                    SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                    SendMethod.Current.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                }
            };
@@ -263,7 +263,7 @@
                A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.song_step, ValueProperty.down);
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add(KeyProperty.song_step, ValueProperty.up);
                SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                SendMethod.Current.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
            };
            playView.prevBtn.MouseUpEventHandler += (sender, e) =>
@@ -288,7 +288,7 @@
                A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.on_off, status);
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add(KeyProperty.on_off, status);
                SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                SendMethod.Current.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
            };
            ///下一曲点击事件
            playView.nextBtn.MouseDownEventHandler += (sender, e) =>
@@ -297,7 +297,7 @@
                A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.song_step, ValueProperty.down);
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add(KeyProperty.song_step, ValueProperty.down);
                SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                SendMethod.Current.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
            };
            playView.nextBtn.MouseUpEventHandler += (sender, e) =>
            {
@@ -614,7 +614,7 @@
                        if (A31MusicModel.Current.palyLists.Count == 0)
                        {
                            //获取歌曲列表
                            SendMethod.mMethod.GetPalyList(A31MusicModel.Current.functionMusic);
                            SendMethod.Current.GetPalyList(A31MusicModel.Current.functionMusic);
                        }
                    }
HDL_ON/UI/UI2/FuntionControlView/Music/A31SongPlay.cs
@@ -78,7 +78,7 @@
                            Dictionary<string, string> dic = new Dictionary<string, string>();
                            dic.Add("song_name", songView.songBtn.Text);
                            dic.Add("playlist_name", listName);
                            SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                            SendMethod.Current.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                        });
                    });
                };
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -10,16 +10,16 @@
{
    public class MusicMain : FrameLayout
    {
        private static MusicMain m_MusicMain = null;
        public static MusicMain mMusicMain
        private static MusicMain s_Current = null;
        public static MusicMain Current
        {
            get
            {
                if (m_MusicMain == null)
                if (s_Current == null)
                {
                    m_MusicMain = new MusicMain();
                    s_Current = new MusicMain();
                }
                return m_MusicMain;
                return s_Current;
            }
        }
@@ -36,7 +36,7 @@
        public override void RemoveFromParent()
        {
            base.RemoveFromParent();
            clearA31Threads();
            ClearA31Threads();
            //进来没有音乐被收藏过,退出有音乐被收藏过
            //A31MusicModel.ReadMusicStates();
        }
@@ -47,7 +47,7 @@
        /// <summary>
        /// 移除线程
        /// </summary>
        static void clearA31Threads()
        static void ClearA31Threads()
        {
            var threads = threadLists.FindAll((obj) => { return obj.Name == "A31"; });
@@ -119,10 +119,10 @@
            {
                verticalRefresh.RemoveAll();
                A31MusicModel.A31MusicModelList.Clear();
                var musicListFunction = FunctionList.List.GetMusicList();
                for (int i = 0; i < musicListFunction.Count; i++)
                var musicDeviceList= FunctionList.List.GetMusicList();
                for (int i = 0; i < musicDeviceList.Count; i++)
                {
                    var function = musicListFunction[i];
                    var function = musicDeviceList[i];
                    var music = A31MusicModel.A31MusicModelList.Find((obj) =>
                   (obj.functionMusic.deviceId == function.deviceId && function.spk == SPK.MusicStandard) || (
                     obj.functionMusic.deviceId == function.deviceId && function.spk == SPK.AvMusic)
@@ -168,7 +168,7 @@
                        try
                        {
                            
                            SendMethod.mMethod.RefreshDeviceStatus(new List<string> { a31player.functionMusic.deviceId });
                            SendMethod.Current.RefreshDeviceStatus(new List<string> { a31player.functionMusic.deviceId });
                            System.Threading.Thread.Sleep(500);
                        }
                        catch { }
@@ -233,7 +233,7 @@
                player.functionMusic.SetAttrState(KeyProperty.song_step, ValueProperty.up);
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add(KeyProperty.song_step, ValueProperty.up);
                SendMethod.mMethod.SendControlCommand(player.functionMusic, dic);
                SendMethod.Current.SendControlCommand(player.functionMusic, dic);
            };
            musicView.prevBtn.MouseUpEventHandler += (sender, e) =>
            {
@@ -256,7 +256,7 @@
                player.functionMusic.SetAttrState(KeyProperty.on_off, status);
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add(KeyProperty.on_off, status);
                SendMethod.mMethod.SendControlCommand(player.functionMusic, dic);
                SendMethod.Current.SendControlCommand(player.functionMusic, dic);
            };
            ///下一曲点击事件
            musicView.nextBtn.MouseDownEventHandler += (sender, e) =>
@@ -265,7 +265,7 @@
                player.functionMusic.SetAttrState(KeyProperty.song_step, ValueProperty.down);
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add(KeyProperty.song_step, ValueProperty.down);
                SendMethod.mMethod.SendControlCommand(player.functionMusic, dic);
                SendMethod.Current.SendControlCommand(player.functionMusic, dic);
            };
            musicView.nextBtn.MouseUpEventHandler += (sender, e) =>
            {
@@ -282,7 +282,7 @@
                        continue;
                    }
                    //SendMethod.ReadStatus(player);
                    SendMethod.mMethod.GetDeviceStatus(ref player, new List<string> { player.functionMusic.deviceId }, player.functionMusic.sid);
                    SendMethod.Current.GetDeviceStatus(ref player, new List<string> { player.functionMusic.deviceId }, player.functionMusic.sid);
                    System.Threading.Thread.Sleep(1000);
                    Application.RunOnMainThread(() =>
                    {
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -12,16 +12,16 @@
{
    public class SendMethod
    {
        private static SendMethod sMethod = null;
        public static SendMethod mMethod
        private static SendMethod s_Current= null;
        public static SendMethod Current
        {
            get
            {
                if (sMethod == null)
                if (s_Current == null)
                {
                    sMethod = new SendMethod();
                    s_Current = new SendMethod();
                }
                return sMethod;
                return s_Current;
            }
        }