static NetworkHelper() { instance = new NetworkHelper(); }
/// <summary> /// 显示网络状态 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void networkHelp_NetworkStatusChanged(object sender, NetworkHelper.NetworkChangedEventArgs e) { if (e.IsNetworkAlive) labNetStatus.Text = "网络状态正常"; else labNetStatus.Text = "网络连接失败"; }