예제 #1
0
파일: MainForm.cs 프로젝트: djpnewton/ddraw
 private void mailRecipientToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // find filename
     string tempFileName = WorkBookUtils.GetTempFileName(Path.GetFileName(fileName), tempFilesDir, FileExt);
     // save file
     if (_Save(tempFileName))
     {
         // load mail client
         MAPI mapi = new MAPI();
         mapi.AddAttachment(tempFileName);
         mapi.SendMailPopup(string.Format("{0}: {1}", WbLocale.Emailing, Path.GetFileNameWithoutExtension(fileName)), "");
     }
 }
예제 #2
0
파일: MainForm.cs 프로젝트: djpnewton/ddraw
 private void mailRecipientasPDFToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // find filename
     string tempFileName = WorkBookUtils.GetTempFileName(Path.GetFileName(fileName), tempFilesDir, ".pdf");
     try
     {
         WorkBookUtils.RenderPdf(engines, tempFileName);
         // load mail client
         MAPI mapi = new MAPI();
         mapi.AddAttachment(tempFileName);
         mapi.SendMailPopup(string.Format("{0}: {1}", WbLocale.Emailing, Path.GetFileNameWithoutExtension(fileName)), "");
     }
     catch (Exception e2)
     {
         MessageBox.Show(e2.Message, WbLocale.ErrorMailingPDF, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }