From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 30 八月 2022 09:37:38 +0800
Subject: [PATCH] 合并了IOS的代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayRebindForm.cs |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayRebindForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayRebindForm.cs
index 262558f..8d531c6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayRebindForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayRebindForm.cs
@@ -40,14 +40,21 @@
             btnMsg.TextID = R.MyInternationalizationString.uIsReBindingPleaseWaiting;
             bodyFrameLayout.AddChidren(btnMsg);
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
-                await System.Threading.Tasks.Task.Delay(1000);
-                int value = await HdlGatewayLogic.Current.ReBindNewGateway(i_gateway, btnMsg);
+                System.Threading.Thread.Sleep(1000);
+                int value = HdlGatewayLogic.Current.ReBindNewGateway(i_gateway, btnMsg);
                 if (value == 1)
                 {
                     //鎴愬姛
-                    i_dicZbGatewayDiv[HdlGatewayLogic.Current.GetGatewayId(i_gateway)] = 1;
+                    i_dicZbGatewayDiv[i_gateway.GwId] = 1;
+                    //鎴戣寰楄繖閲岄渶瑕佽幏鍙栦竴涓嬫柊缃戝叧鐨勮澶囧垪琛�
+                    Common.LocalDevice.Current.SetDeviceToMemmoryByGateway(i_gateway.GwId, true);
+                    if (i_gateway.IsMainGateWay == true)
+                    {
+                        //濡傛灉瀹冩槸涓荤綉鍏�,鍒欏埛鏂板満鏅垪琛�
+                        HdlSceneLogic.Current.RefreshSceneUIList(true);
+                    }
                 }
                 else if (value == 0)
                 {

--
Gitblit v1.8.0