Exemple #1
0
 public MapiMailMessage(string subject, string body, MAPIResultDelegate callback)
     : this()
 {
     this._subject = subject;
     this._body = body;
     this._MAPIResultEvent = callback;
 }
Exemple #2
0
 private void MAPIResult(int a_errorCode)
 {
     if (WDS_MainProg.frameWin().InvokeRequired)
     {
         MAPIResultDelegate method = new MAPIResultDelegate(MAPIResult);
         WDS_MainProg.frameWin().Invoke(method, new object[] { a_errorCode });
     }
     else if (a_errorCode == 0)
     {
         MessageBox.Show("Thank you for your feedback, it was sent successfully!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
     else
     {
         string str = "";
         string str2 = "Your feedback was not sent, please contact with\n\rSilicon Laboratories Support at www.silabs.com";
         string str3 = MapiMailMessage.LogErrorMapi(a_errorCode);
         if (str3 != null)
         {
             if (str3 == "MAPI Failure.")
                 str = "Your default e-mail account is bad.";
             else if (str3 == "Unknown MAPI Error")
                 str = "Mail client was not found on this machine.";
             else if (str3 == "Login Failure.")
                 str = "Mail profile (for e-mail accounts) was not found on this machine.";
             else if (str3 == "User Aborted.")
                 str = "The Feedback window was closed without sending the message.";
         }
         MessageBox.Show(str + "\n\r\n\r" + str2, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }