From 4c9c5d19ba22a16635ae5298c25fbcf45ecc80d4 Mon Sep 17 00:00:00 2001 From: xxe Date: Sat, 8 Oct 2022 09:40:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8C=E7=BD=91=E7=BB=9C=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HKCardOUT/Bootstrapper.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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("系统已离线,请连接网络!!!"); } }