Exemplo n.º 1
0
 /// <summary>
 /// Raises the SendAsyncCompleted event.
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnSendAsyncCompleted(SendAsyncCompletedEventArgs e)
 {
     if (SendAsyncCompleted == null)
     {
         return;
     }
     SendAsyncCompleted(this, e);
 }
Exemplo n.º 2
0
        private void SendAsyncWorker(object args)
        {
            var sendArgs = args as SendAsyncThreadArgs;
            SendAsyncCompletedEventArgs e;

            try
            {
                var status = MAPI32.SendMail(this, sendArgs.ShowDialog);
                e = new SendAsyncCompletedEventArgs(status);
            }
            catch (Exception ex)
            {
                e = new SendAsyncCompletedEventArgs(ex);
            }
            finally
            {
                IsSending = false;
            }

            sendArgs.Operation.PostOperationCompleted(mSendAsyncCompleteCallback, e);
        }