Smrf.NodeXL.ExcelTemplate.SaveGraphImageFileDialog.ShowDialogAndSaveGraphImage C# (CSharp) Method

ShowDialogAndSaveGraphImage() public method

public ShowDialogAndSaveGraphImage ( NodeXLControl nodeXLControl, Int32 width, Int32 height, String headerText, String footerText, System headerFooterFont, IEnumerable legendControls ) : DialogResult
nodeXLControl Smrf.NodeXL.Visualization.Wpf.NodeXLControl
width System.Int32
height System.Int32
headerText String
footerText String
headerFooterFont System
legendControls IEnumerable
return DialogResult
    ShowDialogAndSaveGraphImage
    (
        NodeXLControl nodeXLControl,
        Int32 width,
        Int32 height,
        String headerText,
        String footerText,
        System.Drawing.Font headerFooterFont,
        IEnumerable<LegendControlBase> legendControls
    )
    {
        Debug.Assert(nodeXLControl != null);
        Debug.Assert(width > 0);
        Debug.Assert(height > 0);
        Debug.Assert(headerFooterFont != null);
        Debug.Assert(legendControls != null);
        AssertValid();

        // Let the base class do most of the work.  The actual saving will be
        // done by SaveObject() in this class.  Wrap the information required
        // by SaveObject().

        GraphImageInfo oGraphImageInfo = new GraphImageInfo();

        oGraphImageInfo.NodeXLControl = nodeXLControl;
        oGraphImageInfo.Width = width;
        oGraphImageInfo.Height = height;
        oGraphImageInfo.HeaderText = headerText;
        oGraphImageInfo.FooterText = footerText;
        oGraphImageInfo.HeaderFooterFont = headerFooterFont;
        oGraphImageInfo.LegendControls = legendControls;

        return ( ShowDialogAndSaveObject(oGraphImageInfo) );
    }