private void btnMoveRowDown_Click( object sender, EventArgs e )
{
if (dgBuildList.SelectedRows.Count > 0)
{
int i = 0;
var rows = new int[dgBuildList.SelectedRows.Count];
foreach (DataGridViewRow row in dgBuildList.SelectedRows)
rows[i++] = row.Index;
Array.Sort( rows );
i = dgBuildList.SelectedRows.Count;
int bottom = _sourceFiles.Count;
for (int x = i - 1; x >= 0; x--)
{
int row = rows[x];
if (row > 0)
{
TranslationSourceInfo ti = _sourceFiles[row];
int idx = Math.Min( row + 1, bottom - 1 );
_sourceFiles.RemoveAt( row );
_sourceFiles.Insert( idx, ti );
dgBuildList.Rows[row].Selected = false;
dgBuildList.Rows[idx].Selected = true;
if (idx == ( bottom - 1 ))
bottom -= 1;
}
}
//_bindingSource.ResetBindings(false);
dgBuildList.Update();
SetButtonStates();
dgBuildList.Refresh();
ColorBuildGrid();
}
}