コード例 #1
0
        //*************************************************************************
        //  Constructor: CreateSubgraphImagesDialog()
        //
        /// <overloads>
        /// Initializes a new instance of the <see
        /// cref="CreateSubgraphImagesDialog" /> class.
        /// </overloads>
        ///
        /// <summary>
        /// Initializes a new instance of the <see
        /// cref="CreateSubgraphImagesDialog" /> class with a workbook.
        /// </summary>
        ///
        /// <param name="workbook">
        /// Workbook containing the graph data.
        /// </param>
        ///
        /// <param name="selectedVertexNames">
        /// Collection of zero or more vertex names corresponding to the selected
        /// rows in the vertex worksheet.  Can't be null.
        /// </param>
        ///
        /// <param name="mode">
        /// Indicates the mode in which the dialog is being used.
        /// </param>
        //*************************************************************************

        public CreateSubgraphImagesDialog
        (
            Microsoft.Office.Interop.Excel.Workbook workbook,
            ICollection <String> selectedVertexNames,
            DialogMode mode
        )
            : this()
        {
            Debug.Assert(workbook != null);
            Debug.Assert(selectedVertexNames != null);

            m_oWorkbook            = workbook;
            m_oSelectedVertexNames = selectedVertexNames;
            m_eMode = mode;

            // 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_oCreateSubgraphImagesDialogUserSettings =
                new CreateSubgraphImagesDialogUserSettings(this);

            m_oSubgraphImageCreator = new SubgraphImageCreator();

            m_oSubgraphImageCreator.ImageCreationProgressChanged +=
                new ProgressChangedEventHandler(
                    SubgraphImageCreator_ImageCreationProgressChanged);

            m_oSubgraphImageCreator.ImageCreationCompleted +=
                new RunWorkerCompletedEventHandler(
                    SubgraphImageCreator_ImageCreationCompleted);

            m_eState = DialogState.Idle;

            DoDataExchange(false);

            AssertValid();
        }
コード例 #2
0
        //*************************************************************************
        //  Constructor: CreateSubgraphImagesDialog()
        //
        /// <overloads>
        /// Initializes a new instance of the <see
        /// cref="CreateSubgraphImagesDialog" /> class.
        /// </overloads>
        ///
        /// <summary>
        /// Initializes a new instance of the <see
        /// cref="CreateSubgraphImagesDialog" /> class with a workbook.
        /// </summary>
        ///
        /// <param name="workbook">
        /// Workbook containing the graph data.
        /// </param>
        ///
        /// <param name="selectedVertexNames">
        /// Collection of zero or more vertex names corresponding to the selected
        /// rows in the vertex worksheet.  Can't be null.
        /// </param>
        ///
        /// <param name="mode">
        /// Indicates the mode in which the dialog is being used.
        /// </param>
        //*************************************************************************
        public CreateSubgraphImagesDialog(
            Microsoft.Office.Interop.Excel.Workbook workbook,
            ICollection<String> selectedVertexNames,
            DialogMode mode
            )
            : this()
        {
            Debug.Assert(workbook != null);
            Debug.Assert(selectedVertexNames != null);

            m_oWorkbook = workbook;
            m_oSelectedVertexNames = selectedVertexNames;
            m_eMode = mode;

            // 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_oCreateSubgraphImagesDialogUserSettings =
            new CreateSubgraphImagesDialogUserSettings(this);

            m_oSubgraphImageCreator = new SubgraphImageCreator();

            m_oSubgraphImageCreator.ImageCreationProgressChanged +=
            new ProgressChangedEventHandler(
                SubgraphImageCreator_ImageCreationProgressChanged);

            m_oSubgraphImageCreator.ImageCreationCompleted +=
            new RunWorkerCompletedEventHandler(
                SubgraphImageCreator_ImageCreationCompleted);

            m_eState = DialogState.Idle;

            DoDataExchange(false);

            AssertValid();
        }