JLChen
2021-01-07 7ed9cc5bb6a07a8358a2705797bd2b31c6e39fd4
Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs
@@ -166,18 +166,19 @@
                        //5.能远程
                        if (canRemote) {
                            if (!CommonPage.IsRemote) {
                                if (UserConfig.Instance.CheckHomeGateways ()) {
                                    if (!string.IsNullOrEmpty (UserConfig.Instance.CurrentRegion.HomeGateways [0].GatewayUniqueId)) {
                                if (UserConfig.Instance.CheckHomeGatewaysNotEmpty ()) {
                                        // 5.1能远程,显示CloudUnlink状态,IsRemote设为true开始远程
                                        //MainPage.AddTip ("Please wait, starting remote connection...");
                                        MainPage.LoadingStart ("Please wait, starting remote connection...");
                                        //MainPage.LoadingStart ("Please wait, starting remote connection...");
                                        MainPage.LoadingTipShow ("Please wait, starting remote connection...");
                                        CommonPage.IsRemote = true;
                                        IsRemoteLoadingShow = true;
                                        //重置参数状态
                                        SmartHome.MqttCommon.InitState ();
                                        Utlis.ShowAppLinkStatus (AppLinkStatus.CloudUnlink);
                                    }
                                }
                            }
@@ -201,11 +202,15 @@
                    Utlis.WriteLine ("CheckLinkRemote : " + ex.ToString ());
                } finally {
                    isConnectiong = false;
                    if (!IsRemoteLoadingShow) {
                        Application.RunOnMainThread (() => {
                            MainPage.Loading.Hide ();
                        });
                    }
                    //if (!IsRemoteLoadingShow) {
                    //    Application.RunOnMainThread (() => {
                    //        MainPage.Loading.Hide ();
                    //    });
                    //}
                    Application.RunOnMainThread (() => {
                        MainPage.Loading.Hide ();
                    });
                }
            }) { IsBackground = true }.Start ();
        }