From 2d414e3b007f750cdad4f9e4a7c04db696bca5e4 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 23 四月 2020 16:13:59 +0800
Subject: [PATCH] 2020-04-23 1.优化远程连接提示,改为Loading方案,防止连接过程用户点击重连图标。 2.点击网络检测图标会判断,是否正在远程连接,如果是,会弹窗提示用户”正在远程连接,是否仍要重新检测“。 3.Help 增加隐藏长按功能,长按后,可以开启远程过程异常弹窗提示。长按后关闭。

---
 Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs b/Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs
index 5946475..0d8deb3 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs
@@ -111,6 +111,9 @@
                                     if (status == 2) {
                                         //var result = Control.ControlBytesSendHasReturn (Command.ReadGateway, common.SubnetID, common.DeviceID, new byte [] { (byte)new Random ().Next (255), (byte)new Random ().Next (255) });
                                         #region
+                                        //寮�濮嬫湰鍦版悳绱㈢綉鍏�...
+                                        MainPage.AddTip ("Searching local gateway...");
+
                                         var control = new Control ();
                                         control.Send (new Target () {
                                             IPEndPoint = new System.Net.IPEndPoint (System.Net.IPAddress.Parse (new Net.NetWiFi ().BroadcastIpAddress.ToString ()), 6000),
@@ -133,10 +136,19 @@
                                                     UserMiddle.btnLinkStatus.UnSelectedImagePath = MainPage.WiFiStatus;
                                                     MainPage.Loading.Hide ();
                                                 });
+                                                //鎼滅储鎴愬姛锛屽惎鐢ㄦ湰鍦拌繛鎺�
+                                                MainPage.AddTip ("Gateway searched successfully, enable local connection.");
+
                                                 Shared.SimpleControl.Phone.UserMiddle.ReadAllDeviceStatus ();
                                                 await SmartHome.MqttCommon.DisConnectRemoteMqttClient ();
                                                 return;
+                                            } else {
+
                                             }
+                                        } else {
+                                            //鎼滅储澶辫触锛屽惎鐢ㄨ繙绋嬭繛鎺�
+                                            MainPage.AddTip ("Gateway cannot be searched locally.");
+                                            
                                         }
                                     } else {
                                         break;
@@ -153,12 +165,13 @@
                                 if (UserConfig.Instance.CheckHomeGateways ()) {
                                     if (!string.IsNullOrEmpty (UserConfig.Instance.CurrentRegion.HomeGateways [0].GatewayUniqueId)) {
                                         // 5.1鑳借繙绋�,鏄剧ずCloudUnlink鐘舵�侊紝IsRemote璁句负true寮�濮嬭繙绋�
-                                        MainPage.AddTip ("Starting remote connection mode...");
+                                        MainPage.AddTip ("Please wait, starting remote connection...");
 
                                         Utlis.ShowAppLinkStatus (AppLinkStatus.CloudUnlink);
                                         CommonPage.IsRemote = true;
-                                        SmartHome.MqttCommon.IsGatewayOnline = false;
-                                        //await SmartHome.MqttCommon.StartCloudMqtt ();
+                                        //閲嶇疆鍙傛暟鐘舵��
+                                        SmartHome.MqttCommon.InitState ();
+
                                     }
                                 }
                             }

--
Gitblit v1.8.0