/// <summary>
 /// Handles the window closing event.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="System.ComponentModel.CancelEventArgs"/> instance containing the event data.</param>
 private void HandleWindowClosing(object sender, CancelEventArgs e)
 {
     e.Cancel = false;
     m_Context.ExitThread();
 }
 private static void MailItem_onClose(ref bool Cancel)
 {
     _context.ExitThread();
 }
 public static void stop()
 {
     server.close();
     app_ctx.ExitThread();
 }