wxr
2021-03-23 09bde2ffef953fa5e78a4320aa8bbe03276ed7c5
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -14,7 +14,11 @@
        /// <summary>
        /// 回调
        /// </summary>
        public Action BackAction;
        public static Action BackAction;
        /// <summary>
        ///
        /// </summary>
        Button addDevice;
        /// <summary>
        /// 临时储存设备类型列表
        /// </summary>
@@ -26,9 +30,12 @@
            topView.topNameBtn.TextID = StringId.hongwaiyaokong;
            topView.topIconBtn.Visible = true;
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => {
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
            {
                BackAction();
                this.RemoveFromParent(); };
                BackAction = null;
                this.RemoveFromParent();
            };
            FrameLayout middFLayout = new FrameLayout();
            middFLayout.Y = Application.GetRealHeight(64);
@@ -38,19 +45,22 @@
            VerticalRefreshLayout vv = new VerticalRefreshLayout();
            middFLayout.AddChidren(vv);
            //加号图标
            Button addDevice = new Button
            addDevice = new Button
            {
                Y = Application.GetRealHeight(480),
                X = Application.GetRealWidth(293),
                Width = Application.GetRealWidth(82),
                Height = Application.GetRealWidth(84),
                UnSelectedImagePath = "PirIcon/add.png",
            };
                Visible=false,
            };
            middFLayout.AddChidren(addDevice);
            if (Pir.currPir.FunctioList.Count < 10)
            {
                //10个遥控器就会隐藏添加图标
                middFLayout.AddChidren(addDevice);
                // middFLayout.AddChidren(addDevice);
                addDevice.Visible = true;
            }
            vv.BeginHeaderRefreshingAction += () =>
@@ -77,7 +87,7 @@
                MainPage.BasePageView.AddChidren(setPir);
                setPir.Show(() =>
                {
                    BackAction();
                    //BackAction();
                    ////刷新界面
                    UIView(vv);
                });
@@ -267,7 +277,12 @@
                                Pir.currPir.FunctioList.Remove(Function);
                            }
                            UIView(vv);
                            if (Pir.currPir.FunctioList.Count < 10)
                            {
                                //10个遥控器就会隐藏添加图标
                                // middFLayout.AddChidren(addDevice);
                                addDevice.Visible = true;
                            }
                        }, "删除", "dialog", null, dialog);
                    }, () => { }, false);