wjc
2022-06-13 32ad85a377b00bc54ad7f15a45d7631d3e2b10d5
2022年06月13日17:39:46

毫米传感器(自研)
自动化输入条件完成;(没发联调,网关还没有搞好。)
7个文件已修改
166 ■■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -1048,6 +1048,9 @@
7156=Distress
7157=whether to unlock
7158=is
7159=Fall in the alarm
7160=Someone called the police
@@ -2191,6 +2194,8 @@
7156=求救
7157=是否开锁时
7158=是
7159=跌倒报警
7160=有人报警
 
HDL-ON_iOS/Resources/Language.ini
@@ -1047,6 +1047,8 @@
7156=Distress
7157=whether to unlock
7158=is
7159=Fall in the alarm
7160=Someone called the police
@@ -2189,6 +2191,8 @@
7156=求救
7157=是否开锁时
7158=是
7159=跌倒报警
7160=有人报警
 
HDL_ON/Common/R.cs
@@ -2775,6 +2775,14 @@
        /// 是
        /// </summary>
        public const int shi = 7158;
        /// <summary>
        /// 跌倒报警
        /// </summary>
        public const int diedaobaojing = 7159;
        /// <summary>
        /// 有人报警
        /// </summary>
        public const int yourenbaojing = 7160;
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -24,10 +24,20 @@
        /// 定义一个变量,记录选中状态
        /// </summary>
        private string selectedState = "unknown";
        /// <summary>
        /// 是不是再次编辑
        /// </summary>
        private bool mEdit;
        /// <summary>
        /// 输入条件列表索引值
        /// </summary>
        private int mIndex;
        public void Show(Entity.Function device, int index, bool edit)
        {
            this.function = device;
            this.mEdit = edit;
            this.mIndex = index;
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            LogicView.TopView topView = new LogicView.TopView();
@@ -217,8 +227,36 @@
                        }
                    }
                    break;
                //毫米波传感器
                //毫米波传感器(自研北邮)
                case SPK.SenesorMegahealth:
                    {
                        LogicView.FunTypeView view1= new LogicView.FunTypeView();
                        view1.btnText.TextID = StringId.diedaobaojing;
                        view1.btnState.Name = Language.StringByID(StringId.diedaobaojing);
                        fLayout.AddChidren(view1.FLayoutView());
                        view1.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            DeviceView(device, view1.btnState, StringId.shi, StringId.offLogic, 1);
                        };
                        LogicView.FunTypeView view2 = new LogicView.FunTypeView();
                        view2.frameLayout.Y = view1.frameLayout.Bottom;
                        view2.btnText.TextID = StringId.yourenbaojing;
                        view2.btnState.Name = Language.StringByID(StringId.yourenbaojing);
                        fLayout.AddChidren(view2.FLayoutView());
                        view2.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            DeviceView(device, view2.btnState, StringId.shi, StringId.offLogic, 1);
                        };
                        if (edit)
                        {
                            GetEditState(device, index, view1.btnState, view2.btnState, null, null);
                        }
                    }
                    break;
                //毫米波传感器(兆观专用云云对接)
                case SPK.SenesorMegahealth2:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -550,6 +588,23 @@
                        }
                        break;
                    case SPK.SenesorMegahealth:
                        {
                            if (button != null)
                            {
                                if (button.Name == Language.StringByID(StringId.yourenbaojing))
                                {
                                    keyVlaue = "people_status";
                                }
                                else
                                {
                                    keyVlaue = "target_status";
                                }
                            }
                        }
                        break;
                    case SPK.SenesorMegahealth2:
                        {
                            keyVlaue = "action_state";
@@ -608,6 +663,25 @@
                        }
                        break;
                    case StringId.shi:
                        {
                            value = "open";
                            if (button != null)
                            {
                                if (button.Name == Language.StringByID(StringId.yourenbaojing))
                                {
                                    //状态(有人)
                                    value = "true";
                                }
                                else if(button.Name == Language.StringByID(StringId.diedaobaojing))
                                {
                                    //跌倒
                                    value = "4";
                                }
                            }
                        }
                        break;
                    case StringId.kaiqi:
                        {
                            value = "open";
@@ -639,6 +713,17 @@
                button.TextID = intValue;
                selectedState = device.spk + "_" + value;
                AddDictionary(keyVlaue, value, "string");
                if (button != null)
                {
                    if (button.Name == Language.StringByID(StringId.yourenbaojing)
                    || (button.Name == Language.StringByID(StringId.diedaobaojing)))
                    {
                        //只有毫米波传感器(自研)
                        Save(device, mIndex, mEdit);
                    }
                }
            });
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -328,6 +328,33 @@
                                    }
                                    break;
                                case SPK.SenesorMegahealth:
                                    {
                                        foreach (var dic in dicList)
                                        {
                                            string value = dic["value"];
                                            switch (dic["key"])
                                            {
                                                case "people_status":
                                                    {
                                                        if (value == "true")
                                                        {
                                                            inputView.btnState.Text = Language.StringByID(StringId.shi);
                                                        }
                                                    }
                                                    break;
                                                case "target_status":
                                                    {
                                                        if (value == "4")
                                                        {
                                                            inputView.btnState.Text = Language.StringByID(StringId.shi);
                                                        }
                                                    }
                                                    break;
                                            }
                                        }
                                    }break;
                                case SPK.SenesorMegahealth2:
                                    {
                                        foreach (var dic in dicList)
@@ -1968,6 +1995,34 @@
                    }
                    break;
                case SPK.SenesorMegahealth:
                    {
                        foreach (var dic in dicList)
                        {
                            string value = dic["value"];
                            switch (dic["key"])
                            {
                                case "people_status":
                                    {
                                        if (value == "true")
                                        {
                                            button1.Text = Language.StringByID(StringId.shi);
                                        }
                                    }
                                    break;
                                case "target_status":
                                    {
                                        if (value == "4")
                                        {
                                            button2.Text = Language.StringByID(StringId.shi);
                                        }
                                    }
                                    break;
                            }
                        }
                    }
                    break;
                case SPK.SenesorMegahealth2:
                    {
                        foreach (var dic in dicList)
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -78,6 +78,7 @@
      ResponsePackNew responsePackNew = null;
      try
      {
        var cycleJObject = new JObject { };
        var cyclevaluejArray = new JArray { };
        cycleJObject.Add("type", logic.cycle.type);
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -291,9 +291,11 @@
        /// <returns></returns>
        public static ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 20)
        {
            MainPage.Log("请求数据=="+o.ToString());
            MainPage.Log("红外宝请求数据:"+api_Url+"\r\n"+o.ToString());
            var requestJson = HttpUtil.GetSignRequestJson(o);
            return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);
            var responsePackNew=  HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);
            MainPage.Log("回复红外宝请求数据:" + "\r\n"+ Newtonsoft.Json.JsonConvert.SerializeObject(responsePackNew));
            return responsePackNew;
        }
        /// <summary>