From 965290476c027deb96891cde1095d9a100581a6b Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 20 二月 2020 09:13:32 +0800
Subject: [PATCH] 2020-02-20 1.优化更新。

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
index 4340598..5213ea0 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
@@ -322,7 +322,7 @@
                                         UserHomePage.FrameLayoutMain.AddChidren (UserMiddle.guidePageView);
                                         var guide = new GuideAddResidence ();
                                         UserMiddle.guidePageView.AddChidren (guide);
-                                        guide.ShowHomeList ();
+                                        guide.ShowHomeView ();
                                         UserMiddle.guidePageView.PageIndex = 0;
                                         //閲嶇疆涓哄姞瀵嗘ā寮�
                                         UserConfig.Instance.IsLocalEncrypt = true;
@@ -527,11 +527,11 @@
         /// </summary>
         /// <param name="backBytes"></param>
         /// <returns></returns>
-        static bool CheckIsSuccessfulWithBytes (byte [] backBytes)
+        static bool CheckIsSuccessfulWithBytes (byte [] backBytes, string errorStr = "Modify gateway configuration failed,please try again!")
         {
             if (backBytes == null) {
                 Application.RunOnMainThread (() => {
-                    new Alert ("", Language.StringByID (R.MyInternationalizationString.TipEquipmentNotOnline),
+                    new Alert ("", ErrorCode.GatewayNoResponse,
                                Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                 });
                 return false;
@@ -539,7 +539,7 @@
                 return true;
             } else {
                 Application.RunOnMainThread (() => {
-                    new Alert ("", Language.StringByID (R.MyInternationalizationString.OperationFailed),
+                    new Alert ("", errorStr,
                                Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                 });
                 return false;
@@ -611,12 +611,17 @@
                         //濡傛灉娌″姞瀵嗭紝璧颁慨鏀瑰姞瀵嗘柟娉�
                         var result = SetGateWayLocalEncryption (common);
                         if (!result) {
-                            MainPage.LoadingHide ();
+                            Application.RunOnMainThread (() => {
+                                MainPage.Loading.Hide ();
+                                new Alert ("", "Encryption gateway failed, please try again.", Language.StringByID (R.MyInternationalizationString.Close)).Show ();
+
+                            });
+                          
                             return result;//淇敼澶辫触 杩斿洖goNext false
                         }
                         //淇敼鎴愬姛,璁剧疆鏈湴涓哄姞瀵嗘柟寮�
                         UserConfig.Instance.IsLocalEncrypt = true;
-                        System.Console.WriteLine ($"============>LocalEncryptKey 鍔犲瘑鎴愬姛Key涓猴細{UserConfig.Instance.LocalEncryptKey}");
+                        //System.Console.WriteLine ($"============>LocalEncryptKey 鍔犲瘑鎴愬姛Key涓猴細{UserConfig.Instance.LocalEncryptKey}");
                     }
                     goNext = true;
 

--
Gitblit v1.8.0