Exemplo n.º 1
0
 private static void Timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     foreach (var url in urls)
     {
         if (ConnectionChecker.ConnectionCheck(url))
         {
             Console.WriteLine(string.Format("the site {0} is up ", url));
         }
         else
         {
             Console.WriteLine(string.Format("the site {0} is down ", url));
         }
     }
     Console.WriteLine("*******************************");
 }
Exemplo n.º 2
0
 private void Timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     string[] urls = urlprovider.geturls();
     foreach (var url in urls)
     {
         if (ConnectionChecker.ConnectionCheck(url))
         {
             RTxtDisplay.Text += string.Format("site {0} is up \n ", url);
         }
         else
         {
             RTxtDisplay.Text += string.Format("site {0} is down \n ", url);
         }
     }
     RTxtDisplay.Text += "******************* \n";
 }