コード例 #1
0
 void CrossConnectivity_Current_ConnectivityChanged(object sender, Connectivity.Plugin.Abstractions.ConnectivityChangedEventArgs e)
 {
     InvokeOnMainThread(() =>
     {
         new UIAlertView("status", "Connected: " + e.IsConnected + " Connected: " + CrossConnectivity.Current.IsConnected, null, "OK").Show();
     });
 }
コード例 #2
0
ファイル: App.cs プロジェクト: tmaier27/PumpingUnitService
        private void HandleConnectivityChanged(object sender, Connectivity.Plugin.Abstractions.ConnectivityChangedEventArgs e)
        {
            Type currentPage = this.MainPage.GetType();

            if (e.IsConnected && currentPage != typeof(ViewPumpingUnitPage))
            {
                this.MainPage = new ViewPumpingUnitPage();
            }
            else if (!e.IsConnected && currentPage != typeof(NoNetworkPage))
            {
                this.MainPage = new NoNetworkPage();
            }
        }