日期:2014-05-17 浏览次数:21151 次
private void hexing_check_Click(object sender, EventArgs e)
{
hexing_date.Rows.Clear();
hexing_name_select();
hexing_time.Enabled = true;
}
private void hexing_time_Tick(object sender, EventArgs e)
{
z++;
hexing_time.Tick += new EventHandler(hexing_click_select);
}
public void hexing_name_select()
{
hexing_line hexing = new hexing_line();
for (int i = 0; i < hexing.hexing_name.Count(); i++)
{
hexing_date.Rows.Add();
hexing_date.Rows[i].Cells[0].Value = hexing.hexing_name[i];
hexing_date.Rows[i].Cells[1].Value = hexing.hexing_ip[i];
}
}
public void hexing_thread()
{
int line_count = hexing_date.RowCount;//统计datagridview有多少行,就在下面设置多个线程
Thread[] line_PING = new Thread[line_count];
for (int a = 0; a < line_count; a++)
{
line_PING[a] = new Thread(new ParameterizedThreadStart(hexing_ping));
line_PING[a].Start(a);
}
}
public void hexing_ping(object obj)
{
&