| | |
| | | using CoreLocation; |
| | | using Foundation; |
| | | using HDL_ON; |
| | | using HDL_ON.DriverLayer; |
| | | using Shared; |
| | | using UIKit; |
| | | |
| | |
| | | internetStatus = Reachability.InternetConnectionStatus(); |
| | | if (internetStatus == NetworkStatus.NotReachable)//没有网络连接 0 |
| | | { |
| | | Control.Ins.GatewayOnline = false; |
| | | Control.Ins.IsRemote = false; |
| | | } |
| | | else if (internetStatus == NetworkStatus.ReachableViaCarrierDataNetwork)//3,4G的网络连接 1 |
| | | { |
| | | Control.Ins.SearchLoaclGateway(); |
| | | } |
| | | else if (internetStatus == NetworkStatus.ReachableViaWiFiNetwork) |
| | | { //wifi的网络连接 2 |
| | | //BusSocket.Stop(); |
| | | new System.Threading.Thread(() => { |
| | | System.Threading.Thread.Sleep(1000); |
| | | //BusSocket.Start(); |
| | | }) { IsBackground = true }.Start(); |
| | | { |
| | | Control.Ins.SearchLoaclGateway(); |
| | | } |
| | | } |
| | | } |