ExportToNodeXLGraphGallery() public method

public ExportToNodeXLGraphGallery ( Microsoft workbook, NodeXLControl nodeXLControl, String title, String description, String spaceDelimitedTags, String author, String password, System.Boolean exportWorkbookAndSettings, System.Boolean exportGraphML, System.Boolean useFixedAspectRatio ) : void
workbook Microsoft
nodeXLControl Smrf.NodeXL.Visualization.Wpf.NodeXLControl
title String
description String
spaceDelimitedTags String
author String
password String
exportWorkbookAndSettings System.Boolean
exportGraphML System.Boolean
useFixedAspectRatio System.Boolean
return void
コード例 #1
0
        btnOK_Click
        (
            object sender,
            EventArgs e
        )
        {
            AssertValid();

            if (!DoDataExchange(true))
            {
                return;
            }

            if (m_eMode == DialogMode.Normal)
            {
                NodeXLGraphGalleryExporter oNodeXLGraphGalleryExporter =
                    new NodeXLGraphGalleryExporter();

                this.Cursor = Cursors.WaitCursor;

                try
                {
                    Debug.Assert(m_oNodeXLControl != null);

                    oNodeXLGraphGalleryExporter.ExportToNodeXLGraphGallery(

                        m_oWorkbook, m_oNodeXLControl,

                        txbTitle.Text,
                        txbDescription.Text,

                        m_oExportToNodeXLGraphGalleryUserSettings.
                        SpaceDelimitedTags,

                        m_oExportToNodeXLGraphGalleryUserSettings.Author,

                        m_oExportToNodeXLGraphGalleryUserSettings.UseCredentials
                        ? m_oPasswordUserSettings.NodeXLGraphGalleryPassword
                        : null,

                        m_oExportToNodeXLGraphGalleryUserSettings.
                        ExportWorkbookAndSettings,

                        m_oExportToNodeXLGraphGalleryUserSettings.ExportGraphML,

                        m_oExportToNodeXLGraphGalleryUserSettings
                        .UseFixedAspectRatio
                        );
                }
                catch (Exception oException)
                {
                    String sMessage;

                    if (NodeXLGraphGalleryExceptionHandler
                        .TryGetMessageForRecognizedException(oException,
                                                             out sMessage)
                        )
                    {
                        this.ShowWarning(sMessage);
                    }
                    else
                    {
                        ErrorUtil.OnException(oException);
                    }

                    return;
                }
                finally
                {
                    this.Cursor = Cursors.Default;
                }
            }

            m_oExportToNodeXLGraphGalleryUserSettings.Save();
            m_oPasswordUserSettings.Save();

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
コード例 #2
0
    btnOK_Click
    (
        object sender,
        EventArgs e
    )
    {
        AssertValid();

        if ( !DoDataExchange(true) )
        {
            return;
        }

        if (m_eMode == DialogMode.Normal)
        {
            NodeXLGraphGalleryExporter oNodeXLGraphGalleryExporter =
                new NodeXLGraphGalleryExporter();

            this.Cursor = Cursors.WaitCursor;

            try
            {
                Debug.Assert(m_oNodeXLControl != null);

                oNodeXLGraphGalleryExporter.ExportToNodeXLGraphGallery(

                    m_oWorkbook, m_oNodeXLControl,
                    m_oExportToNodeXLGraphGalleryUserSettings.Title,
                    m_oExportToNodeXLGraphGalleryUserSettings.Description,

                    m_oExportToNodeXLGraphGalleryUserSettings.
                        SpaceDelimitedTags,

                    m_oExportToNodeXLGraphGalleryUserSettings.Author,

                    m_oExportToNodeXLGraphGalleryUserSettings.UseCredentials
                        ? m_oPasswordUserSettings.NodeXLGraphGalleryPassword
                        : null,

                    m_oExportToNodeXLGraphGalleryUserSettings.
                        ExportWorkbookAndSettings,

                    m_oExportToNodeXLGraphGalleryUserSettings.ExportGraphML,

                    m_oExportToNodeXLGraphGalleryUserSettings
                        .UseFixedAspectRatio
                    );
            }
            catch (Exception oException)
            {
                String sMessage;

                if (NodeXLGraphGalleryExceptionHandler
                    .TryGetMessageForRecognizedException(oException,
                        out sMessage)
                    )
                {
                    this.ShowWarning(sMessage);
                }
                else
                {
                    ErrorUtil.OnException(oException);
                }

                return;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }

        m_oExportToNodeXLGraphGalleryUserSettings.Save();
        m_oPasswordUserSettings.Save();

        this.DialogResult = DialogResult.OK;
        this.Close();
    }