Changeset 10626 for branches/DataPreprocessing
- Timestamp:
- 03/19/14 14:23:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
r10623 r10626 67 67 } 68 68 69 void dataGridView_KeyUp(object sender, KeyEventArgs e) {70 var selectedRows = dataGridView.SelectedRows;71 if (e.KeyCode == Keys.Delete && selectedRows.Count > 0) {72 List<int> rows = new List<int>();73 for (int i = 0; i < selectedRows.Count; ++i) {74 rows.Add(selectedRows[i].Index);75 }76 triggersOwnEvent(() => {77 Content.DataGridLogic.DeleteRow(rows);78 OnContentChanged();79 });80 }81 }82 83 69 protected override void OnContentChanged() { 84 70 base.OnContentChanged(); 85 71 } 86 87 72 88 73 protected override void RegisterContentEvents() { … … 152 137 } 153 138 139 private void dataGridView_KeyUp(object sender, KeyEventArgs e) { 140 var selectedRows = dataGridView.SelectedRows; 141 if (e.KeyCode == Keys.Delete && selectedRows.Count > 0) { 142 List<int> rows = new List<int>(); 143 for (int i = 0; i < selectedRows.Count; ++i) { 144 rows.Add(selectedRows[i].Index); 145 } 146 triggersOwnEvent(() => { 147 Content.DataGridLogic.DeleteRow(rows); 148 OnContentChanged(); 149 }); 150 } 151 } 154 152 155 153 private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { … … 168 166 columnIndices.Add(dataGridView.SelectedCells[i].ColumnIndex); 169 167 } 170 averageToolStripMenuItem.Enabled = medianToolStripMenuItem.Enabled = randomToolStripMenuItem.Enabled = interpolationToolStripMenuItem.Enabled = !Content.DataGridLogic.AreAllStringColumns(columnIndices); 168 averageToolStripMenuItem.Enabled = medianToolStripMenuItem.Enabled = randomToolStripMenuItem.Enabled = !Content.DataGridLogic.AreAllStringColumns(columnIndices); 169 interpolationToolStripMenuItem.Enabled = interpolationToolStripMenuItem.Enabled && !Content.DataGridLogic.AreAllStringColumns(columnIndices); 171 170 contextMenuCell.Show(MousePosition); 172 171 }
Note: See TracChangeset
for help on using the changeset viewer.