Пример #1
0
 /// <summary>
 /// 网络状态变更时触发的事件
 /// </summary>
 private void OnNetworkStatusChanged(NetworkChangedEventArgs e)
 {
     if (NetworkStatusChanged != null)
     {
         NetworkStatusChanged(this, e);
     }
 }
Пример #2
0
        void NetworkInformation_NetworkStatusChanged(object sender)
        {
            if (NetworkStatusChanged != null)
            {
                NetworkChangedEventArgs e = new NetworkChangedEventArgs()
                {
                };
                e.Status        = GetStatusString();
                e.NetWorkStatus = GetStatus();

                NetworkStatusChanged(this, e);
            }
        }
Пример #3
0
 /// <summary>
 /// 网络状态变更时触发的事件
 /// </summary>
 private void OnNetworkStatusChanged(NetworkChangedEventArgs e)
 {
     if (NetworkStatusChanged != null)
         NetworkStatusChanged(this, e);
 }
        protected virtual void NetworkChange(NetworkChangedEventArgs details)
        {
            EventHandler <NetworkChangedEventArgs> handler = NetworkChangeEvent;

            handler?.Invoke(this, details);
        }
Пример #5
0
 void _networkManager_NetworkChanged(object sender, NetworkChangedEventArgs e)
 {
     _dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => IsOffline = !e.Connected);
 }