From 320d7cc8feb394d0ce3db2ec1d01593b554d990f Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 23 十二月 2020 10:57:13 +0800 Subject: [PATCH] 2020-12-23 1.更新 --- HDL-ON_iOS/ViewController.cs | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs index d95816c..0e6c711 100644 --- a/HDL-ON_iOS/ViewController.cs +++ b/HDL-ON_iOS/ViewController.cs @@ -36,16 +36,25 @@ } HDL_ON.MainPage.Show(); - //渚︽祴缃戠粶鍙樺寲 - Reachability.ReachabilityChanged += UpdateStatus; + try + { + //渚︽祴缃戠粶鍙樺寲 + Reachability.ReachabilityChanged += UpdateStatus; - UITapGestureRecognizer oTapRecognizer = new UITapGestureRecognizer(); - oTapRecognizer.CancelsTouchesInView = false; - oTapRecognizer.AddTarget( - this, - new ObjCRuntime.Selector("ViewTappedSelector:") - ); - this.View.AddGestureRecognizer(oTapRecognizer); + UITapGestureRecognizer oTapRecognizer = new UITapGestureRecognizer(); + oTapRecognizer.CancelsTouchesInView = false; + oTapRecognizer.AddTarget( + this, + new ObjCRuntime.Selector("ViewTappedSelector:") + ); + this.View.AddGestureRecognizer(oTapRecognizer); + MainPage.InternetStatus = (int)Reachability.InternetConnectionStatus(); + //HDLCommon.Current.UpdateInternetStatus((int)Reachability.InternetConnectionStatus(), SharedMethod.SharedMethod.IsBackground); + } + catch + { + + } } public override UIStatusBarStyle PreferredStatusBarStyle() { @@ -75,7 +84,7 @@ internetStatus = Reachability.InternetConnectionStatus(); //MainPage.Log($"缃戠粶鐘舵�佸彉鍖栵紝褰撳墠缃戠粶:{internetStatus}"); //缃戠粶鍙樺寲澶勭悊 - HDLCommon.Current.UpdateInternetStatus((int)internetStatus, SharedMethod.SharedMethod.IsBackground); + HDLCommon.Current.UpdateInternetStatus((int)internetStatus, MainPage.IsEnterBackground); //if (internetStatus == NetworkStatus.NotReachable)//娌℃湁缃戠粶杩炴帴 0 //{ -- Gitblit v1.8.0