Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9640


Ignore:
Timestamp:
06/17/13 16:50:38 (11 years ago)
Author:
mkommend
Message:

#1734: Updated save file dialog and ColumnGroupView in the data importer.

Location:
branches/HeuristicLab.DataImporter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/View/ColumnGroupView.cs

    r9629 r9640  
    4141      this.splitContainer1.Panel2.Controls.Add(txtColumnName);
    4242      txtColumnName.Visible = false;
    43       txtColumnName.Leave += new EventHandler(txtColumnName_Leave);
     43      txtColumnName.Validated += new EventHandler(txtColumnName_Validated);
    4444      txtColumnName.KeyDown += new KeyEventHandler(txtColumnName_KeyDown);
    4545
     
    589589
    590590    #region txtColumnName event handler
    591     private void txtColumnName_Leave(object source, EventArgs e) {
     591    private void txtColumnName_Validated(object source, EventArgs e) {
    592592      if (!this.txtColumnName.Visible) return;
    593593      this.txtColumnName.Visible = false;
     
    599599
    600600    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) {
    604602        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();
    609607    }
    610608    #endregion
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/SaveDialog.Designer.cs

    r9627 r9640  
    5757      this.btnCancel.Name = "btnCancel";
    5858      this.btnCancel.Size = new System.Drawing.Size(75, 23);
    59       this.btnCancel.TabIndex = 2;
     59      this.btnCancel.TabIndex = 3;
    6060      this.btnCancel.Text = "Cancel";
    6161      this.btnCancel.UseVisualStyleBackColor = true;
     
    6868      this.btnNoSave.Name = "btnNoSave";
    6969      this.btnNoSave.Size = new System.Drawing.Size(75, 23);
    70       this.btnNoSave.TabIndex = 3;
     70      this.btnNoSave.TabIndex = 2;
    7171      this.btnNoSave.Text = "&Don\'t Save";
    7272      this.btnNoSave.UseVisualStyleBackColor = true;
Note: See TracChangeset for help on using the changeset viewer.