From 21736b2944d5e88cd705a39ff87fd73d5a16e609 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期六, 09 五月 2020 11:06:35 +0800
Subject: [PATCH] 安川
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
index fcecdb3..e9c72d8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
@@ -20,24 +20,27 @@
/// </summary>
private bool hadRefresh = false;
/// <summary>
- /// 鍦ㄧ嚎鐘舵��
- /// </summary>
- private bool m_isOnline = false;
- /// <summary>
/// 浼犳劅鍣ㄦ帹閫佷腑
/// </summary>
private bool sensorPushing = false;
/// <summary>
/// 鍦ㄧ嚎鐘舵��
/// </summary>
- public bool isOnline
+ private bool m_isOnline = true;
+ /// <summary>
+ /// 鍦ㄧ嚎鐘舵��
+ /// </summary>
+ public bool IsOnline
{
get { return m_isOnline; }
set
{
- m_isOnline = value;
- //璁剧疆鍦ㄧ嚎鐘舵�佺殑鐗规晥
- this.SetOnlineStatu(m_isOnline);
+ if (m_isOnline != value)
+ {
+ m_isOnline = value;
+ //璁剧疆鍦ㄧ嚎鐘舵�佺殑鐗规晥
+ this.SetOnlineStatu(m_isOnline);
+ }
}
}
@@ -96,7 +99,7 @@
frameTable.AddBottomLine();
//璁剧疆鍦ㄧ嚎鐘舵�佺殑鐗规晥
- this.isOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(listDevice[0]);
+ this.IsOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(listDevice[0]);
}
#endregion
@@ -106,10 +109,10 @@
/// <summary>
/// 璁剧疆鍦ㄧ嚎鐘舵�佺殑鐗规晥
/// </summary>
- /// <param name="isOnline"></param>
- private void SetOnlineStatu(bool isOnline)
+ /// <param name="i_isOnline"></param>
+ private void SetOnlineStatu(bool i_isOnline)
{
- if (isOnline == false)
+ if (i_isOnline == false)
{
btnDeviceName.TextColor = UserCenterColor.Current.TextGrayColor1;
}
@@ -143,8 +146,6 @@
btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceMacName(listDevice[0]);
//璁惧鎴块棿
btnDeviceRoom.Text = Common.LocalDevice.Current.GeteRealDeviceRoomName(listDevice[0]);
- //璁剧疆鍦ㄧ嚎鐘舵�佺殑鐗规晥
- this.isOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(listDevice[0]);
}
--
Gitblit v1.8.0