WJC
2020-03-17 f6e34a69f1d1e0b0b3a6252fe20acddca7fe56e5
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
@@ -21,9 +21,9 @@
        /// </summary>
        private bool isDeviceThreadStart = false;
        /// <summary>
        /// 等待设备的回馈的超时时间(单位:秒)
        /// 等待设备的回馈的超时时间(单位:百毫秒)
        /// </summary>
        private int waitDeviceTimeOut = 3;
        private int waitDeviceTimeOut = 20;
        /// <summary>
        /// 主题超时的线程是否开启
        /// </summary>
@@ -118,7 +118,6 @@
            this.btnProgressBar = new FrameLayout();
            btnProgressBar.Width = 0;
            btnProgressBar.Height = btnProRow.Height;
            btnProgressBar.Radius = btnProRow.Radius;
            btnProgressBar.BackgroundColor = 0xfffb744a;
            btnProgressBar.Radius = (uint)Application.GetRealHeight(29) / 2;
            btnProRow.AddChidren(btnProgressBar);
@@ -191,8 +190,6 @@
                this.StartTopicTimeOutThread();
                return;
            }
            //中断主题超时线程
            this.topTimeOut = -100;
            lock (this.dicNewDevice)
            {
@@ -227,19 +224,16 @@
                }
                //刷新超时时间
                this.waitDeviceTimeOut = 3;
                this.waitDeviceTimeOut = 20;
                //获取设备的固定属性
                HdlDeviceFixedAttributeLogic.Current.SetAllFixedAttributeToDevice(device);
                if ((device is OTADevice) == false)
                {
                    //不需要200端点的那个设备
                    this.dicNewDevice[device.DeviceAddr].Add(device);
                //不需要200端点的那个设备  2020.01.13 变更:ota也加进来
                this.dicNewDevice[device.DeviceAddr].Add(device);
                    //有新设备,开启显示设备信息界面的线程(里面会等待三秒这样)
                    this.StartShowDeviceAddSuccessFormThread();
                }
                //有新设备,开启显示设备信息界面的线程(里面会等待三秒这样)
                this.StartShowDeviceAddSuccessFormThread();
            }
        }
@@ -264,12 +258,12 @@
                while (this.waitDeviceTimeOut >= 0)
                {
                    //等待下一个回路
                    System.Threading.Thread.Sleep(1000);
                    System.Threading.Thread.Sleep(100);
                    this.waitDeviceTimeOut--;
                }
                //停止接收
                this.realGateway.GwResDataAction -= this.AdjustGatewayResultData;
                System.Threading.Thread.Sleep(500);
                System.Threading.Thread.Sleep(200);
                //目前就弄一个
                Application.RunOnMainThread(() =>
@@ -279,6 +273,10 @@
                        //重新变更UI
                        foreach (var device in listDevice)
                        {
                            if (device is OTADevice)
                            {
                                continue;
                            }
                            device.IconPath = string.Empty;
                            device.ReSave();
                        }
@@ -429,8 +427,8 @@
                if (info.Result != 0)
                {
                    //出现未知错误,请重新入网
                    this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
                    //HdlLogLogic.Current.WriteLog(-1, resultData);
                    //this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
                    HdlLogLogic.Current.WriteLog(-1, resultData);
                    return 2;
                }
                this.topTimeOut = topMaxTime;
@@ -457,6 +455,7 @@
            }
            else if (topic == gatewayId + "/DeviceInComingRespon")
            {
                this.topTimeOut = topMaxTime;
                //网关最终上报节点设备信息
                this.SetDeviceProgressValue(6);
                return 1;
@@ -507,7 +506,7 @@
                    System.Threading.Thread.Sleep(1000);
                    this.topTimeOut--;
                }
                if (this.topTimeOut < 0 && this.topTimeOut >= -10)
                if (this.topTimeOut < 0)
                {
                    //响应超时,请重新入网
                    this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uResponseTimeoutsAndReAccessNetwork));