Smrf.NodeXL.ExcelTemplate.EmailExporter.AddAttachmentsAndAlternateHtml C# (CSharp) Method

AddAttachmentsAndAlternateHtml() protected method

protected AddAttachmentsAndAlternateHtml ( MailMessage oMailMessage, Microsoft oWorkbook, NodeXLControl oNodeXLControl, System.Boolean bExportWorkbookAndSettings, System.Boolean bExportGraphML, System.Boolean bUseFixedAspectRatio ) : void
oMailMessage System.Net.Mail.MailMessage
oWorkbook Microsoft
oNodeXLControl Smrf.NodeXL.Visualization.Wpf.NodeXLControl
bExportWorkbookAndSettings System.Boolean
bExportGraphML System.Boolean
bUseFixedAspectRatio System.Boolean
return void
    AddAttachmentsAndAlternateHtml
    (
        MailMessage oMailMessage,
        Microsoft.Office.Interop.Excel.Workbook oWorkbook,
        NodeXLControl oNodeXLControl,
        Boolean bExportWorkbookAndSettings,
        Boolean bExportGraphML,
        Boolean bUseFixedAspectRatio
    )
    {
        Debug.Assert(oMailMessage != null);
        Debug.Assert(oWorkbook != null);
        Debug.Assert(oNodeXLControl != null);

        Debug.Assert(oNodeXLControl.ActualWidth >=
            GraphExporterUtil.MinimumNodeXLControlWidth);

        Debug.Assert(oNodeXLControl.ActualHeight >=
            GraphExporterUtil.MinimumNodeXLControlHeight);

        AssertValid();

        String sSuggestedFileNameNoExtension =
            GetSuggestedFileNameNoExtension(oWorkbook);

        String sGraphMLFileNameNoExtension =
            sSuggestedFileNameNoExtension + "-GraphML";

        Byte [] abtFullSizeImage, abtThumbnail, abtWorkbookContents,
            abtGraphMLZipped;

        String sWorkbookSettings;

        GraphExporterUtil.GetDataToExport(oWorkbook, oNodeXLControl,
            bExportWorkbookAndSettings, bExportGraphML,
            Path.ChangeExtension(sGraphMLFileNameNoExtension, "xml"),
            bUseFixedAspectRatio, out abtFullSizeImage, out abtThumbnail,
            out abtWorkbookContents, out sWorkbookSettings,
            out abtGraphMLZipped);

        AddAttachments(oMailMessage, sSuggestedFileNameNoExtension,
            sGraphMLFileNameNoExtension, abtFullSizeImage, abtWorkbookContents,
            sWorkbookSettings, abtGraphMLZipped);

        AddAlternateHtml(oMailMessage, abtFullSizeImage);
    }