Smrf.NodeXL.ExcelTemplate.AutomateTasksDialog.AutomateTasksDialog C# (CSharp) Method

AutomateTasksDialog() public method

Initializes a new instance of the AutomateTasksDialog class.
public AutomateTasksDialog ( DialogMode mode, ThisWorkbook thisWorkbook, NodeXLControl nodeXLControl ) : System
mode DialogMode /// Indicates the mode in which the dialog is being used. ///
thisWorkbook ThisWorkbook /// Workbook containing the graph contents. ///
nodeXLControl Smrf.NodeXL.Visualization.Wpf.NodeXLControl /// The NodeXLControl object. This can be null if /// is . ///
return System
    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();
    }