using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using HeuristicLab.MainForm; using HeuristicLab.Core.Views; using HeuristicLab.Core; using HeuristicLab.Data; using HeuristicLab.Problems.MetaOptimization.Views.ValueConfigurationViews; namespace HeuristicLab.Problems.MetaOptimization.Views { /// /// The visual representation of a . /// [View("Range View")] [Content(typeof(IRange<>), false)] public partial class RangeView : ItemView { /// /// Gets or sets the variable to represent visually. /// public new IRange Content { get { return (IRange)base.Content; } set { base.Content = value; } } public RangeView() { InitializeComponent(); } protected override void RegisterContentEvents() { base.RegisterContentEvents(); } protected override void DeregisterContentEvents() { base.DeregisterContentEvents(); } protected override void OnContentChanged() { base.OnContentChanged(); if (Content != null) { lowerValueView.Content = (IStringConvertibleValue)Content.LowerBound; upperValueView.Content = (IStringConvertibleValue)Content.UpperBound; stepSizeValueView.Content = (IStringConvertibleValue)Content.StepSize; } else { lowerValueView.Content = null; upperValueView.Content = null; stepSizeValueView.Content = null; } } protected override void SetEnabledStateOfControls() { base.SetEnabledStateOfControls(); } } }