From adb12dcdbb2ddaeac687c3aa9e57bb7ed459ab7e Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期三, 24 六月 2020 15:26:46 +0800 Subject: [PATCH] 2020.06.24.01 --- ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs index cda2d6e..da81728 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,14 @@ { return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); } + else if (strDeviceType == ZigBee.Device.DeviceType.ColorTemperatureLight.ToString()) + { + return Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte); + } + else if (strDeviceType == ZigBee.Device.DeviceType.Buzzer.ToString()) + { + return Newtonsoft.Json.JsonConvert.DeserializeObject<Buzzer>(strDeviceByte); + } else { return null; } //鑳藉皯瀛樹竴涓彉閲忓氨灏戝瓨涓�涓� device.Type = (DeviceType)device.DeviceID; @@ -369,6 +377,11 @@ { //璋冨厜鍣� IconPath = "Device/Light.png"; + } + else if (this.Type == DeviceType.ColorTemperatureLight) + { + //鑹叉俯鐏� + IconPath = "Device/ColorLightTemperature.png"; } else if (this.Type == DeviceType.OnOffOutput) { -- Gitblit v1.8.0