예제 #1
0
        //*************************************************************************
        //  Constructor: ImportFromMatrixWorkbookDialog()
        //
        /// <summary>
        /// Initializes a new instance of the <see
        /// cref="ImportFromMatrixWorkbookDialog" /> class.
        /// </summary>
        ///
        /// <param name="destinationNodeXLWorkbook">
        /// Workbook to which the matrix workbook will eventually be imported.
        /// This class does NOT import the graph into the destination workbook, but
        /// it needs to know the destination to prevent the user from selecting
        /// it as a source workbook.
        /// </param>
        //*************************************************************************

        public ImportFromMatrixWorkbookDialog
        (
            Microsoft.Office.Interop.Excel.Workbook destinationNodeXLWorkbook
        )
        {
            InitializeComponent();

            // Instantiate an object that saves and retrieves the user settings for
            // this dialog.  Note that the object automatically saves the settings
            // when the form closes.

            m_oImportFromMatrixWorkbookDialogUserSettings =
                new ImportFromMatrixWorkbookDialogUserSettings(this);

            m_oGraph = null;
            m_oDestinationNodeXLWorkbook = destinationNodeXLWorkbook;

            lbxSourceWorkbook.PopulateWithOtherWorkbookNames(
                m_oDestinationNodeXLWorkbook);

            DoDataExchange(false);

            AssertValid();
        }
    //*************************************************************************
    //  Constructor: ImportFromMatrixWorkbookDialog()
    //
    /// <summary>
    /// Initializes a new instance of the <see
    /// cref="ImportFromMatrixWorkbookDialog" /> class.
    /// </summary>
    ///
    /// <param name="destinationNodeXLWorkbook">
    /// Workbook to which the matrix workbook will eventually be imported.
    /// This class does NOT import the graph into the destination workbook, but
    /// it needs to know the destination to prevent the user from selecting
    /// it as a source workbook.
    /// </param>
    //*************************************************************************

    public ImportFromMatrixWorkbookDialog
    (
        Microsoft.Office.Interop.Excel.Workbook destinationNodeXLWorkbook
    )
    {
        InitializeComponent();

        // Instantiate an object that saves and retrieves the user settings for
        // this dialog.  Note that the object automatically saves the settings
        // when the form closes.

        m_oImportFromMatrixWorkbookDialogUserSettings =
            new ImportFromMatrixWorkbookDialogUserSettings(this);

        m_oGraph = null;
        m_oDestinationNodeXLWorkbook = destinationNodeXLWorkbook;

        lbxSourceWorkbook.PopulateWithOtherWorkbookNames(
            m_oDestinationNodeXLWorkbook);

        DoDataExchange(false);

        AssertValid();
    }