private void SendPing(string ip) { if (!string.IsNullOrEmpty(ip)) { btnPingPrimary.Enabled = btnPingSecondary.Enabled = false; TaskEx.Run(() => { PingResult pingResult = PingHelper.PingHost(ip); MessageBox.Show(pingResult.ToString(), "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information); }, () => { btnPingPrimary.Enabled = btnPingSecondary.Enabled = true; }); } }
private void SendPing(string ip) { if (!string.IsNullOrEmpty(ip)) { btnPingPrimary.Enabled = btnPingSecondary.Enabled = false; TaskEx.Run(() => { PingResult pingResult = PingHelper.PingHost(ip); this.nc.ShowBalloonTip(5000, "状态完成", pingResult.ToString(), ToolTipIcon.Info); //MessageBox.Show(pingResult.ToString(), "Menglolita Host", MessageBoxButtons.OK, MessageBoxIcon.Information); }, () => { btnPingPrimary.Enabled = btnPingSecondary.Enabled = true; }); } }