Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/ValueConfigurationViews/RangeView.cs @ 17777

Last change on this file since 17777 was 16996, checked in by gkronber, 5 years ago

#2520 Update plugin dependencies and references for HL.MetaOptimization for new persistence

File size: 1.5 KB
Line 
1using System.Windows.Forms;
2using HeuristicLab.MainForm;
3using HeuristicLab.Core.Views;
4using HeuristicLab.Data;
5
6namespace HeuristicLab.Problems.MetaOptimization.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.