From 2e7e5f9af5b32cfe1fc3c6ba40bf7eb984bbd0a4 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 11 五月 2020 17:52:06 +0800
Subject: [PATCH] ???????

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
index 2028413..919a812 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
@@ -244,18 +244,7 @@
 
                             var dev = new AddedDeviceBindResponseAllData();
                             dev = await currentKey.AddDeviceBindAsync(addBindeDev);
-                            if (dev != null || dev.addedDeviceBindResponseData == null)
-                            {
-                                Application.RunOnMainThread(() =>
-                                {
-                                    CommonPage.Loading.Hide();
-                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
-                                });
-                                btnFinifh.Enable = true;
-                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                                return;
-                            }
-                            else
+                            if (dev != null && dev.addedDeviceBindResponseData != null)
                             {
                                 if (dev.addedDeviceBindResponseData.Result == 0)
                                 {
@@ -317,6 +306,17 @@
                                     btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                     return;
                                 }
+                            }
+                            else
+                            {
+                                Application.RunOnMainThread(() =>
+                                {
+                                    CommonPage.Loading.Hide();
+                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
+                                });
+                                btnFinifh.Enable = true;
+                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                                return;
                             }
                         }
                         else
@@ -712,7 +712,6 @@
                          oldMode = btnChoose;
                          oldMode.IsSelected = true;
                          oldMode.Visible = true;
-                         currentKey.CurrentSwitchMode = btnModeText.Text;
                          if (btnModeText.Text == Language.StringByID(R.MyInternationalizationString.OnOffOn))
                          {
                              currentModeID = 100;
@@ -888,7 +887,6 @@
                         oldMode = btnChoose;
                         oldMode.IsSelected = true;
                         oldMode.Visible = true;
-                        currentKey.CurrentSwitchMode = btnModeText.Text;
                         if (btnModeText.Text == Language.StringByID(R.MyInternationalizationString.DimmerMode1))
                         {
                             currentModeID = 200;
@@ -1062,7 +1060,6 @@
                         oldMode = btnChoose;
                         oldMode.IsSelected = true;
                         oldMode.Visible = true;
-                        currentKey.CurrentSwitchMode = btnModeText.Text;
                         if (btnModeText.Text == Language.StringByID(R.MyInternationalizationString.WcdUp))
                         {
                             currentModeID = 300;

--
Gitblit v1.8.0