Пример #1
0
 public void setPing(string ip, int ping)
 {
     if (serverList.InvokeRequired)
     {
         setPingCallback d = new setPingCallback(setPing);
         this.Invoke(d, new object[] { ip, ping });
     }
     else
     {
         var founditem = serverList.Items.Find(ip, false);
         if (founditem.Length > 0 && founditem.Length < 2)
         {
             if (founditem[0].SubItems.Count < 7)
             {
                 founditem[0].SubItems.Add("");
                 founditem[0].SubItems.Add("");
                 founditem[0].SubItems.Add("");
                 founditem[0].SubItems.Add("");
                 founditem[0].SubItems.Add(ping.ToString());
                 founditem[0].SubItems.Add("");
             }
             else
             {
                 founditem[0].SubItems[6].Text = ping.ToString();
             }
         }
     }
 }
Пример #2
0
 public void setPing(string ip, int ping)
 {
     if (serverList.InvokeRequired)
     {
         setPingCallback d = new setPingCallback(setPing);
         this.Invoke(d, new object[] { ip, ping });
     }
     else
     {
         var founditem = serverList.Items.Find(ip, false);
         if (founditem.Length > 0 && founditem.Length < 2)
         {
             if (founditem[0].SubItems.Count < 7)
             {
                 founditem[0].SubItems.Add("");
                 founditem[0].SubItems.Add("");
                 founditem[0].SubItems.Add("");
                 founditem[0].SubItems.Add("");
                 founditem[0].SubItems.Add(ping.ToString());
                 founditem[0].SubItems.Add("");
             }
             else
             {
                 founditem[0].SubItems[6].Text = ping.ToString();
             }
         }
     }
 }