private void wifi_WirelessConnectivityChanged(object sender, WiFiRS9110.WirelessConnectivityEventArgs e) { Debug.Print("Network Availability Event Triggered"); if (wifi.IsActivated) // make sure that the event is fired by WiFi interface, not other networking interface. { if (e.IsConnected) { if (wifi.IsLinkConnected) { //blocker.Set(); Debug.Print("WiFi connection was established!"); if (Started != null) { Started(this, EventArgs.Empty); } } } else { if (!wifi.IsLinkConnected) { //blocker.Set(); Debug.Print("WiFi connection was dropped or disconnected!"); if (Stopped != null) { Stopped(this, EventArgs.Empty); } } } } }
private void Interface_WirelessConnectivityChanged(object sender, WiFiRS9110.WirelessConnectivityEventArgs e) { Debug.Print("WiFi connectivity changed, new SSID: " + e.NetworkInformation.SSID.ToString()); Hashtable data = new Hashtable(); data.Add("wifi-ssid", e.NetworkInformation.SSID.ToString()); SendData(data); GetDateTime(); }