陈嘉乐
2020-04-27 18b93d511dc764b469d7c4a7e755f7274f89cdb4
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
@@ -80,7 +80,7 @@
            //设置标题信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice));
            this.gatewayId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway);
            this.gatewayId = GatewayResourse.NowSelectGatewayId;
            HdlGatewayLogic.Current.GetRealGateway(ref this.realGateway, this.gatewayId);
            //初始化中部控件
@@ -142,11 +142,13 @@
            btnProgressView.Text = "0%";
            frameProgress.AddChidren(btnProgressView);
            if (this.realGateway != null)
            {
            //允许设备入网
            this.StartDeviceCanAddToGateway(false);
            //添加监视设备新上报的事件
            this.realGateway.GwResDataAction += this.AdjustGatewayResultData;
            }
            //开启连接的假想动画效果线程
            this.StartConcetionAnimeteThread();
        }
@@ -571,6 +573,8 @@
        /// </summary>
        public override void CloseFormBefore()
        {
            if (this.realGateway != null)
            {
            //停止接收
            this.realGateway.GwResDataAction -= this.AdjustGatewayResultData;
@@ -580,6 +584,7 @@
                //关闭入网模式
                this.realGateway.AddNewDeviceToGateway(0);
            });
            }
            base.CloseFormBefore();
        }