- Timestamp:
- 06/17/13 16:50:38 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/View/ColumnGroupView.cs
r9629 r9640 41 41 this.splitContainer1.Panel2.Controls.Add(txtColumnName); 42 42 txtColumnName.Visible = false; 43 txtColumnName. Leave += new EventHandler(txtColumnName_Leave);43 txtColumnName.Validated += new EventHandler(txtColumnName_Validated); 44 44 txtColumnName.KeyDown += new KeyEventHandler(txtColumnName_KeyDown); 45 45 … … 589 589 590 590 #region txtColumnName event handler 591 private void txtColumnName_ Leave(object source, EventArgs e) {591 private void txtColumnName_Validated(object source, EventArgs e) { 592 592 if (!this.txtColumnName.Visible) return; 593 593 this.txtColumnName.Visible = false; … … 599 599 600 600 private void txtColumnName_KeyDown(object source, KeyEventArgs e) { 601 if (e.KeyCode != Keys.Enter && e.KeyCode != Keys.Escape) 602 return; 603 if (e.KeyCode == Keys.Enter) { 601 if (e.KeyCode == Keys.Escape) { 604 602 DataGridView.HitTestInfo h = this.dataGridView.HitTest(txtColumnName.Location.X, txtColumnName.Location.Y); 605 if (txtColumnName.Text != this.ColumnGroup.GetColumn(h.ColumnIndex).Name)606 this.commandChain.Add(new RenameColumnCommand(DataSet, this.ColumnGroup.Name, h.ColumnIndex, txtColumnName.Text));607 } 608 this.txtColumnName.Visible = false;603 this.txtColumnName.Text = this.ColumnGroup.GetColumn(h.ColumnIndex).Name; 604 dataGridView.Select(); 605 } else if (e.KeyCode == Keys.Enter) 606 dataGridView.Select(); 609 607 } 610 608 #endregion
Note: See TracChangeset
for help on using the changeset viewer.