Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs @ 12158

Last change on this file since 12158 was 12158, checked in by ehopf, 9 years ago

#2335 Added a possibility to delete columns in the DataGrid view of the data preprocessing.

File size: 23.1 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Collections.Generic;
24using System.Linq;
25using System.Windows.Forms;
26using HeuristicLab.Data;
27using HeuristicLab.Data.Views;
28using HeuristicLab.DataPreprocessing.Filter;
29using HeuristicLab.MainForm;
30
31namespace HeuristicLab.DataPreprocessing.Views {
32  [View("Data Grid Content View")]
33  [Content(typeof(IDataGridContent), true)]
34  public partial class DataGridContentView : StringConvertibleMatrixView {
35
36    private bool isSearching = false;
37    private bool updateOnMouseUp = false;
38    private SearchAndReplaceDialog findAndReplaceDialog;
39    private IFindPreprocessingItemsIterator searchIterator;
40    private string currentSearchText;
41    private ComparisonOperation currentComparisonOperation;
42    private Tuple<int, int> currentCell;
43
44    public new IDataGridContent Content {
45      get { return (IDataGridContent)base.Content; }
46      set { base.Content = value; }
47    }
48
49    private IDictionary<int, IList<int>> _highlightedCellsBackground;
50    public IDictionary<int, IList<int>> HightlightedCellsBackground {
51      get { return _highlightedCellsBackground; }
52      set {
53        _highlightedCellsBackground = value;
54        Refresh();
55      }
56    }
57
58    public DataGridContentView() {
59      InitializeComponent();
60      dataGridView.CellMouseClick += dataGridView_CellMouseClick;
61      dataGridView.KeyDown += dataGridView_KeyDown;
62      dataGridView.MouseUp += dataGridView_MouseUp;
63      dataGridView.ColumnHeaderMouseClick += dataGridView_ColumnHeaderMouseClick;
64      contextMenuCell.Items.Add(ShowHideColumns);
65      _highlightedCellsBackground = new Dictionary<int, IList<int>>();
66      currentCell = null;
67    }
68
69    protected override void OnContentChanged() {
70      List<KeyValuePair<int, SortOrder>> order = new List<KeyValuePair<int, SortOrder>>(base.sortedColumnIndices);
71      base.OnContentChanged();
72
73      DataGridView.RowHeadersWidth = 70;
74
75      if (Content == null && findAndReplaceDialog != null) {
76        findAndReplaceDialog.Close();
77      }
78
79      if (Content != null) {
80        base.sortedColumnIndices = order;
81        base.Sort();
82      }
83
84    }
85
86    protected override void RegisterContentEvents() {
87      base.RegisterContentEvents();
88      Content.Changed += Content_Changed;
89      Content.FilterLogic.FilterChanged += FilterLogic_FilterChanged;
90    }
91
92    protected override void DeregisterContentEvents() {
93      base.DeregisterContentEvents();
94      Content.Changed -= Content_Changed;
95      Content.FilterLogic.FilterChanged -= FilterLogic_FilterChanged;
96    }
97
98    private void FilterLogic_FilterChanged(object sender, EventArgs e) {
99      OnContentChanged();
100      searchIterator = null;
101      if (findAndReplaceDialog != null && !findAndReplaceDialog.IsDisposed) {
102        if (Content.FilterLogic.IsFiltered) {
103          findAndReplaceDialog.DisableReplace();
104        } else {
105          findAndReplaceDialog.EnableReplace();
106        }
107      }
108      btnReplace.Enabled = !Content.FilterLogic.IsFiltered;
109    }
110
111    private void Content_Changed(object sender, DataPreprocessingChangedEventArgs e) {
112      OnContentChanged();
113      searchIterator = null;
114    }
115
116    protected override void dataGridView_SelectionChanged(object sender, EventArgs e) {
117      base.dataGridView_SelectionChanged(sender, e);
118      if (Content != null && dataGridView.RowCount != 0 && dataGridView.ColumnCount != 0)
119        Content.Selection = GetSelectedCells();
120    }
121
122    //couldn't use base.dataGridView_CellValidating as the values have to be validated per column individually
123    protected override void dataGridView_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) {
124      if (dataGridView.ReadOnly) return;
125      if (Content == null) return;
126      if (Content.Rows == 0 || Content.Columns == 0) return;
127
128      string errorMessage;
129      if (Content != null) {
130        if (dataGridView.IsCurrentCellInEditMode && Content.FilterLogic.IsFiltered) {
131          errorMessage = "A filter is active, you cannot modify data. Press ESC to exit edit mode.";
132        } else {
133          Content.Validate(e.FormattedValue.ToString(), out errorMessage, e.ColumnIndex);
134        }
135
136        if (!String.IsNullOrEmpty(errorMessage)) {
137          e.Cancel = true;
138          dataGridView.Rows[e.RowIndex].ErrorText = errorMessage;
139        }
140
141      }
142    }
143
144
145    //protected override void PasteValuesToDataGridView() {
146    //  base.PasteValuesToDataGridView();
147    //  dataGridView.Refresh();
148    //}
149
150    protected override void SetEnabledStateOfControls() {
151      base.SetEnabledStateOfControls();
152      rowsTextBox.ReadOnly = true;
153      columnsTextBox.ReadOnly = true;
154    }
155
156    protected override int[] Sort(IEnumerable<KeyValuePair<int, SortOrder>> sortedColumns) {
157      btnApplySort.Enabled = sortedColumns.Any();
158      return base.Sort(sortedColumns);
159    }
160
161    protected override void ClearSorting() {
162      btnApplySort.Enabled = false;
163      base.ClearSorting();
164    }
165
166    private void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
167      searchIterator = null;
168    }
169
170    private void dataGridView_MouseUp(object sender, MouseEventArgs e) {
171      if (!updateOnMouseUp)
172        return;
173
174      updateOnMouseUp = false;
175      dataGridView_SelectionChanged(sender, e);
176    }
177
178    private void btnApplySort_Click(object sender, System.EventArgs e) {
179      Content.ManipulationLogic.ReOrderToIndices(virtualRowIndices);
180      OnContentChanged();
181    }
182
183    #region FindAndReplaceDialog
184
185    private void CreateFindAndReplaceDialog() {
186      if (findAndReplaceDialog == null || findAndReplaceDialog.IsDisposed) {
187        findAndReplaceDialog = new SearchAndReplaceDialog();
188        findAndReplaceDialog.Show(this);
189        if (AreMultipleCellsSelected()) {
190          ResetHighlightedCellsBackground();
191          HightlightedCellsBackground = GetSelectedCells();
192          dataGridView.ClearSelection();
193        }
194        findAndReplaceDialog.FindAllEvent += findAndReplaceDialog_FindAllEvent;
195        findAndReplaceDialog.FindNextEvent += findAndReplaceDialog_FindNextEvent;
196        findAndReplaceDialog.ReplaceAllEvent += findAndReplaceDialog_ReplaceAllEvent;
197        findAndReplaceDialog.ReplaceNextEvent += findAndReplaceDialog_ReplaceEvent;
198        findAndReplaceDialog.FormClosing += findAndReplaceDialog_FormClosing;
199        searchIterator = null;
200        DataGridView.SelectionChanged += DataGridView_SelectionChanged_FindAndReplace;
201        if (Content.FilterLogic.IsFiltered) {
202          findAndReplaceDialog.DisableReplace();
203        }
204      }
205    }
206
207    private void DataGridView_SelectionChanged_FindAndReplace(object sender, EventArgs e) {
208      if (Content != null) {
209        if (!isSearching && AreMultipleCellsSelected()) {
210          ResetHighlightedCellsBackground();
211          HightlightedCellsBackground = GetSelectedCells();
212          searchIterator = null;
213        }
214      }
215    }
216
217    void findAndReplaceDialog_FormClosing(object sender, FormClosingEventArgs e) {
218      ResetHighlightedCellsBackground();
219      searchIterator = null;
220      DataGridView.SelectionChanged -= DataGridView_SelectionChanged_FindAndReplace;
221    }
222
223    void findAndReplaceDialog_ReplaceEvent(object sender, EventArgs e) {
224      if (searchIterator != null && searchIterator.GetCurrent() != null) {
225        Replace(TransformToDictionary(currentCell));
226      }
227    }
228
229    void findAndReplaceDialog_ReplaceAllEvent(object sender, EventArgs e) {
230      Replace(FindAll(findAndReplaceDialog.GetSearchText()));
231    }
232
233    void findAndReplaceDialog_FindNextEvent(object sender, EventArgs e) {
234      if (searchIterator == null
235        || currentSearchText != findAndReplaceDialog.GetSearchText()
236        || currentComparisonOperation != findAndReplaceDialog.GetComparisonOperation()) {
237
238        searchIterator = new FindPreprocessingItemsIterator(FindAll(findAndReplaceDialog.GetSearchText()));
239        currentSearchText = findAndReplaceDialog.GetSearchText();
240        currentComparisonOperation = findAndReplaceDialog.GetComparisonOperation();
241      }
242
243      if (IsOneCellSelected()) {
244        var first = GetSelectedCells().First();
245        searchIterator.SetStartCell(first.Key, first.Value[0]);
246      }
247
248      bool moreOccurences = false;
249      currentCell = searchIterator.GetCurrent();
250      moreOccurences = searchIterator.MoveNext();
251      if (IsOneCellSelected() && currentCell != null) {
252        var first = GetSelectedCells().First();
253        if (currentCell.Item1 == first.Key && currentCell.Item2 == first.Value[0]) {
254          if (!moreOccurences) {
255            searchIterator.Reset();
256          }
257          currentCell = searchIterator.GetCurrent();
258          moreOccurences = searchIterator.MoveNext();
259          if (!moreOccurences) {
260            searchIterator.Reset();
261          }
262        }
263      }
264
265      dataGridView.ClearSelection();
266
267      if (currentCell != null) {
268        dataGridView[currentCell.Item1, currentCell.Item2].Selected = true;
269        dataGridView.CurrentCell = dataGridView[currentCell.Item1, currentCell.Item2];
270      }
271    }
272
273    private bool AreMultipleCellsSelected() {
274      return GetSelectedCellCount() > 1;
275    }
276
277    private bool IsOneCellSelected() {
278      return GetSelectedCellCount() == 1;
279    }
280
281    private int GetSelectedCellCount() {
282      int count = 0;
283      foreach (var column in GetSelectedCells()) {
284        count += column.Value.Count();
285      }
286      return count;
287    }
288
289    void findAndReplaceDialog_FindAllEvent(object sender, EventArgs e) {
290      dataGridView.ClearSelection();
291      isSearching = true;
292      SuspendRepaint();
293      var selectedCells = FindAll(findAndReplaceDialog.GetSearchText());
294      foreach (var column in selectedCells) {
295        foreach (var cell in column.Value) {
296          dataGridView[column.Key, cell].Selected = true;
297        }
298      }
299      ResumeRepaint(true);
300      isSearching = false;
301      Content.Selection = selectedCells;
302      //update statistic in base
303      base.dataGridView_SelectionChanged(sender, e);
304    }
305
306    private Core.ConstraintOperation GetConstraintOperation(ComparisonOperation comparisonOperation) {
307      Core.ConstraintOperation constraintOperation = Core.ConstraintOperation.Equal;
308      switch (comparisonOperation) {
309        case ComparisonOperation.Equal:
310          constraintOperation = Core.ConstraintOperation.Equal;
311          break;
312        case ComparisonOperation.Greater:
313          constraintOperation = Core.ConstraintOperation.Greater;
314          break;
315        case ComparisonOperation.GreaterOrEqual:
316          constraintOperation = Core.ConstraintOperation.GreaterOrEqual;
317          break;
318        case ComparisonOperation.Less:
319          constraintOperation = Core.ConstraintOperation.Less;
320          break;
321        case ComparisonOperation.LessOrEqual:
322          constraintOperation = Core.ConstraintOperation.LessOrEqual;
323          break;
324        case ComparisonOperation.NotEqual:
325          constraintOperation = Core.ConstraintOperation.NotEqual;
326          break;
327      }
328      return constraintOperation;
329    }
330
331    private IDictionary<int, IList<int>> FindAll(string match) {
332      bool searchInSelection = HightlightedCellsBackground.Values.Sum(list => list.Count) > 1;
333      ComparisonOperation comparisonOperation = findAndReplaceDialog.GetComparisonOperation();
334      var foundCells = new Dictionary<int, IList<int>>();
335      for (int i = 0; i < Content.FilterLogic.PreprocessingData.Columns; i++) {
336        var filters = CreateFilters(match, comparisonOperation, i);
337
338        bool[] filteredRows = Content.FilterLogic.GetFilterResult(filters, true);
339        var foundIndices = new List<int>();
340        for (int idx = 0; idx < filteredRows.Length; ++idx) {
341          var notFilteredThusFound = !filteredRows[idx];
342          if (notFilteredThusFound) {
343            foundIndices.Add(idx);
344          }
345        }
346        foundCells[i] = foundIndices;
347        IList<int> selectedList;
348        if (searchInSelection && HightlightedCellsBackground.TryGetValue(i, out selectedList)) {
349          foundCells[i] = foundCells[i].Intersect(selectedList).ToList<int>();
350        } else if (searchInSelection) {
351          foundCells[i].Clear();
352        }
353      }
354      return MapToSorting(foundCells);
355    }
356
357    private List<IFilter> CreateFilters(string match, ComparisonOperation comparisonOperation, int columnIndex) {
358      IPreprocessingData preprocessingData = Content.FilterLogic.PreprocessingData;
359      IStringConvertibleValue value;
360      if (preprocessingData.VariableHasType<double>(columnIndex)) {
361        value = new DoubleValue();
362      } else if (preprocessingData.VariableHasType<String>(columnIndex)) {
363        value = new StringValue();
364      } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) {
365        value = new DateTimeValue();
366      } else {
367        throw new ArgumentException("unsupported type");
368      }
369      value.SetValue(match);
370      var comparisonFilter = new ComparisonFilter(preprocessingData, GetConstraintOperation(comparisonOperation), value, true);
371      comparisonFilter.ConstraintColumn = columnIndex;
372      return new List<Filter.IFilter>() { comparisonFilter };
373    }
374
375    private IDictionary<int, IList<int>> MapToSorting(Dictionary<int, IList<int>> foundCells) {
376      if (sortedColumnIndices.Count == 0) {
377        return foundCells;
378      } else {
379        var sortedFoundCells = new Dictionary<int, IList<int>>();
380
381        var indicesToVirtual = new Dictionary<int, int>();
382        for (int i = 0; i < virtualRowIndices.Length; ++i) {
383          indicesToVirtual.Add(virtualRowIndices[i], i);
384        }
385
386        foreach (var entry in foundCells) {
387          var cells = new List<int>();
388          foreach (var cell in entry.Value) {
389            cells.Add(indicesToVirtual[cell]);
390          }
391          cells.Sort();
392          sortedFoundCells.Add(entry.Key, cells);
393        }
394        return sortedFoundCells;
395      }
396    }
397
398    private void Replace(IDictionary<int, IList<int>> cells) {
399      if (findAndReplaceDialog != null) {
400        ReplaceTransaction(() => {
401          switch (findAndReplaceDialog.GetReplaceAction()) {
402            case ReplaceAction.Value:
403              Content.ManipulationLogic.ReplaceIndicesByValue(cells, findAndReplaceDialog.GetReplaceText());
404              break;
405            case ReplaceAction.Average:
406              Content.ManipulationLogic.ReplaceIndicesByAverageValue(cells, false);
407              break;
408            case ReplaceAction.Median:
409              Content.ManipulationLogic.ReplaceIndicesByMedianValue(cells, false);
410              break;
411            case ReplaceAction.Random:
412              Content.ManipulationLogic.ReplaceIndicesByRandomValue(cells, false);
413              break;
414            case ReplaceAction.MostCommon:
415              Content.ManipulationLogic.ReplaceIndicesByMostCommonValue(cells, false);
416              break;
417            case ReplaceAction.Interpolation:
418              Content.ManipulationLogic.ReplaceIndicesByLinearInterpolationOfNeighbours(cells);
419              break;
420          }
421        });
422      }
423    }
424
425    private IDictionary<int, IList<int>> TransformToDictionary(Tuple<int, int> tuple) {
426      var highlightCells = new Dictionary<int, IList<int>>();
427      highlightCells.Add(tuple.Item1, new List<int>() { tuple.Item2 });
428      return highlightCells;
429    }
430
431    private void ResetHighlightedCellsBackground() {
432      HightlightedCellsBackground = new Dictionary<int, IList<int>>();
433    }
434
435    #endregion FindAndReplaceDialog
436
437    private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
438      if (Content == null) return;
439      if (e.Button == System.Windows.Forms.MouseButtons.Right) {
440        if (e.ColumnIndex != -1 && e.RowIndex == -1) {
441          dataGridView.Focus();
442          dataGridView.ClearSelection();
443          for (int r = 0; r < dataGridView.RowCount; r++) {
444            dataGridView[e.ColumnIndex, r].Selected = true;
445          }
446          return;
447        }
448        if (e.ColumnIndex == -1 || e.RowIndex == -1) {
449          replaceValueOverColumnToolStripMenuItem.Visible = false;
450          contextMenuCell.Show(MousePosition);
451        } else {
452          if (!dataGridView.SelectedCells.Contains(dataGridView[e.ColumnIndex, e.RowIndex])) {
453            dataGridView.ClearSelection();
454            dataGridView[e.ColumnIndex, e.RowIndex].Selected = true;
455          }
456
457          var columnIndices = new HashSet<int>();
458          for (int i = 0; i < dataGridView.SelectedCells.Count; i++) {
459            columnIndices.Add(dataGridView.SelectedCells[i].ColumnIndex);
460          }
461
462          replaceValueOverSelectionToolStripMenuItem.Enabled = AreMultipleCellsSelected();
463
464          averageToolStripMenuItem_Column.Enabled =
465            averageToolStripMenuItem_Selection.Enabled =
466            medianToolStripMenuItem_Column.Enabled =
467            medianToolStripMenuItem_Selection.Enabled =
468            randomToolStripMenuItem_Column.Enabled =
469            randomToolStripMenuItem_Selection.Enabled = !Content.PreProcessingData.AreAllStringColumns(columnIndices);
470
471          smoothingToolStripMenuItem_Column.Enabled =
472            interpolationToolStripMenuItem_Column.Enabled = !dataGridView.SelectedCells.Contains(dataGridView[e.ColumnIndex, 0])
473            && !dataGridView.SelectedCells.Contains(dataGridView[e.ColumnIndex, Content.Rows - 1])
474            && !Content.PreProcessingData.AreAllStringColumns(columnIndices);
475
476          replaceValueOverColumnToolStripMenuItem.Visible = true;
477          contextMenuCell.Show(MousePosition);
478        }
479      }
480    }
481
482    private void dataGridView_KeyDown(object sender, KeyEventArgs e) {
483      var selectedRows = dataGridView.SelectedRows;
484      var selectedCells = dataGridView.SelectedCells;
485      if (!Content.FilterLogic.IsFiltered) { //data is in read only mode....
486        if (e.KeyCode == Keys.Delete && selectedCells.Count == Content.Rows && selectedCells.Count > 0) {
487          Content.DeleteColumn(selectedCells[0].ColumnIndex);
488        } else if (e.KeyCode == Keys.Delete && selectedRows.Count > 0) {
489          List<int> rows = new List<int>();
490          for (int i = 0; i < selectedRows.Count; ++i) {
491            rows.Add(selectedRows[i].Index);
492          }
493          Content.DeleteRows(rows);
494        } else if (e.Control && e.KeyCode == Keys.F) {
495          CreateFindAndReplaceDialog();
496          findAndReplaceDialog.ActivateSearch();
497        } else if (e.Control && e.KeyCode == Keys.R) {
498          CreateFindAndReplaceDialog();
499          findAndReplaceDialog.ActivateReplace();
500        }
501      }
502    }
503
504    private IDictionary<int, IList<int>> GetSelectedCells() {
505      IDictionary<int, IList<int>> selectedCells = new Dictionary<int, IList<int>>();
506
507      //special case if all cells are selected
508      if (dataGridView.AreAllCellsSelected(true)) {
509        for (int i = 0; i < Content.Columns; i++)
510          selectedCells[i] = Enumerable.Range(0, Content.Rows).ToList();
511        return selectedCells;
512      }
513
514      foreach (var selectedCell in dataGridView.SelectedCells) {
515        var cell = (DataGridViewCell)selectedCell;
516        if (!selectedCells.ContainsKey(cell.ColumnIndex))
517          selectedCells.Add(cell.ColumnIndex, new List<int>(1024));
518        selectedCells[cell.ColumnIndex].Add(cell.RowIndex);
519      }
520
521      return selectedCells;
522    }
523
524    private void StartReplacing() {
525      SuspendRepaint();
526    }
527
528    private void StopReplacing() {
529      ResumeRepaint(true);
530    }
531
532    private void ReplaceTransaction(Action action) {
533      StartReplacing();
534      action();
535      StopReplacing();
536    }
537
538    private void btnSearch_Click(object sender, EventArgs e) {
539      CreateFindAndReplaceDialog();
540      findAndReplaceDialog.ActivateSearch();
541    }
542
543    private void btnReplace_Click(object sender, EventArgs e) {
544      CreateFindAndReplaceDialog();
545      findAndReplaceDialog.ActivateReplace();
546    }
547
548    #region ContextMenu Events
549
550    private void ReplaceWithAverage_Column_Click(object sender, EventArgs e) {
551      ReplaceTransaction(() => {
552        Content.ManipulationLogic.ReplaceIndicesByAverageValue(GetSelectedCells(), false);
553      });
554    }
555    private void ReplaceWithAverage_Selection_Click(object sender, EventArgs e) {
556      ReplaceTransaction(() => {
557        Content.ManipulationLogic.ReplaceIndicesByAverageValue(GetSelectedCells(), true);
558      });
559    }
560
561    private void ReplaceWithMedian_Column_Click(object sender, EventArgs e) {
562      ReplaceTransaction(() => {
563        Content.ManipulationLogic.ReplaceIndicesByMedianValue(GetSelectedCells(), false);
564      });
565    }
566    private void ReplaceWithMedian_Selection_Click(object sender, EventArgs e) {
567      ReplaceTransaction(() => {
568        Content.ManipulationLogic.ReplaceIndicesByMedianValue(GetSelectedCells(), true);
569      });
570    }
571
572    private void ReplaceWithRandom_Column_Click(object sender, EventArgs e) {
573      ReplaceTransaction(() => {
574        Content.ManipulationLogic.ReplaceIndicesByRandomValue(GetSelectedCells(), false);
575      });
576    }
577    private void ReplaceWithRandom_Selection_Click(object sender, EventArgs e) {
578      ReplaceTransaction(() => {
579        Content.ManipulationLogic.ReplaceIndicesByRandomValue(GetSelectedCells(), true);
580      });
581    }
582
583    private void ReplaceWithMostCommon_Column_Click(object sender, EventArgs e) {
584      ReplaceTransaction(() => {
585        Content.ManipulationLogic.ReplaceIndicesByMostCommonValue(GetSelectedCells(), false);
586      });
587    }
588    private void ReplaceWithMostCommon_Selection_Click(object sender, EventArgs e) {
589      ReplaceTransaction(() => {
590        Content.ManipulationLogic.ReplaceIndicesByMostCommonValue(GetSelectedCells(), true);
591      });
592    }
593
594    private void ReplaceWithInterpolation_Column_Click(object sender, EventArgs e) {
595      ReplaceTransaction(() => {
596        Content.ManipulationLogic.ReplaceIndicesByLinearInterpolationOfNeighbours(GetSelectedCells());
597      });
598    }
599
600    private void ReplaceWithSmoothing_Selection_Click(object sender, EventArgs e) {
601      ReplaceTransaction(() => {
602        Content.ManipulationLogic.ReplaceIndicesBySmoothing(GetSelectedCells());
603      });
604    }
605    #endregion
606
607  }
608}
Note: See TracBrowser for help on using the repository browser.