namespace My
{
internal partial class MyApplication
{
private void MyApplication_NetworkAvailabilityChanged(object sender, Microsoft.VisualBasic.Devices.NetworkAvailableEventArgs e)
{
if (e.IsNetworkAvailable) {
Diagnostics.Debug.WriteLine("Network went up.");
} else {
Diagnostics.Debug.WriteLine("Network went down.");
}
}
public MyApplication()
{
NetworkAvailabilityChanged += MyApplication_NetworkAvailabilityChanged;
}
}
}
No comments:
Post a Comment