From 45e4e387f3ef259b9e225fdd543e20be285a5112 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期二, 29 十月 2019 13:42:57 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into dev-wjc

---
 ZigbeeApp/Shared/Common/Device.cs |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index 85ac646..053b0f0 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -223,11 +223,11 @@
         /// <param name="zbGateway">缃戝叧瀵硅薄</param>
         /// <param name="deviceComingAction">鎺ユ敹鍒拌澶囨椂鐨勪簨浠�,璁惧瀵硅薄涓簄ull鏃�,浠h〃鎺ユ敹瀹屾垚</param>
         /// <returns>涓�鐩磋繑鍥瀟rue</returns>
-        public async Task<bool> SetDeviceToMemmoryByGateway(ZbGateway zbGateway, Action<CommonDevice> deviceComingAction = null)
+        public bool SetDeviceToMemmoryByGateway(ZbGateway zbGateway, Action<CommonDevice> deviceComingAction = null)
         {
             //浠庣綉鍏宠幏鍙栧叏閮ㄧ殑璁惧
             List<CommonDevice> listDevice = new List<CommonDevice>();
-            List<CommonDevice> list = await this.GetDeviceListFromGateway(zbGateway, true, deviceComingAction);
+            List<CommonDevice> list = this.GetDeviceListFromGateway(zbGateway, true, deviceComingAction);
 
             if (list == null)
             {
@@ -256,7 +256,7 @@
                 //娣诲姞缂撳瓨
                 this.AddDeviceToMemory(ref device);
 
-                //绉婚櫎瀛樺湪鐨勮澶囧唴瀛� 
+                //绉婚櫎瀛樺湪鐨勮澶囧唴瀛�
                 string maikey = this.GetDeviceMainKeys(device);
                 if (dicExist.ContainsKey(maikey) == true)
                 {
@@ -1007,6 +1007,7 @@
             this.GetDeviceIcon(device, ref unSelectFilePath, ref selectFilePath);
 
             btnIcon.UnSelectedImagePath = unSelectFilePath;
+            btnIcon.SelectedImagePath = selectFilePath;
         }
 
         /// <summary>
@@ -1706,7 +1707,7 @@
         /// <param name="deviceComingAction">鎺ユ敹鍒拌澶囨椂鐨勪簨浠�</param>
         /// <param name="mode">鏄惁鏄剧ず閿欒</param>
         /// <returns></returns>
-        public async Task<List<CommonDevice>> GetDeviceListFromGateway(ZbGateway zbGateway, bool ignoreTime, Action<CommonDevice> deviceComingAction = null, ShowErrorMode mode = ShowErrorMode.YES)
+        public List<CommonDevice> GetDeviceListFromGateway(ZbGateway zbGateway, bool ignoreTime, Action<CommonDevice> deviceComingAction = null, ShowErrorMode mode = ShowErrorMode.YES)
         {
             if (ignoreTime == false)
             {
@@ -1813,13 +1814,13 @@
             try
             {
                 var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 93 } };
-                await realWay.Send("GetDeviceInfo", jObject.ToString());
+                realWay.Send("GetDeviceInfo", jObject.ToString());
             }
             catch { canBreak = true; }
 
             while (canBreak == false && TimeOut < 60)
             {
-                await Task.Delay(100);
+                System.Threading.Thread.Sleep(100);
                 TimeOut++;
             }
 
@@ -2074,7 +2075,7 @@
             this.dicDeviceModelIdEnum["H06C"] = "2800-2800";//鏅鸿兘闂ㄩ攣(H06C)
 
             //=========鈽呪槄绌鸿皟绫�(3600-3899)鈽呪槄=========
-            this.dicDeviceModelIdEnum["MAC/GW-ZB.431"] = "3600-3600";//zigbee绌鸿皟缃戝叧妯″潡
+            this.dicDeviceModelIdEnum["MAC/GW-ZB.10"] = "3600-3600";//zigbee绌鸿皟缃戝叧妯″潡
 
             //=========鈽呪槄涓户鍣ㄧ被(3900-3999)鈽呪槄=========
             this.dicDeviceModelIdEnum["MSR-ZB.10"] = "3900-3900"; //zigbee涓户鍣�

--
Gitblit v1.8.0