Beispiel #1
0
 /// <summary>
 /// Idling event handler. Ticks every 10 milliseconds while in idle state.
 /// </summary>
 private void _imap_Idling(object sender, ImapIdlingEventArgs e)
 {
     // If the difference between start timer time and the current time >= timeout, initiate stopping idle
     if (DateTime.Now.Subtract(_startTime) >= _timeout)
     {
         _imap.StopIdle();
     }
 }
Beispiel #2
0
        }         // LicenseImap

        /// <summary>
        /// Idling event handler. Ticks every 10 milliseconds while in idle state.
        /// </summary>
        private void imp_Idling(object sender, ImapIdlingEventArgs e)
        {
            try {
                // If the difference between start timer time and the current time >= timeout, initiate stopping idle
                if (DateTime.Now.Subtract(startTime) >= timeout)
                {
                    imp.StopIdle();
                    Info("Initiated stopping idle by TIMER");
                }
            }
            catch (Exception ex) {
                Error("Error occured while in imp_Idling: {0}", ex);
                Info("Trying to reconnect to mailbox");
                SafeDispose();
                ConnectToMailboxLoop();
            }     // try
        }         // imp_Idling