private void DoSearch() { if (_search == null || _openProject == null) { return; } var i = _search.StartIndex + 1; var result = -1L; while (i < StringsDataGrid.RowCount) { var tfString = (TFString)StringsDataGrid.Rows[i].Tag; var original = tfString.Original; var translation = tfString.Translation; var textToSearch = _search.Text; if (!_search.UseCapitalization) { original = original.ToLower(); translation = translation.ToLower(); textToSearch = textToSearch.ToLower(); } if (original.Contains(textToSearch) || translation.Contains(textToSearch)) { result = i; break; } i++; } if (result != -1) { StringsDataGrid.ClearSelection(); StringsDataGrid.Rows[i].Cells["colTranslation"].Selected = true; StringsDataGrid.FirstDisplayedScrollingRowIndex = i; _search.StartIndex = i; } else { MessageBox.Show("No se ha encontrado el texto"); } }
private void StringsDataGrid_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { StringsDataGrid.BeginEdit(false); }