private void ButtonStart_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(this.TextHost.Text.Trim())) { this.TextHost.Focus(); return; } this.TextHost.Text = this.TextHost.Text.Trim(); this.ButtonStart.Enabled = false; this.TextHost.Enabled = false; if (!this.traceRunning) { if (this.tracert == null) { this.tracert = new TraceRoute(); this.tracert.Completed += new EventHandler(this.Tracert_Completed); this.tracert.RouteHopFound += new EventHandler <RouteHopFoundEventArgs>(this.Tracert_RouteHopFound); } tracert.Destination = this.TextHost.Text; tracert.ResolveNames = this.ResolveCheckBox.Checked; tracert.Start(); this.traceRunning = true; } this.hopList = new List <TraceRouteHopData>(); }
private void ButtonStart_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(this.TextHost.Text.Trim())) { this.TextHost.Focus(); return; } this.TextHost.Text = this.TextHost.Text.Trim(); this.ButtonStart.Enabled = false; this.TextHost.Enabled = false; if (!this.traceRunning) { if (this.tracert == null) { this.tracert = new TraceRoute(); this.tracert.Completed += new EventHandler(this.Tracert_Completed); this.tracert.RouteHopFound += new EventHandler<RouteHopFoundEventArgs>(this.Tracert_RouteHopFound); } tracert.Destination = this.TextHost.Text; tracert.ResolveNames = this.ResolveCheckBox.Checked; tracert.Start(); this.traceRunning = true; } this.hopList = new List<TraceRouteHopData>(); }