From ff3cfcf62632bf43e51a6b6098c203bf0f5cddbc Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 24 十二月 2019 19:53:29 +0800
Subject: [PATCH] 2019.12.24

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs |   31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs
index c9dd905..a1c6fb9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs
@@ -18,7 +18,7 @@
         public static void DoUpdateNextFirmware()
         {
             //涓嬩竴涓鎵ц鏇存柊鐨勭綉鍏�
-            GatewayFirmwareUpdateControl gwControl = null;
+            HdlGatewayUpdateLogic gwControl = null;
             foreach (var contr in FirmwareUpdateResourse.dicGatewayUpdateList.Values)
             {
                 //濡傛灉鍒殑杩樺湪鍗囩骇涓�,鍒欎笉鍐嶅鐞�
@@ -49,19 +49,21 @@
                     deviceControl = contr;
                 }
             }
-
-            if (gwControl != null)
+            HdlThreadLogic.Current.RunMain(() =>
             {
-                //寮�濮嬫墽琛屾洿鏂版搷浣�
-                gwControl.DoStartUpdate();
-                return;
-            }
+                if (gwControl != null)
+                {
+                    //寮�濮嬫墽琛屾洿鏂版搷浣�
+                    gwControl.DoStartUpdate();
+                    return;
+                }
 
-            if (deviceControl != null)
-            {
-                //寮�濮嬫墽琛屾洿鏂版搷浣�
-                deviceControl.DoStartUpdate();
-            }
+                if (deviceControl != null)
+                {
+                    //寮�濮嬫墽琛屾洿鏂版搷浣�
+                    deviceControl.DoStartUpdate();
+                }
+            });
         }
 
         #endregion
@@ -136,8 +138,9 @@
         /// <returns></returns>
         private async static Task<bool> GetFirmwareVersionAndSetToMemmory(FirmwareLevelType levelType, GetFirmwareVersionPra pra)
         {
-            string resultValue = await UserCenterLogic.GetResponseDataByRequestHttps("FirmwareMana/DetectionPlatformUploadFirmware", false, pra);
-            if (resultValue == null)
+            var listNotShow = new List<string>() { "NotSetAgain" };
+            string resultValue = await UserCenterLogic.GetResponseDataByRequestHttps("FirmwareMana/DetectionPlatformUploadFirmware", false, pra, listNotShow);
+            if (string.IsNullOrEmpty(resultValue) == true)
             {
                 return false;
             }

--
Gitblit v1.8.0