From b74c052b43d7c4a830386940a036eb7c2ec9abc2 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期二, 14 一月 2020 13:37:26 +0800
Subject: [PATCH] 2020-1-14-01
---
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