Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. for (i = 0; i < nb; i++)
  2. {
  3.  
  4. adresse = tableau_IP_recuperees[i];
  5. reponse_Au_Ping = PingAdresse(adresse);
  6.  
  7. if (reponse_Au_Ping.Status == IPStatus.Success)
  8. {
  9.  
  10. string output = "Ping " + reponse_Au_Ping.Status + " : ";
  11. output += "L'hôte " + tableau_IP_recuperees[i] + " est accessible" + " ( Latence = " + reponse_Au_Ping.RoundtripTime + " ms )\r\n";
  12.  
  13. rtxtbox_resultat_ping_fichier.SelectionColor = Color.Green;
  14. rtxtbox_resultat_ping_fichier.SelectedText = output;
  15.  
  16. //rtxtbox_resultat_ping_fichier.ForeColor = Color.Green;
  17.  
  18. //rtxtbox_resultat_ping_fichier.Text += "Ping " + reponse_Au_Ping.Status + " : ";
  19. //rtxtbox_resultat_ping_fichier.Text += "L'hôte " + tableau_IP_recuperees[i] + " est accessible" + " ( Latence = " + reponse_Au_Ping.RoundtripTime + " ms )\r\n";
  20. //rtxtbox_resultat_ping_fichier.ForeColor = Color.Black;
  21. }
  22. else
  23. {
  24. rtxtbox_resultat_ping_fichier.ForeColor = Color.Red;
  25. rtxtbox_resultat_ping_fichier.Text += "Ping " + reponse_Au_Ping.Status + " : ";
  26. rtxtbox_resultat_ping_fichier.Text += "L'hôte " + tableau_IP_recuperees[i] + " n'est pas accessible\n";
  27. //rtxtbox_resultat_ping_fichier.SelectionColor = Color.Black;
  28. }
  29. }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement