예제 #1
0
        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;
                }
            });
        }
예제 #2
0
        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";
                }
            });
        }
예제 #3
0
        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);
                }
            });
        }