Esempio n. 1
0
 private void Internet_InternetConnectionChanged(object sender, InternetConnectionChangedEventArgs args)
 {
     if (InternetConnectionChanged != null)
     {
         InternetConnectionChanged(this, args.IsConnected);
     }
 }
Esempio n. 2
0
 private void Internet_InternetConnectionChanged(object sender, InternetConnectionChangedEventArgs args)
 {
     if (InternetConnectionChanged != null)
     {
         InternetConnectionChanged(this, args.IsConnected);
     }
 }
Esempio n. 3
0
 private async void Internet_InternetConnectionChanged(object sender, InternetConnectionChangedEventArgs args)
 {
     if (args.IsConnected)
     {
         Now = (DateTime) await GetNistTime();
         if (DateTimeChanged != null)
         {
             var arg = new DateTimeChangedEventArgs();
             arg.CurrentTime = Now;
             DateTimeChanged(this, arg);
         }
             
     }
 }
Esempio n. 4
0
        private static async void NetworkInformation_NetworkStatusChanged(object sender)
        {
            try
            {
                var networkPresenter = NetworkManager.GetProvider();
                await networkPresenter.GetAvailableNetworksAsync();
                var currentWifiNetwork = networkPresenter.GetCurrentWifiNetwork();

                var arg = new InternetConnectionChangedEventArgs();
                arg.IsConnected = currentWifiNetwork != null;

                if (InternetConnectionChanged != null)
                {
                    InternetConnectionChanged(null, arg);
                }
            }
            catch
            {
                // ignored
            }
        }
Esempio n. 5
0
        private static async void NetworkInformation_NetworkStatusChanged(object sender)
        {
            try
            {
                var networkPresenter = NetworkManager.GetProvider();
                await networkPresenter.GetAvailableNetworksAsync();

                var currentWifiNetwork = networkPresenter.GetCurrentWifiNetwork();

                var arg = new InternetConnectionChangedEventArgs();
                arg.IsConnected = currentWifiNetwork != null;

                if (InternetConnectionChanged != null)
                {
                    InternetConnectionChanged(null, arg);
                }
            }
            catch
            {
                // ignored
            }
        }