Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/NumericRangeView.cs @ 4516

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

initial prototype for Meta Optimization Problem (#1215)

File size: 1.8 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;
13
14namespace HeuristicLab.Problems.MetaOptimization.Views {
15  /// <summary>
16  /// The visual representation of a <see cref="INumericRange"/>.
17  /// </summary>
18  [View("NumericRange View")]
19  [Content(typeof(INumericRange), true)]
20  public partial class NumericRangeView : ItemView {
21    /// <summary>
22    /// Gets or sets the variable to represent visually.
23    /// </summary>
24    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
25    /// No own data storage present.</remarks>
26    public new INumericRange Content {
27      get { return (INumericRange)base.Content; }
28      set { base.Content = value; }
29    }
30
31    public NumericRangeView() {
32      InitializeComponent();
33    }
34
35    protected override void RegisterContentEvents() {
36      base.RegisterContentEvents();
37    }
38
39    protected override void DeregisterContentEvents() {
40      base.DeregisterContentEvents();
41    }
42
43    protected override void OnContentChanged() {
44      base.OnContentChanged();
45      if (Content != null) {
46        lowerValueView.Content = Content.LowerBound;
47        upperValueView.Content = Content.UpperBound;
48        stepSizeValueView.Content = Content.StepSize;
49      } else {
50        lowerValueView.Content = null;
51        upperValueView.Content = null;
52        stepSizeValueView.Content = null;
53      }
54    }
55
56    protected override void SetEnabledStateOfControls() {
57      base.SetEnabledStateOfControls();
58    }
59  }
60}
Note: See TracBrowser for help on using the repository browser.