From 5428935270159bfc42c2934ed7fb1091554fc9a4 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 09 七月 2020 17:12:42 +0800
Subject: [PATCH] 修改了 sokect
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs
index 9dcce0d..373ef5d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs
@@ -26,18 +26,21 @@
/// <summary>
/// 鍦ㄧ嚎鐘舵��
/// </summary>
- private bool m_isOnline = false;
+ private bool m_isOnline = true;
/// <summary>
/// 鍦ㄧ嚎鐘舵��
/// </summary>
- public bool isOnline
+ 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);
+ }
}
}
/// <summary>
@@ -93,7 +96,7 @@
btnDevie.TextSize = 15;
//杩欎釜鍧愭爣鏈夌偣鐗规畩
btnDevie.Y = Application.GetRealHeight(12) + this.chidrenYaxis;
- frameTable.AddChidren(btnDevie, ChidrenBindMode.BindEventOnly);
+ frameTable.AddChidren(btnDevie, ChidrenBindMode.BindEvent);
if (tempDevice != null)
{
btnDevie.Text = Common.LocalDevice.Current.GetDeviceEpointName(tempDevice);
@@ -111,7 +114,7 @@
btnRoom.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
btnRoom.TextSize = 12;
btnRoom.TextColor = UserCenterColor.Current.TextGrayColor1;
- frameTable.AddChidren(btnRoom, ChidrenBindMode.BindEventOnly);
+ frameTable.AddChidren(btnRoom, ChidrenBindMode.BindEvent);
if (tempDevice != null)
{
btnRoom.Text = HdlRoomLogic.Current.GetRoomNameByDevice(tempDevice);
@@ -155,10 +158,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)
{
btnDevie.TextColor = UserCenterColor.Current.TextGrayColor1;
}
--
Gitblit v1.8.0