示例#1
0
 private void OnConnectivityChanged(object sender, ConnectivityChangedEventArgs connectivityChangedEventArgs)
 {
     if (connectivityChangedEventArgs.IsConnected)
     {
         MainPage = new NetworkInfoPage();
     }
     else
     {
         MainPage = new NoNetworkPage();
     }
 }
示例#2
0
        public App()
        {
            CrossConnectivity.Current.ConnectivityChanged += OnConnectivityChanged;

            if (CrossConnectivity.Current.IsConnected)
            {
                MainPage = new NetworkInfoPage();
            }
            else
            {
                MainPage = new NoNetworkPage();
            }
        }