黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewaySearchListForm.cs
@@ -84,7 +84,7 @@
        /// <param name="addLine"></param>
        private void AddGatewayRow(VerticalListControl listView, ZbGateway gateway, bool addLine)
        {
            string gwid = HdlGatewayLogic.Current.GetGatewayId(gateway);
            string gwid = gateway.GwId;
            if (this.dicZbGatewayDiv[gwid] != 2)
            {
                //如果本地没有,那么应该是在之后的编辑界面删除了
@@ -120,23 +120,15 @@
                //底线
                frameRow.frameTable.AddBottomLine();
            }
            frameRow.frameTable.ButtonClickEvent += (sender, e) =>
            {
                var form = new GatewayProductInfoForm();
                form.AddForm(gateway);
            };
            if (dicZbGatewayDiv[gwid] == 2)
            {
                //换绑
                var btnBind = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false);
                btnBind.BackgroundColor = 0xfffb744a;
                btnBind.TextAlignment = TextAlignment.Center;
                btnBind.TextColor = UserCenterColor.Current.White;
                btnBind.TextSize = 12;
                btnBind.TextID = R.MyInternationalizationString.uReBindAgain;
                frameRow.AddRightView(btnBind);
                btnBind.ButtonClickEvent += (sender, e) =>
                //需重新绑定
                frameRow.frameTable.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uNeedToRebind), 300);
            }
            frameRow.frameTable.ButtonClickEvent += (sender, e) =>
            {
                if (dicZbGatewayDiv[gwid] == 2)
                {
                    //确认绑定旧网关?
                    string msg = Language.StringByID(R.MyInternationalizationString.uRebindGatewayMsg);
@@ -145,16 +137,17 @@
                        var form = new GatewayRebindForm();
                        form.AddForm(gateway, dicZbGatewayDiv);
                    });
                };
            }
                }
                else
                {
                    var form = new GatewayProductInfoForm();
                    form.AddForm(gateway);
                }
            };
            //定位
            var btnPosition = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false);
            btnPosition.BackgroundColor = 0xff4a4a4a;
            btnPosition.TextAlignment = TextAlignment.Center;
            btnPosition.TextColor = UserCenterColor.Current.White;
            btnPosition.TextSize = 12;
            var btnPosition = frameRow.AddEditorControl(false);
            btnPosition.TextID = R.MyInternationalizationString.uFixedPosition;
            frameRow.AddRightView(btnPosition);
            btnPosition.ButtonClickEvent += (sender, e) =>
            {
                //发送定位命令
@@ -185,11 +178,9 @@
        /// </summary>
        public override void CloseFormBefore()
        {
            if (UserCenterResourse.listActionFormId.Contains("UserMainForm") == false)
            {
                //刷新主页
                UserView.UserPage.Instance.Fresh();
            }
            //刷新主页
            UserView.UserPage.Instance.ReFreshControl();
            base.CloseFormBefore();
        }