From c7df85937f73fb347ee0b19e9c052d2d00a6df6c Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 18 九月 2020 13:58:19 +0800 Subject: [PATCH] 新版本 --- ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 35 +++++++++++++++++++++++++++-------- 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs index fa16d90..9a3120f 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs @@ -85,7 +85,6 @@ /// <para>鎸佺画鏁版嵁涓婃姤(MomentStatus=0 TriggerZoneStatus>=1锛滄姤璀︼紴 TriggerZoneStatus=0锛滃彇娑堟姤璀︼紴)</para> /// <para>21: Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿欙級</para> /// <para>22:Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿�</para> - /// <para>541 鐞冨瀷绉诲姩浼犳劅鍣�</para> /// </summary> public int IasDeviceType; /// <summary> @@ -116,7 +115,7 @@ /// </summary> public int ZigbeeType; /// <summary> - /// 褰撳墠杩愯绋嬪簭鐗堟湰淇℃伅銆� 鏈�澶�64瀛楄妭 + /// 鍥轰欢鐗堟湰 /// </summary> public int ImgVersion; /// <summary> @@ -158,7 +157,11 @@ /// <summary> /// 杈撳嚭绨囧垪琛� /// </summary> - public List<OutClusterObj> OutClusterList = new List<OutClusterObj>(); + public List<OutClusterObj> OutClusterList = new List<OutClusterObj>(); + /// <summary> + /// 鐢ㄤ簬璁板綍璁惧鏈�鏂颁笂鎶ョ殑灞炴�х姸鎬佷俊鎭� + /// </summary> + public List<AttributeStatusObj> AttributeStatus = new List<AttributeStatusObj>(); [Newtonsoft.Json.JsonIgnore] public DateTime LastDateTime = DateTime.MinValue; @@ -317,17 +320,28 @@ } else if (strDeviceType == ZigBee.Device.DeviceType.PMSensor.ToString()) { - return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); + device = Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); } else if (strDeviceType == ZigBee.Device.DeviceType.ColorTemperatureLight.ToString()) { - return Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte); + device = Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte); } else if (strDeviceType == ZigBee.Device.DeviceType.Buzzer.ToString()) { - return Newtonsoft.Json.JsonConvert.DeserializeObject<Buzzer>(strDeviceByte); + device = Newtonsoft.Json.JsonConvert.DeserializeObject<Buzzer>(strDeviceByte); } - else { return null; } + else if (strDeviceType == ZigBee.Device.DeviceType.ColorDimmableLight.ToString()) + { + device = Newtonsoft.Json.JsonConvert.DeserializeObject<ColorDimmableLight>(strDeviceByte); + } + else if (strDeviceType == ZigBee.Device.DeviceType.DimmerSwitch.ToString()) + { + device = Newtonsoft.Json.JsonConvert.DeserializeObject<DimmerSwitch>(strDeviceByte); + } + else + { + return null; + } //鑳藉皯瀛樹竴涓彉閲忓氨灏戝瓨涓�涓� device.Type = (DeviceType)device.DeviceID; @@ -366,6 +380,11 @@ /// </summary> public void ReSave() { + if (Shared.Common.Config.Instance.Home.IsShowTemplate == true) + { + //灞曠ず妯℃澘鏃�,涓嶅厑璁镐繚瀛樻枃浠�(闃叉灞炴�т笂鎶ョ敤鐨�) + return; + } if (IconPath == string.Empty) { //淇濆瓨璁惧鍥炬爣(杩欓噷浼氫繚瀛樹竴娆�,涓嬮潰灏变笉鐢ㄤ繚瀛樹簡) @@ -471,7 +490,7 @@ /// </summary> public int AttributeId; /// <summary> - /// 灞炴�у�硷紝鏈�澶у崰鐢�4涓瓧鑺� + /// 灞炴�у�硷紝杩欎釜涓滆タ涓嶉渶瑕佷粈涔堥珮浣嶅湪鍚庝綆浣嶅湪鍓�,瀹冨凡缁忔槸杞负浜�10杩涘埗 /// </summary> public int AttributeData; /// <summary> -- Gitblit v1.8.0