| | |
| | | /// </summary> |
| | | public void CheckLogout() |
| | | { |
| | | //测试账号,不挤下线 |
| | | switch (UserInfo.Current.AccountString) |
| | | { |
| | | case "13415629083": |
| | | case "18316120654": |
| | | case "15622703419": |
| | | case "18824864143": |
| | | case "464027401@qq.com": |
| | | case "2791308028@qq.com": |
| | | case "13697499568": |
| | | case "18666455392": |
| | | case "13375012446": |
| | | case "13602944661": |
| | | case "18778381374": |
| | | case "18316672920": |
| | | return; |
| | | } |
| | | |
| | | //未登录不用处理 |
| | | if (!UserInfo.Current.IsLogin) return; |
| | | |
| | | //账号在别处登陆,被踢下线 跳转到登录页面 |
| | | new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show(); |
| | | |
| | | //#if DEBUG |
| | | return; |
| | | //#endif |
| | | |
| | | Logout(); |
| | | } |
| | |
| | | { |
| | | MainPage.Log($"网络状态变化,当前网络:{internetStatus} 是否后台:{IsEnterBackground.ToString()}"); |
| | | //网络状态变化 重置网关状态重新搜索 |
| | | Control.Ins.GatewayOnline = false; |
| | | Control.Ins.GatewayOnline_Cloud = false; |
| | | Control.Ins.GatewayOnline_Local = false; |
| | | |
| | | //网络变化,断开重连一次 |
| | | if (Control.Ins.IsRemote) |
| | | { |
| | | Control.Ins.IsRemote = false; |
| | | DAL.Mqtt.MqttClient.DisConnectRemote("UpdateInternetStatus", false); |
| | | } |
| | | DAL.Mqtt.MqttClient.DisConnectRemote("UpdateInternetStatus", false); |
| | | |
| | | if (internetStatus == 0)//没有网络连接 0 |
| | | { |
| | | Control.Ins.GatewayOnline = false; |
| | | Control.Ins.IsRemote = false; |
| | | MainPage.InternetStatus = 0; |
| | | } |
| | | else if (internetStatus == 1)//3,4G的网络连接 1 |