From 48ba446936b51fffafa7c3600c0dadc6ac0e8c20 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 10 七月 2020 10:52:13 +0800
Subject: [PATCH] 2020-07-10-01

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs
index f6e6474..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>
@@ -61,7 +64,7 @@
         /// 鍋氭垚涓�涓樉绀鸿澶囧洖璺�+鎴块棿鐨凴owLayout
         /// </summary>
         /// <param name="i_device">璁惧瀵硅薄</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public DeviceRoomControl(CommonDevice i_device, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.mainKey = Common.LocalDevice.Current.GetDeviceMainKeys(i_device);
@@ -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