From 9d61367c1fd278f58f721d4c0e69999f89e4485d Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 12 十二月 2019 14:14:30 +0800
Subject: [PATCH] 添加最新绑定机制
---
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
old mode 100755
new mode 100644
index c9dd905..a1c6fb9
--- 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