Stop() public static method

public static Stop ( ) : void
return void
Esempio n. 1
0
 private void OnPowerModeChanged(object sender, PowerModeChangedEventArgs e)
 {
     if (e.Mode == PowerModes.Suspend)
     {
         Imap.Stop();
     }
 }
Esempio n. 2
0
 private void Reconnect(bool checkForNewMails = true)
 {
     try {
         Imap.Stop();
         Imap.Start();
         if (checkForNewMails)
         {
             CheckNewMail();
         }
     } catch (Exception ex) {
         notifyIcon.ShowBalloonTip(500, "Ошибка соединения", ex.Message,
                                   ToolTipIcon.Error);
     }
 }
Esempio n. 3
0
 private void timer_Tick(object sender, EventArgs e)
 {
     if (Util.IsInternetConnected())
     {
         if (Imap.Started())
         {
             UpdateTrayIcon(Imap.GetUnreadCount());
         }
         else
         {
             /* attempt to silently reconnect */
             Reconnect(false);
         }
     }
     else
     {
         /* Stop if not connected to the internet */
         Imap.Stop();
     }
 }
Esempio n. 4
0
 private void OnNetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
 {
     /* Unfortunately this seems unreliable, so whenever network availability changes
      * we disconnect and let the tick event take care of reconnecting */
     Imap.Stop();
 }