상속: Smrf.AppLib.FormSettings
예제 #1
0
        //*************************************************************************
        //  Constructor: AutomateTasksDialog()
        //
        /// <summary>
        /// Initializes a new instance of the <see cref="AutomateTasksDialog" />
        /// class.
        /// </summary>
        ///
        /// <param name="mode">
        /// Indicates the mode in which the dialog is being used.
        /// </param>
        ///
        /// <param name="thisWorkbook">
        /// Workbook containing the graph contents.
        /// </param>
        ///
        /// <param name="nodeXLControl">
        /// The NodeXLControl object.  This can be null if <paramref name="mode" />
        /// is <see cref="DialogMode.EditOnly" />.
        /// </param>
        //*************************************************************************

        public AutomateTasksDialog
        (
            DialogMode mode,
            ThisWorkbook thisWorkbook,
            NodeXLControl nodeXLControl
        )
        {
            Debug.Assert(thisWorkbook != null);
            Debug.Assert(nodeXLControl != null || mode == DialogMode.EditOnly);

            m_eMode = mode;
            m_oAutomateTasksUserSettings = new AutomateTasksUserSettings();
            m_oThisWorkbook          = thisWorkbook;
            m_oNodeXLControl         = nodeXLControl;
            m_bIgnoreItemCheckEvents = false;

            InitializeComponent();

            if (m_eMode == DialogMode.EditOnly)
            {
                this.Text += " Options";
                btnOK.Text = "OK";
            }

            // 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_oAutomateTasksDialogUserSettings =
                new AutomateTasksDialogUserSettings(this);

            PopulateTasksToRun();

            DoDataExchange(false);

            AssertValid();
        }
    //*************************************************************************
    //  Constructor: AutomateTasksDialog()
    //
    /// <summary>
    /// Initializes a new instance of the <see cref="AutomateTasksDialog" />
    /// class.
    /// </summary>
    ///
    /// <param name="mode">
    /// Indicates the mode in which the dialog is being used.
    /// </param>
    ///
    /// <param name="thisWorkbook">
    /// Workbook containing the graph contents.
    /// </param>
    ///
    /// <param name="nodeXLControl">
    /// The NodeXLControl object.  This can be null if <paramref name="mode" />
    /// is <see cref="DialogMode.EditOnly" />.
    /// </param>
    //*************************************************************************

    public AutomateTasksDialog
    (
        DialogMode mode,
        ThisWorkbook thisWorkbook,
        NodeXLControl nodeXLControl
    )
    {
        Debug.Assert(thisWorkbook != null);
        Debug.Assert(nodeXLControl != null || mode == DialogMode.EditOnly);

        m_eMode = mode;
        m_oAutomateTasksUserSettings = new AutomateTasksUserSettings();
        m_oThisWorkbook = thisWorkbook;
        m_oNodeXLControl = nodeXLControl;
        m_bIgnoreItemCheckEvents = false;

        InitializeComponent();

        if (m_eMode == DialogMode.EditOnly)
        {
            this.Text += " Options";
            btnOK.Text = "OK";
        }

        // 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_oAutomateTasksDialogUserSettings =
            new AutomateTasksDialogUserSettings(this);

        PopulateTasksToRun();

        DoDataExchange(false);

        AssertValid();
    }