Ejemplo n.º 1
0
 private void backgroundWorker2_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
 {
     if (IsAvailable.Available())
     {
         stonline.Text = "Online";
     }
     if (!IsAvailable.Available())
     {
         stonline.Text = "Offline";
     }
 }
Ejemplo n.º 2
0
 public Form1()
 {
     InitializeComponent();
     //   textBox3.Text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "iFilmer\\Posters\\");
     if (!IsAvailable.Available())
     {
         DialogResult dr = MessageBox.Show("Internet connection not availible", "Error", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Exclamation);
         if (dr == DialogResult.Abort)
         {
             Environment.Exit(0);
         }
         else if (dr == DialogResult.Retry)
         {
             System.Diagnostics.Process.Start(Application.ExecutablePath);
             Environment.Exit(0);
         }
     }
     else
     {
         stonline.Text = "Online";
     }
 }