Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/03/14 02:20:19 (10 years ago)
Author:
swagner
Message:

#2205: Worked on optimization networks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/PortView.cs

    r11409 r11412  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
     22using HeuristicLab.Common;
    2323using HeuristicLab.Core.Views;
    2424using HeuristicLab.MainForm;
     
    3030  [Content(typeof(Port<>), true)]
    3131  [Content(typeof(IPort<>), false)]
    32   public partial class PortView<T> : NamedItemView where T : class, IItem {
    33     public new IPort<T> Content {
    34       get { return (IPort<T>)base.Content; }
     32  [Content(typeof(IPort), false)]
     33  public partial class PortView : NamedItemView {
     34    public new IPort Content {
     35      get { return (IPort)base.Content; }
    3536      set { base.Content = value; }
    3637    }
     
    5657      } else {
    5758        valueViewHost.ViewType = null;
    58         valueViewHost.Content = Content.Value;
     59        valueViewHost.Content = Content.Value as IContent;
    5960      }
    6061    }
     
    6263    protected override void SetEnabledStateOfControls() {
    6364      base.SetEnabledStateOfControls();
    64       valueGroupBox.Enabled = Content != null;
     65      valueGroupBox.Enabled = (Content as IContent) != null;
    6566    }
    6667    protected virtual void Content_ValueChanged(object sender, System.EventArgs e) {
     
    6970      else {
    7071        valueViewHost.ViewType = null;
    71         valueViewHost.Content = Content.Value;
     72        valueViewHost.Content = Content.Value as IContent;
    7273
    7374      }
Note: See TracChangeset for help on using the changeset viewer.