Changeset 10876
- Timestamp:
- 05/21/14 13:38:59 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
r10875 r10876 78 78 79 79 void DataGridView_SelectionChanged(object sender, EventArgs e) { 80 if (!isSearching ) {80 if (!isSearching && Content != null) { 81 81 Content.DataGridLogic.SetSelection(GetSelectedCells()); 82 82 } … … 155 155 156 156 private void CreateFindAndReplaceDialog() { 157 findAndReplaceDialog = new SearchAndReplaceDialog(); 158 findAndReplaceDialog.Show(this); 159 if (AreMultipleCellsSelected()) { 160 ResetHighlightedCellsBackground(); 161 HightlightedCellsBackground = GetSelectedCells(); 162 dataGridView.ClearSelection(); 163 } 164 findAndReplaceDialog.FindAllEvent += findAndReplaceDialog_FindAllEvent; 165 findAndReplaceDialog.FindNextEvent += findAndReplaceDialog_FindNextEvent; 166 findAndReplaceDialog.ReplaceAllEvent += findAndReplaceDialog_ReplaceAllEvent; 167 findAndReplaceDialog.ReplaceNextEvent += findAndReplaceDialog_ReplaceEvent; 168 findAndReplaceDialog.FormClosing += findAndReplaceDialog_FormClosing; 169 searchIterator = null; 170 DataGridView.SelectionChanged += DataGridView_SelectionChanged_FindAndReplace; 157 if (findAndReplaceDialog == null || findAndReplaceDialog.IsDisposed) { 158 findAndReplaceDialog = new SearchAndReplaceDialog(); 159 findAndReplaceDialog.Show(this); 160 if (AreMultipleCellsSelected()) { 161 ResetHighlightedCellsBackground(); 162 HightlightedCellsBackground = GetSelectedCells(); 163 dataGridView.ClearSelection(); 164 } 165 findAndReplaceDialog.FindAllEvent += findAndReplaceDialog_FindAllEvent; 166 findAndReplaceDialog.FindNextEvent += findAndReplaceDialog_FindNextEvent; 167 findAndReplaceDialog.ReplaceAllEvent += findAndReplaceDialog_ReplaceAllEvent; 168 findAndReplaceDialog.ReplaceNextEvent += findAndReplaceDialog_ReplaceEvent; 169 findAndReplaceDialog.FormClosing += findAndReplaceDialog_FormClosing; 170 searchIterator = null; 171 DataGridView.SelectionChanged += DataGridView_SelectionChanged_FindAndReplace; 172 } 171 173 } 172 174 … … 198 200 199 201 void findAndReplaceDialog_FindNextEvent(object sender, EventArgs e) { 200 if (searchIterator == null || 201 currentSearchText != findAndReplaceDialog.GetSearchText() || 202 if (searchIterator == null || 203 currentSearchText != findAndReplaceDialog.GetSearchText() || 202 204 currentComparisonOperation != findAndReplaceDialog.GetComparisonOperation()) { 203 205 searchIterator = new FindPreprocessingItemsIterator(FindAll(findAndReplaceDialog.GetSearchText()));
Note: See TracChangeset
for help on using the changeset viewer.