wxr
2021-06-09 cb6e11c5067ecaba4d8f9907989154167c1e8943
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
File was renamed from HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
@@ -6,7 +6,7 @@
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class Method
    public class PirMethod
    {
        /// <summary>
@@ -79,22 +79,22 @@
        {
            View.TipView tipView = new View.TipView();
            tipView.InputBox(frameLayout, "", (name, frame) =>
             {
                 if (Pir.currPir != null && Pir.currPir.FunctioList.Count < 10)
                 {
                     Control control = new Control();
                     control.name = name;
                     control.type = "learn";
                     control.spk = "ir.learn";
                     control.deviceId = Pir.currPir.deviceId;
                     ThreadAddControl(control, frame, action);
                 }
                 else
                 {
                     View.TipView tt = new View.TipView();
                     tt.TipBox(StringId.tip, StringId.bunengchaoguo10);
                 }
             }, false);
            {
                if (Pir.currPir != null && Pir.currPir.FunctioList.Count < 10)
                {
                    Control control = new Control();
                    control.name = name;
                    control.type = "learn";
                    control.spk = "ir.learn";
                    control.deviceId = Pir.currPir.deviceId;
                    ThreadAddControl(control, frame, action);
                }
                else
                {
                    View.TipView tt = new View.TipView();
                    tt.TipBox(StringId.tip, StringId.bunengchaoguo10);
                }
            }, false);
        }
        /// <summary>
@@ -223,7 +223,7 @@
                                {
                                    if (null == PirDevice.Pir.pirDeviceList.Find((c) => c.deviceId == pirJosn.deviceId))
                                    {
                                    {
                                        PirDevice.Pir.pirDeviceList.Add(pirJosn);
                                    }
                                }
@@ -252,7 +252,7 @@
                            else
                            {
                                loading.Hide();
                                Method method = new Method();
                                PirMethod method = new PirMethod();
                                method.ErrorShow(null, "读取红外宝列表失败");
                            }
                        }
@@ -329,24 +329,24 @@
        public static void GetControlList(FrameLayout frame, Action action, Pir pirDevice)
        {
            ThreadSend(new Control { deviceId = pirDevice.deviceId }, (responsePackNew) =>
             {
                 var jArray = JArray.Parse(responsePackNew.Data.ToString());
                 for (int a = 0; a < jArray.Count; a++)
                 {
                     var jay = jArray[a];
                     //数据返序列化为Logic对象
                     var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
                     var pirJosn = Newtonsoft.Json.JsonConvert.DeserializeObject<Entity.Function>(str);
                     if (pirJosn != null)
                     {
                         if (null == pirDevice.FunctioList.Find((c) => c.deviceId == pirJosn.deviceId))
                         {
                             pirDevice.FunctioList.Add(pirJosn);
                         }
                     }
                 }
                 action();
             }, "获取遥控器列表", "frame", frame, null);
            {
                var jArray = JArray.Parse(responsePackNew.Data.ToString());
                for (int a = 0; a < jArray.Count; a++)
                {
                    var jay = jArray[a];
                    //数据返序列化为Logic对象
                    var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
                    var pirJosn = Newtonsoft.Json.JsonConvert.DeserializeObject<Entity.Function>(str);
                    if (pirJosn != null)
                    {
                        if (null == pirDevice.FunctioList.Find((c) => c.deviceId == pirJosn.deviceId))
                        {
                            pirDevice.FunctioList.Add(pirJosn);
                        }
                    }
                }
                action();
            }, "获取遥控器列表", "frame", frame, null);
        }
        /// <summary>
@@ -373,7 +373,7 @@
        /// <param name="frame">log父控件</param>
        /// <param name="dialog">log父控件</param>
        /// <param name="attributesStatus">学习按键</param>
        public static void ThreadSend(Control control, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, Entity.AttributesStatus attributesStatus=null)
        public static void ThreadSend(Control control, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, Entity.AttributesStatus attributesStatus = null)
        {
            //加载log
@@ -434,7 +434,7 @@
                        }
                        else
                        {
                            Method method = new Method();
                            PirMethod method = new PirMethod();
                            //自定义错误提示文本
                            string eorroText = "";
                            if (str == "删除")
@@ -565,6 +565,26 @@
                            }
                            break;
                        case "14002":
                            {
                                str = Language.StringByID(StringId.bucunzaichanpin);
                            }
                            break;
                        case "10805":
                            {
                                str = Language.StringByID(StringId.shebeibucunzai);
                            }
                            break;
                        case "14006":
                            {
                                str = Language.StringByID(StringId.shebeibuzaixian);
                            }
                            break;
                        case "9":
                            {
                                str = Language.StringByID(StringId.wangguanshebeibuzaixian);
                            }
                            break;
                        case "2":
                            {
                                str = Language.StringByID(StringId.xitongweihuzhong);
@@ -671,13 +691,10 @@
        public string id = "";
        public List<Objects> objects = new List<Objects>();
        public string time_stamp = string.Empty;
    }
    [Serializable]
    public class Objects
    {
        public string sid = string.Empty;
        public string spk = string.Empty;
        public List<Attributes> attributes = new List<Attributes>();