From 8b4d79ca03495e522a1953e04ca17527f33c853a Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 28 十月 2019 13:22:17 +0800 Subject: [PATCH] 合并完成代码 --- ZigbeeApp/Shared/Common/Device.cs | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs index 85ac646..15b7c71 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) { @@ -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