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();
}