| | |
| | | { |
| | | Language.CurrentLanguage = OnAppConfig.Instance.SetLanguage; |
| | | } |
| | | #if DEBUG |
| | | Language.CurrentLanguage = "English"; |
| | | #endif |
| | | 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() |
| | | { |
| | |
| | | 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 |
| | | //{ |