From e96e11d6f8b965ea522c983e040d41e3b9ef105a Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 18 五月 2020 21:33:19 +0800
Subject: [PATCH] 2020-05-18-4

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
index 52838aa..b61989d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
@@ -37,9 +37,13 @@
         /// </summary>
         public NormalViewControl btnName = null;
         /// <summary>
+        /// 鍥炬爣鎺т欢
+        /// </summary>
+        public IconViewControl btnIcon = null;
+        /// <summary>
         /// 鏄剧ずIP鎺т欢
         /// </summary>
-        private NormalViewControl btnIp = null;
+        public NormalViewControl btnIp = null;
 
         /// <summary>
         /// 鍦ㄧ嚎鐘舵��
@@ -67,7 +71,7 @@
         /// 鍋氭垚涓�涓樉绀虹綉鍏充俊鎭殑RowLayout,娣诲姞姝ゆ帶浠跺埌瀹瑰櫒鍚庯紝璋冪敤銆怚nitControl()銆戝畬鎴愬垵濮嬪寲
         /// </summary>
         /// <param name="i_zbGateway">缃戝叧瀵硅薄</param>
-        /// <param name="ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public GatewayRowControl(ZbGateway i_zbGateway, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.zbGatewayId = HdlGatewayLogic.Current.GetGatewayId(i_zbGateway);
@@ -82,7 +86,7 @@
             var tempWay = this.zbGateway;
 
             //鍥炬爣
-            var btnIcon = frameTable.AddLeftIcon(iconSize);
+            this.btnIcon = frameTable.AddLeftIcon(iconSize);
             if (tempWay != null)
             {
                 HdlGatewayLogic.Current.SetGatewayIcon(btnIcon, tempWay);
@@ -117,13 +121,20 @@
             frameTable.AddChidren(btnName, ChidrenBindMode.BindEventOnly);
 
             //鎴块棿
-            string strIp = HdlGatewayLogic.Current.GetGatewayBaseInfoAttribute(tempWay, "IpAddress").ToString();
+            string strIp = string.Empty;
+            if (tempWay != null)
+            {
+                strIp = tempWay.getGatewayBaseInfo.IpAddress;
+            }
             this.btnIp = frameTable.AddLeftCaption(strIp, 600, 50, true);
             //杩欎釜鍧愭爣鏈夌偣鐗规畩
             btnIp.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
             btnIp.TextSize = 12;
             btnIp.TextColor = UserCenterColor.Current.TextGrayColor1;
             frameTable.AddChidren(btnIp, ChidrenBindMode.BindEventOnly);
+
+            //鍒濆鍊煎湪绾�
+            this.IsOnline = true;
         }
 
         #endregion

--
Gitblit v1.8.0