From 2029e64ec0491f7e511dc15bffaf821bfbabe2de Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 20 七月 2020 14:10:22 +0800
Subject: [PATCH] 上传一个很特别的新版本

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs |   39 +++++++++++++++++++++------------------
 1 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
index 414fc0d..2091089 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
@@ -116,28 +116,31 @@
                     wayName += "(" + Language.StringByID(R.MyInternationalizationString.uChidrenGateway) + ")";
                 }
             }
+            this.btnName = frameTable.AddTopView(wayName, 700);
 
-            this.btnName = frameTable.AddLeftCaption(wayName, 700, 60);
-            btnName.TextSize = 15;
-            //杩欎釜鍧愭爣鏈夌偣鐗规畩
-            btnName.Y = Application.GetRealHeight(12) + this.chidrenYaxis;
-            frameTable.AddChidren(btnName, ChidrenBindMode.BindEvent);
-
-            //鎴块棿
-            string strIp = string.Empty;
-            if (tempWay != null)
-            {
-                strIp = tempWay.GwIP;
-            }
-            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.BindEvent);
+            //IP
+            this.btnIp = frameTable.AddBottomView(tempWay != null ? tempWay.GwIP : string.Empty, 600);
 
             //鍒濆鍊煎湪绾�
             this.IsOnline = true;
+
+            if (tempWay != null)
+            {
+                //鍒锋柊缃戝叧淇℃伅
+                HdlThreadLogic.Current.RunThread(() =>
+                {
+                    var result = HdlGatewayLogic.Current.GetGatewayInfo(tempWay, false, ShowErrorMode.NO);
+                    if (result != null)
+                    {
+                        HdlThreadLogic.Current.RunMain(() =>
+                        {
+                            //鍒锋柊鎺т欢
+                            tempWay.GatewayOnlineFlage = true;
+                            this.RefreshControl(tempWay);
+                        });
+                    }
+                });
+            }
         }
 
         #endregion

--
Gitblit v1.8.0