Browse Source

双网络检查

Lishi
xxe 2 years ago
parent
commit
4c9c5d19ba
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      HKCardOUT/Bootstrapper.cs

+ 5
- 5
HKCardOUT/Bootstrapper.cs View File

@@ -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("系统已离线,请连接网络!!!");
}
}


Loading…
Cancel
Save