Changeset 7794
- Timestamp:
- 05/11/12 14:17:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/ProblemView.cs
r7665 r7794 20 20 #endregion 21 21 22 using System.Linq;23 22 using System.Windows.Forms; 24 23 using HeuristicLab.Core.Views; … … 47 46 protected override void OnContentChanged() { 48 47 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; 51 51 problemInstanceSplitContainer.Panel1Collapsed = !problemInstanceConsumerView.ContainsProviders(); 52 52 } else { … … 56 56 } 57 57 58 protected bool CheckForIProblemInstanceConsumer(IProblem Content) {59 return Content.GetType().GetInterfaces().Any(x => x.IsInterface && x.Equals(typeof(IProblemInstanceConsumer)));60 }61 58 } 62 59 }
Note: See TracChangeset
for help on using the changeset viewer.