Ejemplo n.º 1
0
 private void ModifyRow(int rowID, string ip, string loc, int max, int min, int avg, int failtime)
 {
     if (dgvMain.InvokeRequired)
     {
         var del = new modifyRow(ModifyRow);
         Invoke(del, new object[] { rowID, ip, loc, max, min, avg, failtime });
     }
     else
     {
         dgvMain.Rows[rowID].Cells[1].Value = string.IsNullOrEmpty(ip) ? I18N.GetString("PingFail") : ip;
         dgvMain.Rows[rowID].Cells[4].Value = max;
         dgvMain.Rows[rowID].Cells[5].Value = min;
         dgvMain.Rows[rowID].Cells[6].Value = avg;
         dgvMain.Rows[rowID].Cells[7].Value = failtime;
         if (!string.IsNullOrEmpty(loc))
         {
             dgvMain.Rows[rowID].Cells[3].Value = loc;
         }
     }
 }
Ejemplo n.º 2
0
 private void ModifyRow(int rowID, string ip, string loc, int max, int min, int avg, int failtime)
 {
     if (dgvMain.InvokeRequired)
     {
         var del = new modifyRow(ModifyRow);
         Invoke(del, new object[] { rowID, ip, loc, max, min, avg, failtime });
     }
     else
     {
         dgvMain.Rows[rowID].Cells[1].Value = string.IsNullOrEmpty(ip) ? I18N.GetString("PingFail") : ip;
         dgvMain.Rows[rowID].Cells[4].Value = max;
         dgvMain.Rows[rowID].Cells[5].Value = min;
         dgvMain.Rows[rowID].Cells[6].Value = avg;
         dgvMain.Rows[rowID].Cells[7].Value = failtime;
         if (!string.IsNullOrEmpty(loc)) dgvMain.Rows[rowID].Cells[3].Value = loc;
     }
 }