Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/ValueConfigurationViews/RangeView.cs @ 11193

Last change on this file since 11193 was 4984, checked in by cneumuel, 14 years ago

#1215 worked on metaoptimization

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