Ejemplo n.º 1
0
 public string GetStatusOfPingAtPosition(int x, int y)
 {
     try
     {
         int offset = x - this.Width;
         int start  = StartIndex + DisplayableCount;
         int i      = (start + offset) % pings.Length;
         if (i < 0)
         {
             return("No Data Yet, Mouse ms: " + GetScaledHeightValue(height - y));
         }
         PingLog pingLog = pings[i];
         if (pingLog == null)
         {
             return("Waiting for response, Mouse ms: " + GetScaledHeightValue(height - y));
         }
         if (pingLog.result != SmartPing.IPStatus.Success)
         {
             return(GetTimestamp(pingLog.startTime) + ": " + pingLog.result.ToString() + ", Mouse ms: " + GetScaledHeightValue(height - y));
         }
         return(GetTimestamp(pingLog.startTime) + ": " + pingLog.pingTime + " ms, Mouse ms: " + GetScaledHeightValue(height - y));
     }
     catch (Exception)
     {
         return("Error, Mouse ms: " + (height - y));
     }
 }
Ejemplo n.º 2
0
 public void AddPingLogToSpecificOffset(long offset, PingLog pingLog)
 {
     pings[offset % pings.Length] = pingLog;
     this.Invalidate();
 }
Ejemplo n.º 3
0
 public void AddPingLog(PingLog pingLog)
 {
     pings[NextIndex] = pingLog;
     this.Invalidate();
 }