private void button1_Click(object sender, EventArgs e) { this.button1.Enabled = false; this.textBox1.Enabled = false; PingList = new List <PingUpdate>(); if (ping == null) { ping = new Metro.TransportLayer.Icmp.IcmpPingManager(nil.Interfaces[0].Address); ping.PingReply += new Metro.TransportLayer.Icmp.IcmpPingReplyHandler(ping_PingReply); ping.PingTimeout += new Metro.TransportLayer.Icmp.IcmpPingTimeOutHandler(ping_PingTimeout); } if (!pingRunning) { pingRunning = true; pingReady = false; SendPing(); } }
private void button1_Click(object sender, EventArgs e) { this.button1.Enabled = false; this.textBox1.Enabled = false; PingList = new List<PingUpdate>(); if (ping == null) { ping = new Metro.TransportLayer.Icmp.IcmpPingManager(nil.Interfaces[0].Address); ping.PingReply += new Metro.TransportLayer.Icmp.IcmpPingReplyHandler(ping_PingReply); ping.PingTimeout += new Metro.TransportLayer.Icmp.IcmpPingTimeOutHandler(ping_PingTimeout); } if (!pingRunning) { pingRunning = true; pingReady = false; SendPing(); } }