From c47c3ec2488961b3a006aaebcb03dba582f8b19b Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期四, 12 三月 2020 17:08:42 +0800 Subject: [PATCH] 2020-03-12-1 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs | 35 +++++++++++++++++------------------ 1 files changed, 17 insertions(+), 18 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs index f9561e4..a32c91a 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs +++ b/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)); -- Gitblit v1.8.0