陈嘉乐
2021-03-09 83df0ebfbd306d0fb5a51a21a7ef2271c0c507ec
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs
@@ -11,7 +11,7 @@
        {
            Tag = "PirView";
        }
        public void Show()
        public void Show(Action action)
        {
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
@@ -19,7 +19,10 @@
            topView.topNameBtn.TextID = StringId.shebeigaunli;
            topView.topIconBtn.Visible = true;
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); };
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => {
                action();
                this.RemoveFromParent();
            };
            VerticalRefreshLayout vv = new VerticalRefreshLayout();
            vv.Height = Application.GetRealHeight(667 - 64);
            vv.Y = Application.GetRealHeight(64);
@@ -147,6 +150,7 @@
                    Width = Application.GetRealWidth(8),
                    Height = Application.GetRealWidth(8),
                    UnSelectedImagePath = "PirIcon/online.png",
                    SelectedImagePath = "PirIcon/offline.png",
                };
                devfLayout.AddChidren(stateIconBtn);
                //红外宝状态(在线-离线)
@@ -160,9 +164,17 @@
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = TextSize.text12,
                    TextColor = 0xFF67D569,// CSS.CSS_Color.textColor,
                    SelectedTextColor =CSS.CSS_Color.textRedColor,
                    IsBold = true,
                };
                devfLayout.AddChidren(stateTextBtn);
                if (pirDevice.online) {
                    stateIconBtn.IsSelected = true;
                    stateTextBtn.IsSelected = true;
                } else {
                    stateIconBtn.IsSelected = false;
                    stateTextBtn.IsSelected = false;
                }
                //线
                Button lineBtn = new Button
                {
@@ -302,7 +314,11 @@
                                    {
                                        if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                                        {
                                            pirDevice.FunctioList.Remove(Function);
                                            var function = pirDevice.FunctioList.Find((c)=>c.sid== Function.sid);
                                            if (function != null)
                                            {
                                                pirDevice.FunctioList.Remove(Function);
                                            }
                                            UIView(vv);
                                        }