JLChen
2020-02-24 ac39680a5ace5c02c63369014993fbfc959dbe5f
Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs
@@ -21,7 +21,7 @@
        /// <summary>
        /// 检测/连接远程
        /// </summary>
        public static void CheckLinkRemote (int status)
        public static void CheckLinkRemote (int status, bool IsReconnectRemote = true)
        {
            //if (isConnectiong) {
            //    return;
@@ -65,14 +65,26 @@
                                obj.Split ('_') [1].ToString () == DeviceType.OnePortMqttFR.ToString ());
                        });
                        bool canRemote = false;
                        if (CommonPage.IsRemote) {
                            //await SmartHome.MqttCommon.StartCloudMqtt ();
                            SmartHome.MqttCommon.MqttRemoteSend (new byte [] { }, 3);
                        }
                        if (gateWayList == null || gateWayList.Count == 0) {
                            Utlis.ShowAppLinkStatus (AppLinkStatus.WiFiOffline);
                            await DisConnectRemoteAsync ();
                        }
                        if (IsReconnectRemote) {
                            if (CommonPage.IsRemote) {
                                CommonPage.IsRemote = false;
                                Utlis.ShowAppLinkStatus (AppLinkStatus.WiFiOffline);
                                await SmartHome.MqttCommon.DisConnectRemoteMqttClient ();
                            }
                        }
                        if (CommonPage.IsRemote) {
                            //await SmartHome.MqttCommon.StartCloudMqtt ();
                            SmartHome.MqttCommon.MqttRemoteSend (new byte [] { }, 3);
                        }
                        //本地是否存在与当前住宅绑定网关的数据
                        bool HomeGatewaysExistsLocally = false;
                        foreach (var gatewayFileName in gateWayList) {