From f1c3921b08bb22ac6f5db22d620e01d7e8e5c49f Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 30 十二月 2019 13:32:33 +0800
Subject: [PATCH] 2019-12-30-1

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 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..ebaab67 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
@@ -37,6 +37,10 @@
         /// </summary>
         public NormalViewControl btnName = null;
         /// <summary>
+        /// 鍥炬爣鎺т欢
+        /// </summary>
+        public IconViewControl btnIcon = null;
+        /// <summary>
         /// 鏄剧ずIP鎺т欢
         /// </summary>
         private NormalViewControl btnIp = null;
@@ -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