Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7794


Ignore:
Timestamp:
05/11/12 14:17:27 (13 years ago)
Author:
mkommend
Message:

#1784: Changed check for ProblemInstanceConsumer in ProblemView.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/ProblemView.cs

    r7665 r7794  
    2020#endregion
    2121
    22 using System.Linq;
    2322using System.Windows.Forms;
    2423using HeuristicLab.Core.Views;
     
    4746    protected override void OnContentChanged() {
    4847      base.OnContentChanged();
    49       if (Content != null && CheckForIProblemInstanceConsumer(Content)) {
    50         problemInstanceConsumerView.Content = (IProblemInstanceConsumer)Content;
     48      IProblemInstanceConsumer consumer = Content as IProblemInstanceConsumer;
     49      if (consumer != null) {
     50        problemInstanceConsumerView.Content = consumer;
    5151        problemInstanceSplitContainer.Panel1Collapsed = !problemInstanceConsumerView.ContainsProviders();
    5252      } else {
     
    5656    }
    5757
    58     protected bool CheckForIProblemInstanceConsumer(IProblem Content) {
    59       return Content.GetType().GetInterfaces().Any(x => x.IsInterface && x.Equals(typeof(IProblemInstanceConsumer)));
    60     }
    6158  }
    6259}
Note: See TracChangeset for help on using the changeset viewer.