gxc
2020-01-02 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs
@@ -115,7 +115,7 @@
            btnMsg1.Y = picGwImage.Bottom + Application.GetRealHeight(112);
            btnMsg1.TextID = R.MyInternationalizationString.uSearchGatewayFailMsg1;
            bodyFrameLayout.AddChidren(btnMsg1);
            //1.长按ZB/RST键20秒,网关恢复出厂设置,指示灯全部熄灭后,重新入网。
            //1.短按HID/WCFG按键,系统指示灯快闪3秒,网关进入换绑模式,强制网关绑定到当前APP
            var btnMsg2 = new NormalViewControl(930, 100, true);
            btnMsg2.X = Application.GetRealWidth(75);
            btnMsg2.Y = btnMsg1.Bottom + Application.GetRealHeight(35);
@@ -124,7 +124,7 @@
            btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1;
            btnMsg2.IsMoreLines = true;
            bodyFrameLayout.AddChidren(btnMsg2);
            //2.点按HID/WCFG键,进入网关换绑模式,系统指示灯快闪5秒。
            //2.长按网关ZB/RST按键20秒以上,直到所有指示灯同时灭,即恢复出厂设置并重启
            var btnMsg3 = new NormalViewControl(930, 100, true);
            btnMsg3.X = Application.GetRealWidth(75);
            btnMsg3.Y = btnMsg2.Bottom + Application.GetRealHeight(12);
@@ -160,6 +160,7 @@
            frameback.BackgroundImagePath = "Item/BottomButtonGround.png";
            bodyFrameLayout.AddChidren(frameback);
            var btnReDo = new NormalViewControl(300, 65, true);
            btnReDo.IsBold = true;
            btnReDo.TextColor = UserCenterColor.Current.White;
            btnReDo.TextSize = 16;
            btnReDo.Y = Application.GetRealHeight(49);
@@ -394,6 +395,8 @@
                {
                    //需要重新绑定
                    this.dicZbGatewayDiv[listId[i]] = 2;
                    //获取到了新网关
                    this.newGatewayGetting = true;
                }
                if (mode == GatewayBindMode.First)
@@ -415,28 +418,6 @@
        public override void CloseFormBefore()
        {
            ZigBee.Common.Application.IsSearchingGateway = false;
            //断开没有执行绑定的网关的mqtt
            var list = new List<ZbGateway>();
            for (int i = 0; i < ZbGateway.GateWayList.Count; i++)
            {
                if (HdlGatewayLogic.Current.IsGatewayExist(ZbGateway.GateWayList[i]) == false)
                {
                    list.Add(ZbGateway.GateWayList[i]);
                }
            }
            if (list.Count > 0)
            {
                foreach (var way in list)
                {
                    ZbGateway.GateWayList.RemoveAll((obj) => HdlGatewayLogic.Current.GetGatewayId(obj) == HdlGatewayLogic.Current.GetGatewayId(way));
                    way.DisConnectLocalMqttClient("Search");
                }
            }
            if (UserCenterResourse.listActionFormId.Contains("UserMainForm") == false)
            {
                //刷新主页
                UserView.UserPage.Instance.Fresh();
            }
            base.CloseFormBefore();
        }