From 9ef48d7b2da7c408b53f73be0f6eef3cbac1c84a Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 19 十一月 2020 10:23:45 +0800
Subject: [PATCH] Evoyo.Home1.1.0120111601_Release

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
index 6e555b0..83fbee8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -710,7 +710,7 @@
             }
             //濡傛灉鏄湪绾跨殑
             var nowGateway = HdlGatewayLogic.Current.GetLocalGateway(GatewayResourse.NowSelectGatewayId);
-            if (HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(nowGateway) == true)
+            if (HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(nowGateway) == true)
             {
                 //妫�娴嬪箍鎾埌鐨勮繖涓綉鍏虫槸鍚︽嫢鏈変綇瀹匢D
                 ZbGateway realWay = null;
@@ -742,7 +742,7 @@
             }
 
             //鑾峰彇鍏ㄩ儴璁惧
-            int result = LocalDevice.Current.SetDeviceToMemmoryByGateway(nowGateway, false);
+            int result = LocalDevice.Current.SetDeviceToMemmoryByGateway(nowGateway.GwId, false);
             if (this.Parent == null)
             {
                 return;
@@ -783,7 +783,7 @@
                 {
                     if (this.gatewayViewRow != null && this.gatewayViewRow.zbGatewayId == selectGwId)
                     {
-                        bool online = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbGateway);
+                        bool online = HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(zbGateway);
                         //鍒锋柊鎺т欢鍦ㄧ嚎鐘舵��
                         this.gatewayViewRow?.RefreshOnlineStatu();
                         //鏍规嵁缃戝叧鍦ㄧ嚎鐘舵�佸埛鏂拌澶囧湪绾跨姸鎬�
@@ -1224,9 +1224,9 @@
             /// </summary>
             private NormalViewControl btnName = null;
             /// <summary>
-            /// 鍦ㄧ嚎鐘舵��
+            /// 鍦ㄧ嚎鐘舵��(鍒濆鐘舵�佷负鍦ㄧ嚎)
             /// </summary>
-            public bool isOnline = false;
+            public bool isOnline = true;
 
             /// <summary>
             /// 鑷畾涔夌綉鍏虫帶浠�
@@ -1271,11 +1271,11 @@
                 {
                     btnName.Text = HdlGatewayLogic.Current.GetGatewayName(zbway);
                     //鍦ㄧ嚎鐘舵��
-                    this.isOnline = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway);
-                    if (this.isOnline == false)
-                    {
-                        btnName.TextColor = UserCenterColor.Current.TextGrayColor1;
-                    }
+                    //this.isOnline = HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(zbway);
+                    //if (this.isOnline == false)
+                    //{
+                    //    btnName.TextColor = UserCenterColor.Current.TextGrayColor1;
+                    //}
                 }
                 else
                 {
@@ -1340,7 +1340,7 @@
                     return;
                 }
                 //鍦ㄧ嚎鐘舵��
-                bool statu = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway);
+                bool statu = HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(zbway);
                 if (this.isOnline != statu)
                 {
                     this.isOnline = statu;

--
Gitblit v1.8.0