//************************************************************************* // Constructor: AutoFillWorkbookDialog() // /// <summary> /// Initializes a new instance of the <see cref="AutoFillWorkbookDialog" /> /// class. /// </summary> /// /// <param name="mode"> /// Indicates the mode in which the dialog is being used. /// </param> /// /// <param name="workbook"> /// Workbook containing the graph data. /// </param> //************************************************************************* public AutoFillWorkbookDialog ( DialogMode mode, Microsoft.Office.Interop.Excel.Workbook workbook ) { Debug.Assert(workbook != null); InitializeComponent(); m_eMode = mode; m_oWorkbook = workbook; m_oAutoFillUserSettings = new AutoFillUserSettings(); if (m_eMode == DialogMode.EditOnly) { this.Text += " Options"; btnAutoFill.Text = "OK"; btnClose.Text = "Cancel"; // The column header text "When Autofill is clicked..." makes no // sense when the "Autofill" button text has been changed to "OK". lblDestinationColumnHeader1.Text = lblDestinationColumnHeader2.Text = lblDestinationColumnHeader3.Text = lblDestinationColumnHeader1.Text.Replace("clicked", "run"); } // Instantiate an object that retrieves and saves the position of this // dialog. Note that the object automatically saves the settings when // the form closes. m_oAutoFillWorkbookDialogUserSettings = new AutoFillWorkbookDialogUserSettings(this); // Initialize the ComboBoxes used to specify the data sources for the // table columns. InitializeVertexComboBoxes(m_oWorkbook); InitializeEdgeComboBoxes(m_oWorkbook); InitializeGroupComboBoxes(m_oWorkbook); DoDataExchange(false); AssertValid(); }