상속: Smrf.AppLib.FormSettings
예제 #1
0
        //*************************************************************************
        //  Constructor: ReadabilityMetricsDialog()
        //
        /// <summary>
        /// Initializes a new instance of the <see
        /// cref="ReadabilityMetricsDialog" /> class.
        /// </summary>
        ///
        /// <param name="nodeXLControl">
        /// NodeXLControl containing the graph.
        /// </param>
        ///
        /// <param name="workbook">
        /// Workbook containing the graph data.
        /// </param>
        //*************************************************************************

        public ReadabilityMetricsDialog
        (
            NodeXLControl nodeXLControl,
            Microsoft.Office.Interop.Excel.Workbook workbook
        )
        {
            InitializeComponent();

            m_oNodeXLControl = nodeXLControl;
            m_oWorkbook      = workbook;
            m_oReadabilityMetricUserSettings = new ReadabilityMetricUserSettings();

            // 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_oReadabilityMetricsDialogUserSettings =
                new ReadabilityMetricsDialogUserSettings(this);

            DoDataExchange(false);

            m_oNodeXLControl.VerticesMoved +=
                new VerticesMovedEventHandler(this.OnVerticesMoved);

            m_oNodeXLControl.GraphLaidOut +=
                new AsyncCompletedEventHandler(this.OnGraphLaidOut);

            AssertValid();
        }
    //*************************************************************************
    //  Constructor: ReadabilityMetricsDialog()
    //
    /// <summary>
    /// Initializes a new instance of the <see
    /// cref="ReadabilityMetricsDialog" /> class.
    /// </summary>
    ///
    /// <param name="nodeXLControl">
    /// NodeXLControl containing the graph.
    /// </param>
    ///
    /// <param name="workbook">
    /// Workbook containing the graph data.
    /// </param>
    //*************************************************************************

    public ReadabilityMetricsDialog
    (
        NodeXLControl nodeXLControl,
        Microsoft.Office.Interop.Excel.Workbook workbook
    )
    {
        InitializeComponent();

        m_oNodeXLControl = nodeXLControl;
        m_oWorkbook = workbook;
        m_oReadabilityMetricUserSettings = new ReadabilityMetricUserSettings();

        // 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_oReadabilityMetricsDialogUserSettings =
            new ReadabilityMetricsDialogUserSettings(this);

        DoDataExchange(false);

        m_oNodeXLControl.VerticesMoved +=
            new VerticesMovedEventHandler(this.OnVerticesMoved);

        m_oNodeXLControl.GraphLaidOut +=
            new AsyncCompletedEventHandler(this.OnGraphLaidOut);

        AssertValid();
    }