From 71f1df7772feec5cf83feefa851608adac18e005 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 06 十一月 2019 17:45:23 +0800
Subject: [PATCH] 2019.11.6
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs | 35 ++++++++++++++---------------------
1 files changed, 14 insertions(+), 21 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
index 30dbd10..c62be4d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -1160,12 +1160,11 @@
{
bool bolBreak = false;
ZbGatewayData.GetGwData result = null;
- new System.Threading.Thread(async () =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
result = await this.GetGatewayNewInfoAsync(zbGateway, mode);
bolBreak = true;
- })
- { IsBackground = true }.Start();
+ });
while (bolBreak == false)
{
@@ -1356,7 +1355,7 @@
if (localWay == null || localWay.getGwInfo == null)
{
//缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
- new System.Threading.Thread(async () =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
if (result != null)
@@ -1369,8 +1368,7 @@
}
});
}
- })
- { IsBackground = true }.Start();
+ });
}
else
{
@@ -1390,7 +1388,7 @@
if (localWay == null || localWay.getGwInfo == null)
{
//缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
- new System.Threading.Thread(async () =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
if (result != null)
@@ -1404,8 +1402,7 @@
}
});
}
- })
- { IsBackground = true }.Start();
+ });
}
else
{
@@ -1575,7 +1572,7 @@
return;
}
- new System.Threading.Thread(() =>
+ HdlThreadLogic.Current.RunThread(() =>
{
var dicStatu = this.GetNowOnlineStatuBeforeCheck();
//绛変釜3绉掞紝鍑嗗涓�涓�
@@ -1604,8 +1601,7 @@
}
//灏嗗彉鍖栫殑缃戝叧鎺ㄩ�佸埌鐣岄潰涓�
this.PushGatewayOnlineStatuToForm(dicStatu);
- })
- { IsBackground = true }.Start();
+ });
}
#endregion
@@ -1623,7 +1619,7 @@
return;
}
- new System.Threading.Thread(() =>
+ HdlThreadLogic.Current.RunThread(() =>
{
//鍏堣幏鍙栫幇鍦ㄥ叏閮ㄧ殑缃戝叧锛屽垵鏈熷�よ缃负涓嶅湪绾�
var dicStatu = this.GetNowOnlineStatuBeforeCheck();
@@ -1665,8 +1661,7 @@
string msg = Language.StringByID(R.MyInternationalizationString.uRemoteTimeOutAndNotGatewaiOnline);
//this.ShowTipMsg(msg);
}
- })
- { IsBackground = true }.Start();
+ });
}
#endregion
@@ -1791,7 +1786,7 @@
}
bool canBreak = false;
- new System.Threading.Thread(async () =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
List<string> list = new List<string>() { "NotSetAgain" };
@@ -1817,8 +1812,7 @@
}
dicDbGateway = dic;
canBreak = true;
- })
- { IsBackground = true }.Start();
+ });
int count = 0;
while (canBreak == false)
@@ -1887,7 +1881,7 @@
/// </summary>
public void ResetComandToBindBackupGateway()
{
- new System.Threading.Thread(async () =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
var fileData = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile);
if (fileData == null)
@@ -1936,8 +1930,7 @@
var byteData = System.Text.Encoding.UTF8.GetBytes(strData);
Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile, byteData);
}
- })
- { IsBackground = true }.Start();
+ });
}
#endregion
--
Gitblit v1.8.0