wei
2021-04-01 ccdff82fac4bcc1067ec806ade5ae897f1214f4d
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using HDL_ON.Entity;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
@@ -91,12 +92,7 @@
                SetPir setPir = new SetPir();
                MainPage.BasePageView.AddChidren(setPir);
                setPir.Show(() =>
                {
                    //BackAction();
                    ////刷新界面
                    UIView(vv);
                });
                setPir.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            ///添加遥控器图标点击事件
@@ -105,7 +101,7 @@
                //进来不允许左滑
                MainPage.BasePageView.ScrollEnabled = false;
                View.Buttons buttons = new View.Buttons();
                buttons.AddFrameLayout(this, (if_value, view) =>
                buttons.AddFrameLayout(this, (if_value, view) =>
                {
                    //关闭允许左滑
                    MainPage.BasePageView.ScrollEnabled = true;
@@ -115,8 +111,8 @@
                        Method method = new Method();
                        method.AddControl(this, (control) =>
                        {
                           //成功后移除;
                           view.RemoveFromParent();
                            //成功后移除;
                            view.RemoveFromParent();
                            AddButton addButton = new AddButton();
                            MainPage.BasePageView.AddChidren(addButton);
                            addButton.Show(control);
@@ -135,8 +131,8 @@
                            GetDeviceTypeList(true, () =>
                            {
                                DeviceTypeViewClick(if_value);
                               //获取成功之后移除
                               view.RemoveFromParent();
                                    //获取成功之后移除
                                    view.RemoveFromParent();
                            });
                        }
@@ -145,15 +141,14 @@
                            DeviceTypeViewClick(if_value);
                            view.RemoveFromParent();
                        }
                    }
                }, 7);
            };
            #endregion
            ///初始化界面
            UIView(vv);
        }
        /// <summary>
        /// 加载UI界面
        /// </summary>
@@ -262,7 +257,6 @@
        /// <param name="if_value">控件索引值</param>
        private void DeviceTypeViewClick(int if_value)
        {
            var strings = View.Buttons.GetTypeString(if_value).Split('-');
            var jobDeviceType = DeviceTypeList.Find((c) => c.deviceType == strings[0]);
            if (jobDeviceType == null)
@@ -278,7 +272,6 @@
                });
            });
        }
        /// <summary>
        /// 读取红外设备类型列表
@@ -289,7 +282,6 @@
        {
            PirSend.GetDeviceTypesList(this, (responsePackNew) =>
            {
                if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                {
                    //清空之前数据
@@ -362,7 +354,6 @@
        public override void RemoveFromParent()
        {
            BackAction();
            BackAction = null;
            base.RemoveFromParent();
        }