private void SetSourceGridState()
{
if (toolStrip3.Items.Count > 1)
toolStrip3.Items[2].Visible = chkSegmentedSource.Checked;
if (toolStrip3.Items.Count > 2)
toolStrip3.Items[3].Visible = chkSegmentedSource.Checked;
bool segmented = chkSegmentedSource.Checked;
foreach (DataGridViewRow dataGridViewRow in dgBuildList.Rows)
{
dataGridViewRow.DefaultCellStyle.BackColor = segmented ? Color.White : Color.WhiteSmoke;
dataGridViewRow.DefaultCellStyle.ForeColor = segmented ? Color.Black : Color.DarkGray;
dgBuildList.InvalidateRow( dataGridViewRow.Index );
}
dgBuildList.Update();
dgBuildList.Refresh();
ColorBuildGrid();
ResizeSourceList();
}