From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs | 34 ++++++++++++++++++++++++---------- 1 files changed, 24 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs index 1a9e97c..fe9d306 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs @@ -7,23 +7,15 @@ public class ZbGatewayData { #region 涓�鍫嗗彉閲� - /// <summary> - /// 缃戝叧鍦ㄧ嚎鐨勬椂闂寸偣 - /// </summary> - [Newtonsoft.Json.JsonIgnore] - public DateTime OnlineTime = DateTime.Now; + /// <summary> /// 浣忓畢ID /// </summary> public string HomeId = string.Empty; - /// <summary> - /// 缃戝叧鎵�鍦ㄧ殑鎴块棿ID - /// </summary> - public string RoomId = string.Empty; ///<summary> ///缃戝叧搴忓垪鍙凤紝璇ョ綉鍏冲敮涓�鏍囪瘑 /// </summary> - public string GwId = string.Empty; + public string GwId = string.Empty; /// <summary> ///缃戝叧缁戝畾缃戝崱鐨刴ac鍦板潃 /// </summary> @@ -88,6 +80,28 @@ /// </summary> [Newtonsoft.Json.JsonIgnore] public DateTime LastDateTime = DateTime.MinValue; + /// <summary> + /// 缃戝叧鍦ㄧ嚎鐨勬椂闂寸偣(杩欎釜涓滆タ鏈夌偣鐢ㄥ,褰撶涓�娆¤幏鍙栨椂,闇�瑕佽繑鍥炲綋鍓嶆椂闂村洖鍘�,鐒跺悗鎵嶅紑濮嬭鏃�) + /// </summary> + [Newtonsoft.Json.JsonIgnore] + private DateTime m_OnlineTime = new DateTime(1970, 1, 1); + /// <summary> + /// 缃戝叧鍦ㄧ嚎鐨勬椂闂寸偣 + /// </summary> + [Newtonsoft.Json.JsonIgnore] + public DateTime OnlineTime + { + get + { + if (m_OnlineTime.Year == 1970) + { + //褰撶涓�娆¤幏鍙栨椂,闇�瑕佽繑鍥炲綋鍓嶆椂闂村洖鍘�,鐒跺悗鎵嶅紑濮嬭鏃� + m_OnlineTime = DateTime.Now; + } + return m_OnlineTime; + } + set { m_OnlineTime = value; } + } #endregion -- Gitblit v1.8.0