private void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { if (e.IsAvailable) _annunciator.ConnectivityState = ConnectivityState.HaveInternet; else _annunciator.ConnectivityState = ConnectivityState.Configured; }
private void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { Logger.WriteInfo("RPTR", "Network availability: " + e.IsAvailable.ToString()); if (e.IsAvailable == true) { Server.StartAll(); } else { Server.StopAll(); } }
private void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { if (e.IsAvailable == true) { cyclingDisplay.AddMessage("key1", "IP Address" + "\n" + netWifi.NetworkInterface.IPAddress); cyclingDisplay.AddMessage("key2", "Host Name" + "\n" + "cobra"); cyclingDisplay.AddMessage("key3", "SSID" + "\n" + "cobra"); cyclingDisplay.AddMessage("key4", "Key" + "\n" + "12345"); Server.InterfaceAddress = netWifi.NetworkInterface.IPAddress; Server.DhcpService.NameServers = new NameServerCollection(netWifi.NetworkInterface.IPAddress); // start all enabled services Server.StartAll(); cyclingDisplay.StartStopCycle(true); } else { // stop all enabled services Server.StopAll(); cyclingDisplay.StartStopCycle(false); } }
private static void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { if (e.IsAvailable) { NETWORK = true; PosStates(Screen.prices, true); } else { NETWORK = false; int[] display = PosStates(Screen.blank); for (int i = 1; i <= settings.positions; i++) { if (display[i] == 0) { Buttons.Write(i, Cmd.Refresh); } } Buttons.Write(ALL, Cmd.Print, 12, 17, 0, 1, "NETWORK IS NOT"); Buttons.Write(ALL, Cmd.Print, 24, 33, 0, 1, "AVAILABLE"); } }
private void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { // the event might not be from this network interface, so ignore it if it does not represent the current status of this network module if (e.IsAvailable != IsNetworkConnected) return; // also ignore the event if this network module is already in that state (so we don't send events twice to users) if (e.IsAvailable == _networkAvailable) return; if (e.IsAvailable) { if (_useDHCP) { _needDHCP.Set(); } else { _isNetworkUp = true; OnNetworkEvent(this, NetworkState.Up); } } else { _isNetworkUp = false; OnNetworkEvent(this, NetworkState.Down); } _networkAvailable = e.IsAvailable; }
private void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { Debug.Print("network is " + (e.IsAvailable ? "Available" : "Isn't Available")); }
private void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs network) { NetworkAvailability(network.IsAvailable); }
void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { Debug.Print("network " + (e.IsAvailable ? "is available" : "isn't Available")); }
internal static void OnNetworkChangeCallback(NetworkEvent networkEvent) { switch (networkEvent.EventType) { case NetworkEventType.AvailabilityChanged: { if (NetworkAvailabilityChanged != null) { bool isAvailable = ((networkEvent.Flags & (byte)NetworkEventFlags.NetworkAvailable) != 0); NetworkAvailabilityEventArgs args = new NetworkAvailabilityEventArgs(isAvailable); NetworkAvailabilityChanged(null, args); } break; } case NetworkEventType.AddressChanged: { if (NetworkAddressChanged != null) { EventArgs args = new EventArgs(); NetworkAddressChanged(null, args); } break; } default: { break; } } }
private static void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { if (!e.IsAvailable) { HttpSettings.ONLINE = false; if (!INIT) { lcd.Print(0, 104, 2, 4, CommonFunc.StringFill(40, " --------------------------")); lcd.Print(0, 128, 2, 4, CommonFunc.StringFill(40, " | NETWORK IS NOT AVAILABLE |")); lcd.Print(0, 152, 2, 4, CommonFunc.StringFill(40, " --------------------------")); } } else { if (INIT) { HttpSettings.NetworkSettings(true); } else { HttpSettings.ONLINE = true; int screen = (int)lcd.Screen; lcd.Screen = (SCREEN)screen; } } }
void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { networkAvailable = true; }
private void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { Debug.Print(" The network " + (e.IsAvailable ? "is " : "is not ") + "available"); }
/// <summary> /// Event handler to signal that the network is now available. /// </summary> /// <param name="sender"> /// The object that initiated the event. /// </param> /// <param name="networkAvailabilityEventArgs"> /// The event arguments associated with the change in network availability, /// </param> private void OnInternalNetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs networkAvailabilityEventArgs) { if (networkAvailabilityEventArgs.IsAvailable) { m_WaitForNetwork.Set(); } OnInternalNetworkAvailabilityChanged(this, networkAvailabilityEventArgs.IsAvailable); }
static void OnNetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { if (e.IsAvailable) { // update timer immediately when network is available _ntpTimer.Change(TimeSpan.Zero, new TimeSpan(0, ClockUpdateMinutes, 0)); } }