Example #1
0
 private void CheckInternetConnection()
 {
     while (true)
     {
         if (!Extentions.ConnectionAvailable("http://bing.com"))
         {
             var res = MessageBox.Show("Problem with internet, retry?", "No Internet",
                                       MessageBoxButton.OKCancel, MessageBoxImage.Asterisk);
             if (res == MessageBoxResult.Cancel)
             {
                 Close();
             }
         }
         else
         {
             break;
         }
     }
 }