陈嘉乐
2021-03-11 e8b9a8ec533094c6e3f262f64a73810f768a59ff
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
@@ -190,8 +190,6 @@
                            }
                        }
                        //GetControlList(frame, action);
                       // GetControlList();
                    }
                }
@@ -200,20 +198,22 @@
                {
                    Application.RunOnMainThread(() =>
                    {
                        loading.Hide();
                       // action();
                        try
                        {
                            if (Pir.pirDeviceList.Count != 0)
                            {
                                GetControlList1(frame, action);
                                var list = Pir.pirDeviceList;
                                GetControlList(() =>
                                {
                                    loading.Hide();
                                    action();
                                });
                            }
                            else
                            {
                                //Method method = new Method();
                                //method.ErrorShow(responsePackNew);
                                loading.Hide();
                                Method method = new Method();
                                method.ErrorShow(null,"读取红外宝列表失败");
                            }
                        }
                        catch { }
@@ -228,12 +228,13 @@
        /// <summary>
        /// 获取遥控器列表
        /// </summary>
        public static void GetControlList()
        public static void GetControlList(Action actio)
        {
            new System.Threading.Thread(() =>
            {
                try
                {
                for (int i = 0; i < Pir.pirDeviceList.Count; i++)
                {
                    var pirDevice = Pir.pirDeviceList[i];
@@ -264,7 +265,16 @@
                    catch { }
                }
                }
                catch { }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        actio();
                    });
                }
            })
            { IsBackground = true }.Start();
@@ -426,11 +436,14 @@
        /// </summary>
        /// <param name="responsePackNew"></param>
        /// <param name="str"></param>
        public void ErrorShow(ResponsePackNew responsePackNew, string str = "")
        public void ErrorShow(ResponsePackNew responsePackNew=null, string str = "")
        {
            if (str == "删除遥控器")
            {
                new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail));
            } else if (str == "读取红外宝列表失败") {
                new Intelligence.Automation.LogicView.TipPopView().FlashingBox("读取红外宝列表失败");
            }
            else
            {