From dce6c3481a37216292724013ff9d2b75ceb82f86 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 10 六月 2020 15:47:28 +0800 Subject: [PATCH] 添加小度的代码 --- ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs index 43ae483..2e80273 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs @@ -199,12 +199,12 @@ { return null; } - var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.getGatewayBaseInfo != null) && (obj.getGatewayBaseInfo.gwID == CurrentGateWayId)); + var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.GwId == CurrentGateWayId)); if (gateWay == null) { gateWay = new ZbGateway { IsVirtual = true, }; - gateWay.getGatewayBaseInfo.gwID = CurrentGateWayId; - gateWay.getGatewayBaseInfo.HomeId = Shared.Common.Config.Instance.HomeId; + gateWay.GwId = CurrentGateWayId; + gateWay.HomeId = Shared.Common.Config.Instance.HomeId; ZbGateway.GateWayList.Add(gateWay); } @@ -300,6 +300,10 @@ { return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); } + else if (strDeviceType == ZigBee.Device.DeviceType.ColorTemperatureLight.ToString()) + { + return Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte); + } else { return null; } //鑳藉皯瀛樹竴涓彉閲忓氨灏戝瓨涓�涓� device.Type = (DeviceType)device.DeviceID; @@ -369,11 +373,11 @@ { //璋冨厜鍣� IconPath = "Device/Light.png"; - if (Shared.Common.LocalDevice.Current.IsMiniLight(this) == true) - { - //mini澶滅伅 - IconPath = "Device/MiniNightLight.png"; - } + } + else if (this.Type == DeviceType.ColorTemperatureLight) + { + //鑹叉俯鐏� + IconPath = "Device/ColorLightTemperature.png"; } else if (this.Type == DeviceType.OnOffOutput) { -- Gitblit v1.8.0