Exemple #1
0
 private void tmrCheckInternet_Tick(object sender, EventArgs e)
 {
     this.tmrCheckInternet.Stop();
     this._checkInternetThread = new Thread(delegate()
     {
         if (TwitterDownloader.CheckForInternetConnection())
         {
             this.btnStart.Enabled = true;
             this.tbUserName.Focus();
             new Thread(delegate()
             {
                 Thread.Sleep(10000);
                 if (this._isAutoStart)
                 {
                     this.btnStart.Invoke(new MethodInvoker(delegate { this.btnStart.PerformClick(); }));
                 }
             }).Start();
         }
         else
         {
             this.tmrCheckInternet.Interval = 5000;
             MessageBox.Show(strings.UnableAccess, strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
             this.tmrCheckInternet.Start();
         }
     })
     {
         Priority = ThreadPriority.Lowest
     };
     this._checkInternetThread.Start();
 }