From c5a873df96e4a797426e4dd5eafe5b43f7aea564 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期六, 19 十二月 2020 15:41:53 +0800 Subject: [PATCH] 20201218-2 --- HDL-ON_iOS/ViewController.cs | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs index d95816c..22e1aa9 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() { -- Gitblit v1.8.0