Free cookie consent management tool by TermsFeed Policy Generator

source: branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views/3.3/ValueConfigurationViews/RangeView.cs @ 8517

Last change on this file since 8517 was 8517, checked in by jkarder, 12 years ago

#1853:

  • created branch for ParameterConfigurationEncoding
  • added CreateExperimentDialog that uses the extracted encoding
File size: 1.5 KB
Line 
1using System.Windows.Forms;
2using HeuristicLab.Core.Views;
3using HeuristicLab.Data;
4using HeuristicLab.MainForm;
5
6namespace HeuristicLab.Encodings.ParameterConfigurationEncoding.Views {
7  /// <summary>
8  /// The visual representation of a <see cref="IRange"/>.
9  /// </summary>
10  [View("Range View")]
11  [Content(typeof(IRange<>), false)]
12  public partial class RangeView : ItemView {
13    /// <summary>
14    /// Gets or sets the variable to represent visually.
15    /// </summary>
16    public new IRange Content {
17      get { return (IRange)base.Content; }
18      set { base.Content = value; }
19    }
20
21    public RangeView() {
22      InitializeComponent();
23    }
24
25    protected override void RegisterContentEvents() {
26      base.RegisterContentEvents();
27    }
28
29    protected override void DeregisterContentEvents() {
30      base.DeregisterContentEvents();
31    }
32
33    protected override void OnContentChanged() {
34      base.OnContentChanged();
35      if (Content != null) {
36        lowerValueView.Content = (IStringConvertibleValue)Content.LowerBound;
37        upperValueView.Content = (IStringConvertibleValue)Content.UpperBound;
38        stepSizeValueView.Content = (IStringConvertibleValue)Content.StepSize;
39      } else {
40        lowerValueView.Content = null;
41        upperValueView.Content = null;
42        stepSizeValueView.Content = null;
43      }
44    }
45
46    protected override void SetEnabledStateOfControls() {
47      base.SetEnabledStateOfControls();
48    }
49  }
50}
Note: See TracBrowser for help on using the repository browser.