From a4924de3136289d10cabbf2f61a228387d44ded7 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 07 十一月 2019 13:48:36 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into DEV_GXC

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs |   39 ++++++++++++++++++++++++++-------------
 1 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
index 6c3006a..184d68b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
@@ -31,7 +31,11 @@
         /// <summary>
         /// 涓婚闂寸殑瓒呮椂鏃堕棿 -100:涓柇绾跨▼(鍗曚綅锛氱)
         /// </summary>
-        private int topTimeOut = 60;
+        private int topTimeOut = 120;
+        /// <summary>
+        /// 瓒呮椂鏈�澶ф椂闂�
+        /// </summary>
+        private int topMaxTime = 120;
         /// <summary>
         /// 鐢婚潰ID,鏍囪瀹冪敱鍝釜鐣岄潰璋冪敤骞舵墦寮�鐨�
         /// </summary>
@@ -365,7 +369,7 @@
         {
             if (topic == gatewayId + "/Device/DeviceAnnounce_Respon")
             {
-                this.topTimeOut = 60;
+                this.topTimeOut = topMaxTime;
                 //缃戝叧鍛婄煡瀹㈡埛绔湁璁惧澹版槑
                 this.SetDeviceProgressValue(1);
                 return 2;
@@ -378,10 +382,11 @@
                 if (info.Result != 0)
                 {
                     //鍑虹幇鏈煡閿欒,璇烽噸鏂板叆缃�
-                    this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
-                    return -1;
+                    //this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
+                    HdlLogLogic.Current.WriteLog(-1, resultData);
+                    return 2;
                 }
-                this.topTimeOut = 60;
+                this.topTimeOut = topMaxTime;
                 //璁剧疆杩涘害鍊�
                 this.SetDeviceProgressValue(2);
                 return 2;
@@ -394,10 +399,11 @@
                 if (info.Result != 0)
                 {
                     //鍑虹幇鏈煡閿欒,璇烽噸鏂板叆缃�
-                    this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
-                    return -1;
+                    //this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
+                    HdlLogLogic.Current.WriteLog(-1, resultData);
+                    return 2;
                 }
-                this.topTimeOut = 60;
+                this.topTimeOut = topMaxTime;
                 //璁剧疆杩涘害鍊�
                 this.SetDeviceProgressValue(3);
                 return 2;
@@ -411,9 +417,10 @@
                 {
                     //鍑虹幇鏈煡閿欒,璇烽噸鏂板叆缃�
                     this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
-                    return -1;
+                    //HdlLogLogic.Current.WriteLog(-1, resultData);
+                    return 2;
                 }
-                this.topTimeOut = 60;
+                this.topTimeOut = topMaxTime;
                 //璁剧疆杩涘害鍊�
                 this.SetDeviceProgressValue(4);
                 return 2;
@@ -426,10 +433,11 @@
                 if (info.Result != 0)
                 {
                     //鍑虹幇鏈煡閿欒,璇烽噸鏂板叆缃�
-                    this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
-                    return -1;
+                    //this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
+                    HdlLogLogic.Current.WriteLog(-1, resultData);
+                    return 2;
                 }
-                this.topTimeOut = 60;
+                this.topTimeOut = topMaxTime;
                 //璁剧疆杩涘害鍊�
                 this.SetDeviceProgressValue(5);
                 return 2;
@@ -454,6 +462,11 @@
                 //杩涘害鏉�
                 decimal result = value / 6;
                 int width = (int)(result * Application.GetRealWidth(559));
+                if (btnProgressBar.Width >= width)
+                {
+                    //鏈変簺璁惧浼氫笂鎶ヤ袱娆�,杩欓噷涓嶈兘璁╁畠鐨勮繘搴︽潯寰�鍥炶蛋
+                    return;
+                }
                 btnProgressBar.Width = width;
 
                 //鏂囨湰鏄剧ず

--
Gitblit v1.8.0