From c1863db0158fb6c2a1cd96686d514c98c1073937 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 17 一月 2020 11:58:18 +0800
Subject: [PATCH] 2020-01-17

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

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
index a12edd8..ed675ad 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
@@ -777,7 +777,8 @@
                 } catch (Exception ex) {
                     Console.WriteLine (ex.Message);
                     Application.RunOnMainThread (() => {
-                        new Alert ("", Language.StringByID (R.MyInternationalizationString.OperationFailed), Language.StringByID (R.MyInternationalizationString.Close)).Show ();
+                        //淇敼缃戝叧杩炴帴妯″紡澶辫触
+                        new Alert ("", "Failed to modify gateway connection mode!", Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                     });
                     bool canRemove = false;
                 } finally {
@@ -834,7 +835,7 @@
 
             byte [] backBytes = Control.ControlBytesSendHasReturn (Command.SetGateWayAdminInfo, gatewayDeicve.SubnetID, gatewayDeicve.DeviceID, adminBytes);
 
-            return CheckIsSuccessfulWithBytes (backBytes);
+            return CheckIsSuccessfulWithBytes (backBytes, "Failed to modify gateway administrator information!");
         }
 
         /// <summary>
@@ -842,7 +843,7 @@
         /// </summary>
         /// <param name="backBytes"></param>
         /// <returns></returns>
-        private bool CheckIsSuccessfulWithBytes (byte [] backBytes)
+        private bool CheckIsSuccessfulWithBytes (byte [] backBytes, string errorStr = "Modify gateway configuration failed!")
         {
             if (backBytes == null) {
                 Application.RunOnMainThread (() => {
@@ -854,7 +855,7 @@
                 return true;
             } else {
                 Application.RunOnMainThread (() => {
-                    new Alert ("", Language.StringByID (R.MyInternationalizationString.OperationFailed),
+                    new Alert ("", errorStr,
                                Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                 });
                 return false;
@@ -904,7 +905,7 @@
         void BindGatewaysNew ()
         {
             Application.RunOnMainThread (() => {
-                MainPage.Loading.Start ("Gateway setting succeeded锛宒ata up.Please wait...");
+                MainPage.Loading.Start ("Gateway setting succeeded锛宒ata up. Please wait...");
             });
             IO.FileUtils.SaveEquipmentMessage (gatewayDeicve);
             var gatewayMAC = gatewayDeicve.MAC.Replace (".", "");

--
Gitblit v1.8.0