From b78a4d0ca90416d37fcbaf5e54b00f7eaab53919 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 14 十月 2019 17:03:58 +0800
Subject: [PATCH] 2019-10-14-2
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs
index e07eeb3..b6ef03e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs
@@ -382,12 +382,11 @@
{
this.zbGateway.ReportAction -= this.UpdateDeviceProgress;
- new System.Threading.Thread(async () =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
//缁堟鍗囩骇
await this.otaDevice.KillUpdateAsync(this.zbGateway, 200);
- })
- { IsBackground = true }.Start();
+ });
this.UpdateStatu = UpdateStatuMode.DeviceUpdateFail;
return;
@@ -556,7 +555,7 @@
//鍗囩骇鎴愬姛
this.UpdateStatu = UpdateStatuMode.UpdateSuccess;
- new System.Threading.Thread(() =>
+ HdlThreadLogic.Current.RunThread(() =>
{
System.Threading.Thread.Sleep(3000);
@@ -592,8 +591,7 @@
//璁惧鍗囩骇鎴愬姛!
this.UpdateStatuChangedEvent?.Invoke(1, Language.StringByID(R.MyInternationalizationString.uDeviceUpdateSuccess));
});
- })
- { IsBackground = true }.Start();
+ });
}
#endregion
@@ -636,7 +634,7 @@
private void StartDownLoadTimeOutThread()
{
this.downLoadTimeOutCount = 30;
- new System.Threading.Thread(() =>
+ HdlThreadLogic.Current.RunThread(() =>
{
while (true)
{
@@ -665,8 +663,7 @@
break;
}
}
- })
- { IsBackground = true }.Start();
+ });
}
/// <summary>
@@ -691,7 +688,7 @@
private void StartUpdateTimeOutThread()
{
this.UpdateTimeOutCount = 60;
- new System.Threading.Thread(() =>
+ HdlThreadLogic.Current.RunThread(() =>
{
while (true)
{
@@ -719,8 +716,7 @@
break;
}
}
- })
- { IsBackground = true }.Start();
+ });
}
/// <summary>
--
Gitblit v1.8.0