JLChen
2021-01-11 5a5a2b696866f947b6025d26c3302e8ffef46435
Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountView.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using service.hdlcontrol.com_push;
namespace Shared.SimpleControl.Phone
{
@@ -79,12 +78,12 @@
                        Room.Lists.Clear ();
                        new AccountLogin (MainPage.LoginUser.AccountString, "").Show ();
                        System.Threading.Tasks.Task.Run (() => {
                            WebServicePush webPush = new WebServicePush ();
                            webPush.DeleteToken_Push (UserConfig.Instance.tokenID);
                            if (string.IsNullOrEmpty (UserConfig.Instance.RemoteModeFile))
                                return;
                        });
                        //System.Threading.Tasks.Task.Run (() => {
                        //    WebServicePush webPush = new WebServicePush ();
                        //    webPush.DeleteToken_Push (UserConfig.Instance.tokenID);
                        //    if (string.IsNullOrEmpty (UserConfig.Instance.RemoteModeFile))
                        //        return;
                        //});
                        CommonPage.IsRemote = false;
                    }
                };
@@ -266,15 +265,15 @@
                        new AccountLogin (MainPage.LoginUser.AccountString, "").Show ();
                        this.RemoveFromParent ();
                        SharedMethod.SharedMethod.CurPageLayout = null;
                        System.Threading.Tasks.Task.Run (() => {
                            var webPush = new WebServicePush ();
                            webPush.DeleteToken_Push (UserConfig.Instance.tokenID);
                        });
                        //System.Threading.Tasks.Task.Run (() => {
                        //    var webPush = new WebServicePush ();
                        //    webPush.DeleteToken_Push (UserConfig.Instance.tokenID);
                        //});
                        //2020-02-17 退出登录,断开远程连接
                        if (CommonPage.IsRemote) {
                            Utlis.ShowAppLinkStatus (AppLinkStatus.WiFiOffline);
                            CommonPage.IsRemote = false;
                            SmartHome.MqttCommon.DisConnectRemoteMqttClient ("Logout");
                            SmartHome.MqttCommon.DisConnectRemote ("Logout");
                        }
                        //CommonPage.IsRemote = false;
                    };
@@ -286,16 +285,16 @@
                        Room.Lists.Clear ();
                        new AccountLogin (MainPage.LoginUser.AccountString, "").Show ();
                        this.RemoveFromParent ();
                        System.Threading.Tasks.Task.Run (() => {
                            var webPush = new WebServicePush ();
                            webPush.DeleteToken_Push (UserConfig.Instance.tokenID);
                        });
                        //System.Threading.Tasks.Task.Run (() => {
                        //    var webPush = new WebServicePush ();
                        //    webPush.DeleteToken_Push (UserConfig.Instance.tokenID);
                        //});
                        //CommonPage.IsRemote = false;
                        //2020-02-17 退出登录,断开远程连接
                        if (CommonPage.IsRemote) {
                            Utlis.ShowAppLinkStatus (AppLinkStatus.WiFiOffline);
                            CommonPage.IsRemote = false;
                            SmartHome.MqttCommon.DisConnectRemoteMqttClient ("Logout");
                            SmartHome.MqttCommon.DisConnectRemote ("Logout");
                        }
                    };