diff --git a/HKCardOUT/Bootstrapper.cs b/HKCardOUT/Bootstrapper.cs index e93d4fc..5dc6577 100644 --- a/HKCardOUT/Bootstrapper.cs +++ b/HKCardOUT/Bootstrapper.cs @@ -28,13 +28,13 @@ namespace HKCardOUT { try { - bool network = PingHelper.PingTest(); + bool ping = PingHelper.PingTest(); //1.检测网络上下线 - //bool network = HKHelpers.GetInstance().GetNetworkState(); - if (network != DataBus.NetWordState) + bool network = HKHelpers.GetInstance().GetNetworkState(); + if (ping&& network!= DataBus.NetWordState) { - DataBus.NetWordState = network; - if (network) HandyControl.Controls.Growl.InfoGlobal("网络连接成功"); + DataBus.NetWordState = network&& ping; + if (DataBus.NetWordState) HandyControl.Controls.Growl.InfoGlobal("网络连接成功"); else HandyControl.Controls.Growl.InfoGlobal("系统已离线,请连接网络!!!"); } }