From ac39680a5ace5c02c63369014993fbfc959dbe5f Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 24 二月 2020 09:09:10 +0800
Subject: [PATCH] 2020-02-24 1.优化更新。

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

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
index 5213ea0..e7792e0 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
@@ -345,14 +345,16 @@
 
 
         static bool inThisView = false;
-        Alert checkInternetAlert = new Alert ("", "Your phone in not connected to WIFI network, please connet", "Close", "Search again");
-        Alert confirmAlert = new Alert ("", "Please make sure gateway is powered up and comect to WiFi router.", "Close", "Search again");
-        Alert confirmAlert1 = new Alert ("", "If not all the gateways are in the list,you can search again.", "Close", "Search again");
-        Alert wrongPasswordAlert = new Alert ("", ErrorCode.GatewayPasswordError, "Close", "Search again");
+        //Alert checkInternetAlert = new Alert ("", "Your phone in not connected to WIFI network, please connet", "Close", "Search again");
+        //Alert confirmAlert = new Alert ("", "Please make sure gateway is powered up and comect to WiFi router.", "Close", "Search again");
+        //Alert confirmAlert1 = new Alert ("", "If not all the gateways are in the list,you can search again.", "Close", "Search again");
+        //Alert wrongPasswordAlert = new Alert ("", ErrorCode.GatewayPasswordError, "Close", "Search again");
 
         void SearchGatewayList ()
         {
             if (UserConfig.Instance.internetStatus == 0 || UserConfig.Instance.internetStatus == 1) {
+                Alert checkInternetAlert = new Alert ("", "Your phone in not connected to WIFI network, please connet", "Close", "Search again");
+
                 checkInternetAlert.Show ();
 
                 checkInternetAlert.ResultEventHandler += (dsss, eee) => {
@@ -443,6 +445,8 @@
                         } else {
                             if (this != null && this.Parent != null) {
                                 if (inThisView) {// this.Parent.GetChildren (this.Parent.ChildrenCount - 1) == this) {
+                                    Alert confirmAlert1 = new Alert ("", "If not all the gateways are in the list,you can search again.", "Close", "Search again");
+
                                     confirmAlert1.Show ();
                                     confirmAlert1.ResultEventHandler += (ddf, ddd) => {
                                         MainPage.Loading.Hide ();
@@ -468,19 +472,18 @@
             if (UserConfig.Instance.IsLocalEncrypt) {
                 //瀵嗙爜妫�楠屾纭�
                 if (UserConfig.Instance.EncryptedPasswordCorrect) {
-
-                    inView.confirmAlert.Show ();
-                    inView.confirmAlert.ResultEventHandler += (ddf, ddd) => {
+                    Alert confirmAlert = new Alert ("", "Please make sure gateway is powered up and comect to WiFi router.", "Close", "Search again");
+                    confirmAlert.Show ();
+                    confirmAlert.ResultEventHandler += (ddf, ddd) => {
                         MainPage.Loading.Hide ();
                         if (ddd) {
                             inView.SearchGatewayList ();
                         }
                     };
                 } else {
-
-
-                    inView.wrongPasswordAlert.Show ();
-                    inView.wrongPasswordAlert.ResultEventHandler += (ddf, ddd) => {
+                    Alert wrongPasswordAlert = new Alert ("", ErrorCode.GatewayPasswordError, "Close", "Search again");
+                    wrongPasswordAlert.Show ();
+                    wrongPasswordAlert.ResultEventHandler += (ddf, ddd) => {
                         MainPage.Loading.Hide ();
                         if (ddd) {
                             inView.SearchGatewayList ();
@@ -489,8 +492,9 @@
 
                 }
             } else {
-                inView.confirmAlert.Show ();
-                inView.confirmAlert.ResultEventHandler += (ddf, ddd) => {
+                Alert confirmAlert = new Alert ("", "Please make sure gateway is powered up and comect to WiFi router.", "Close", "Search again");
+                confirmAlert.Show ();
+                confirmAlert.ResultEventHandler += (ddf, ddd) => {
                     MainPage.Loading.Hide ();
                     if (ddd) {
                         inView.SearchGatewayList ();

--
Gitblit v1.8.0