OnSourceWorkbookChanged()
{
AssertValid();
PopulateSourceColumnsDataGridView();
Boolean bAtLeastTwoRows = (dgvSourceColumns.Rows.Count >= 2);
if (bAtLeastTwoRows)
{
for (Int32 iRow = 0; iRow < 2; iRow++)
{
dgvSourceColumns.Rows[iRow].Cells[IsEdgeColumnIndex].Value =
true;
}
}
PopulateVertexComboBoxes();
if (bAtLeastTwoRows)
{
Debug.Assert(cbxVertex1.Items.Count >= 2);
Debug.Assert(cbxVertex2.Items.Count >= 2);
cbxVertex1.SelectedIndex = 0;
cbxVertex2.SelectedIndex = 1;
}
EnableControls();
}