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(); }); }
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(); } }