/// <summary> /// Helper Method for creating an Email with Image Attachment /// </summary> /// <param name="image">The image to send</param> /// <param name="captureDetails">ICaptureDetails</param> public static void SendImage(ISurface surface, ICaptureDetails captureDetails) { string tmpFile = ImageOutput.SaveNamedTmpFile(surface, captureDetails, new SurfaceOutputSettings()); if (tmpFile != null) { // Store the list of currently active windows, so we can make sure we show the email window later! List <WindowDetails> windowsBefore = WindowDetails.GetVisibleWindows(); // Fallback to MAPI // Send the email SendImage(tmpFile, captureDetails); WindowDetails.ActiveNewerWindows(windowsBefore); } }
/// <summary> /// Helper Method for creating an Email with Image Attachment /// </summary> /// <param name="surface">The image to send</param> /// <param name="captureDetails">ICaptureDetails</param> public static void SendImage(ISurface surface, ICaptureDetails captureDetails) { var tmpFile = ImageOutput.SaveNamedTmpFile(surface, captureDetails, new SurfaceOutputSettings()); if (tmpFile != null) { // Store the list of currently active windows, so we can make sure we show the email window later! //bool isEmailSend = false; //if (EmailConfigHelper.HasOutlook() && (CoreConfig.OutputEMailFormat == EmailFormats.Html || CoreConfig.OutputEMailFormat == EmailFormats.Text)) { // isEmailSend = OutlookExporter.ExportToOutlook(tmpFile, captureDetails); //} if (/*!isEmailSend &&*/ EmailConfigHelper.HasMapi()) { // Fallback to MAPI // Send the email SendImage(tmpFile, captureDetails.Title); } } }
/// <summary> /// Helper Method for creating an Email with Image Attachment /// </summary> /// <param name="surface">The image to send</param> /// <param name="captureDetails">ICaptureDetails</param> public static void SendImage(ISurface surface, ICaptureDetails captureDetails) { string tmpFile = ImageOutput.SaveNamedTmpFile(surface, captureDetails, new SurfaceOutputSettings()); if (tmpFile != null) { // Store the list of currently active windows, so we can make sure we show the email window later! var windowsBefore = WindowDetails.GetVisibleWindows(); //bool isEmailSend = false; //if (EmailConfigHelper.HasOutlook() && (CoreConfig.OutputEMailFormat == EmailFormat.OUTLOOK_HTML || CoreConfig.OutputEMailFormat == EmailFormat.OUTLOOK_TXT)) { // isEmailSend = OutlookExporter.ExportToOutlook(tmpFile, captureDetails); //} if (/*!isEmailSend &&*/ EmailConfigHelper.HasMapi()) { // Fallback to MAPI // Send the email SendImage(tmpFile, captureDetails.Title); } WindowDetails.ActiveNewerWindows(windowsBefore); } }
/// <summary> /// Helper Method for creating an Email with Image Attachment /// </summary> /// <param name="image">The image to send</param> /// <param name="captureDetails">ICaptureDetails</param> public static void SendImage(Image image, ICaptureDetails captureDetails) { string tmpFile = ImageOutput.SaveNamedTmpFile(image, captureDetails, conf.OutputFileFormat, conf.OutputFileJpegQuality, conf.OutputFileReduceColors); if (tmpFile != null) { // Store the list of currently active windows, so we can make sure we show the email window later! List <WindowDetails> windowsBefore = WindowDetails.GetVisibleWindows(); bool isEmailSend = false; //if (EmailConfigHelper.HasOutlook() && (conf.OutputEMailFormat == EmailFormat.OUTLOOK_HTML || conf.OutputEMailFormat == EmailFormat.OUTLOOK_TXT)) { // isEmailSend = OutlookExporter.ExportToOutlook(tmpFile, captureDetails); //} if (!isEmailSend && EmailConfigHelper.HasMAPI()) { // Fallback to MAPI // Send the email SendImage(tmpFile, captureDetails.Title); } WindowDetails.ActiveNewerWindows(windowsBefore); } }
public string SaveNamedTmpFile(Image image, ICaptureDetails captureDetails, OutputFormat outputFormat, int quality, bool reduceColors) { return(ImageOutput.SaveNamedTmpFile(image, captureDetails, outputFormat, quality, reduceColors)); }