private void PingTestThreadError(PingTest ping, String msg) { VPNSERVERITEM item = (VPNSERVERITEM)ping.UserData; Invoke((MethodInvoker) delegate { ListViewItem lvItem = listView1.FindItemWithText(item.raw_ip); if (lvItem != null) { lvItem.SubItems[4].Text = msg; } }); }
private void PingTestThreadStart(PingTest ping) { VPNSERVERITEM item = (VPNSERVERITEM)ping.UserData; Invoke((MethodInvoker) delegate { ListViewItem lvItem = listView1.FindItemWithText(item.raw_ip); if (lvItem != null) { lvItem.SubItems[4].Text = "PING START"; } }); }
private void PingTestThreadFinish(PingTest ping, int pingSpeed) { VPNSERVERITEM item = (VPNSERVERITEM)ping.UserData; Invoke((MethodInvoker) delegate { ListViewItem lvItem = listView1.FindItemWithText(item.raw_ip); if (lvItem != null) { listView1.TopItem = lvItem; lvItem.SubItems[4].Text = "PING FIN"; lvItem.SubItems[3].Text = String.Format("{0}ms", pingSpeed); } }); }