//************************************************************************* // Constructor: WordMetricUserSettingsDialog() // /// <summary> /// Initializes a new instance of the <see /// cref="WordMetricUserSettingsDialog" /> class. /// </summary> /// /// <param name="wordMetricUserSettings"> /// The object being edited. /// </param> /// /// <param name="workbook"> /// Workbook containing the graph contents. /// </param> //************************************************************************* public WordMetricUserSettingsDialog ( WordMetricUserSettings wordMetricUserSettings, Microsoft.Office.Interop.Excel.Workbook workbook ) { Debug.Assert(wordMetricUserSettings != null); Debug.Assert(workbook != null); m_oWordMetricUserSettings = wordMetricUserSettings; InitializeComponent(); // Populate the column name ComboBoxes with column names from the // workbook. ListObject oTable; if ( ExcelTableUtil.TryGetTable(workbook, WorksheetNames.Edges, TableNames.Edges, out oTable) ) { cbxEdgeColumnName.PopulateWithTableColumnNames(oTable); } if ( ExcelTableUtil.TryGetTable(workbook, WorksheetNames.Vertices, TableNames.Vertices, out oTable) ) { cbxVertexColumnName.PopulateWithTableColumnNames(oTable); } // 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_oWordMetricUserSettingsDialogUserSettings = new WordMetricUserSettingsDialogUserSettings(this); DoDataExchange(false); AssertValid(); }
//************************************************************************* // Constructor: WordMetricUserSettingsDialog() // /// <summary> /// Initializes a new instance of the <see /// cref="WordMetricUserSettingsDialog" /> class. /// </summary> /// /// <param name="wordMetricUserSettings"> /// The object being edited. /// </param> /// /// <param name="workbook"> /// Workbook containing the graph contents. /// </param> //************************************************************************* public WordMetricUserSettingsDialog ( WordMetricUserSettings wordMetricUserSettings, Microsoft.Office.Interop.Excel.Workbook workbook ) { Debug.Assert(wordMetricUserSettings != null); Debug.Assert(workbook != null); m_oWordMetricUserSettings = wordMetricUserSettings; InitializeComponent(); // Populate the column name ComboBoxes with column names from the // workbook. ListObject oTable; if (ExcelTableUtil.TryGetTable(workbook, WorksheetNames.Edges, TableNames.Edges, out oTable)) { cbxEdgeColumnName.PopulateWithTableColumnNames(oTable); } if (ExcelTableUtil.TryGetTable(workbook, WorksheetNames.Vertices, TableNames.Vertices, out oTable)) { cbxVertexColumnName.PopulateWithTableColumnNames(oTable); } // 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_oWordMetricUserSettingsDialogUserSettings = new WordMetricUserSettingsDialogUserSettings(this); DoDataExchange(false); AssertValid(); }