Added Menu Item under help to Create Error Log Email

Put approved PDF in temporary folder for viewing
This commit is contained in:
Rich
2012-04-26 22:04:39 +00:00
parent c16424e008
commit f40cd6817b
2 changed files with 28 additions and 3 deletions

View File

@@ -231,10 +231,11 @@ namespace VEPROMS
buffer = PromsPrinter.WatermarkPDF(args.MyBuffer, args.MyWatermark);
else
buffer = args.MyBuffer;
FileStream fs = new FileStream(args.MyFilename, FileMode.Create);
string fileName = Volian.Base.Library.VlnSettings.TemporaryFolder + "\\" + args.MyFilename;
FileStream fs = new FileStream(fileName, FileMode.Create);
fs.Write(buffer, 0, buffer.Length);
fs.Close();
System.Diagnostics.Process.Start(args.MyFilename);
System.Diagnostics.Process.Start(fileName);
}
void displayHistory_AnnotationRestored(AnnotationInfo restoredAnnotationInfo, ItemInfo currentItem)
@@ -1827,5 +1828,19 @@ namespace VEPROMS
bottomProgBar.Text = args.Status;
}
private void btnSendErrorLog_Click(object sender, EventArgs e)
{
frmSendErrorLog frm = new frmSendErrorLog(Properties.Settings.Default.OutlookEmail, Properties.Settings.Default["SMTPServer"].ToString(), Properties.Settings.Default["SMTPUser"].ToString());
if (frm.ShowDialog(this) == DialogResult.OK)
{
Properties.Settings.Default.OutlookEmail = frm.OutlookEmail;
Properties.Settings.Default.SMTPServer = frm.SMTPServer;
Properties.Settings.Default.SMTPUser = frm.SMTPUser;
Properties.Settings.Default.Save();
MessageBox.Show("PROMS Error Log successfully sent to Volian support");
}
}
}
}