From aa1eb6c809ef1e0e050bfeac53e9f2ea4f11330c Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 18 十二月 2020 21:00:48 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into NewFilePath --- HDL-ON_iOS/ViewController.cs | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs index 2dc82cb..f589fc3 100644 --- a/HDL-ON_iOS/ViewController.cs +++ b/HDL-ON_iOS/ViewController.cs @@ -2,6 +2,7 @@ using CoreLocation; using Foundation; using HDL_ON; +using HDL_ON.DriverLayer; using Shared; using UIKit; @@ -72,19 +73,22 @@ void UpdateStatus(object sender, EventArgs e) { internetStatus = Reachability.InternetConnectionStatus(); + MainPage.Log($"缃戠粶鐘舵�佸彉鍖栵紝褰撳墠缃戠粶:{internetStatus}"); if (internetStatus == NetworkStatus.NotReachable)//娌℃湁缃戠粶杩炴帴 0 { + Control.Ins.GatewayOnline = false; + Control.Ins.IsRemote = false; + MainPage.InternetStatus = 0; } else if (internetStatus == NetworkStatus.ReachableViaCarrierDataNetwork)//3,4G鐨勭綉缁滆繛鎺� 1 { + Control.Ins.SearchLoaclGateway(); + MainPage.InternetStatus = 1; } else if (internetStatus == NetworkStatus.ReachableViaWiFiNetwork) - { //wifi鐨勭綉缁滆繛鎺� 2 - BusSocket.Stop(); - new System.Threading.Thread(() => { - System.Threading.Thread.Sleep(1000); - BusSocket.Start(6000); - }) { IsBackground = true }.Start(); + { + Control.Ins.SearchLoaclGateway(); + MainPage.InternetStatus = 2; } } } -- Gitblit v1.8.0