Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/14/11 16:45:46 (13 years ago)
Author:
abeham
Message:

#1465

  • updated branch with latest version of trunk
Location:
branches/histogram
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram

  • branches/histogram/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/HeuristicLabEncodingsSymbolicExpressionTreeEncodingViewsPlugin.cs.frame

    r5446 r6195  
    2626
    2727namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
    28   [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views", "3.3.3.$WCREV$")]
     28  [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views", "3.3.4.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Collections", "3.3")]
  • branches/histogram/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/Properties/AssemblyInfo.frame

    r5446 r6195  
    4545
    4646[assembly: AssemblyVersion("3.3.0.0")]
    47 [assembly: AssemblyFileVersion("3.3.3.$WCREV$")]
     47[assembly: AssemblyFileVersion("3.3.4.$WCREV$")]
  • branches/histogram/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolView.Designer.cs

    r5832 r6195  
    8080      this.initialFrequencyTextBox.Size = new System.Drawing.Size(227, 20);
    8181      this.initialFrequencyTextBox.TabIndex = 4;
    82       this.initialFrequencyTextBox.TextChanged += new System.EventHandler(this.initialFrequencyTextBox_TextChanged);
     82      this.initialFrequencyTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.initialFrequencyTextBox_KeyDown);
     83      this.initialFrequencyTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.initialFrequencyTextBox_Validating);
     84      this.initialFrequencyTextBox.Validated += new System.EventHandler(this.initialFrequencyTextBox_Validated);
    8385      //
    8486      // SymbolView
  • branches/histogram/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolView.cs

    r5809 r6195  
    2525using HeuristicLab.MainForm;
    2626using HeuristicLab.MainForm.WindowsForms;
     27using System.ComponentModel;
    2728
    2829namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
     
    6768
    6869    #region control event handlers
    69     private void initialFrequencyTextBox_TextChanged(object sender, EventArgs e) {
     70    private void initialFrequencyTextBox_KeyDown(object sender, KeyEventArgs e) {
     71      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
     72        initialFrequencyLabel.Select();  // select label to validate data
     73
     74      if (e.KeyCode == Keys.Escape) {
     75        initialFrequencyTextBox.Text = Content.InitialFrequency.ToString();
     76        initialFrequencyLabel.Select();  // select label to validate data
     77      }
     78    }
     79    private void initialFrequencyTextBox_Validating(object sender, CancelEventArgs e) {
     80      double freq;
     81      if (double.TryParse(initialFrequencyTextBox.Text, out freq) && freq >= 0.0) {
     82        errorProvider.SetError(initialFrequencyTextBox, string.Empty);
     83        e.Cancel = false;
     84      } else {
     85        errorProvider.SetError(initialFrequencyTextBox, "Invalid value");
     86        e.Cancel = true;
     87      }
     88    }
     89    private void initialFrequencyTextBox_Validated(object sender, EventArgs e) {
    7090      double freq;
    7191      if (double.TryParse(initialFrequencyTextBox.Text, out freq) && freq >= 0.0) {
    7292        Content.InitialFrequency = freq;
    73         errorProvider.SetError(initialFrequencyTextBox, string.Empty);
    74       } else {
    75         errorProvider.SetError(initialFrequencyTextBox, "Invalid value");
    76       }
     93      }
    7794    }
    7895    #endregion
Note: See TracChangeset for help on using the changeset viewer.