Changeset 5653 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views
- Timestamp:
- 03/10/11 10:44:42 (14 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3
- Property svn:ignore
-
old new 3 3 HeuristicLab.Problems.MetaOptimization.Views-3.3.csproj.user 4 4 HeuristicLabProblemsMetaOptimizationViewsPlugin.cs 5 *.vs10x
-
- Property svn:ignore
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/OptimizableView.cs
r5087 r5653 1 1 using System; 2 using System.Collections.Generic;3 using System.ComponentModel;4 using System.Drawing;5 using System.Data;6 using System.Linq;7 using System.Text;8 2 using HeuristicLab.Core.Views; 3 using HeuristicLab.Data; 9 4 using HeuristicLab.MainForm; 10 using HeuristicLab.Parameters;11 using HeuristicLab.Core;12 using HeuristicLab.Data;13 5 14 6 namespace HeuristicLab.Problems.MetaOptimization.Views.ValueConfigurationViews { … … 47 39 if (Content.Optimize) { 48 40 this.viewHost.ViewType = null; 49 if (Content is IParameterConfiguration) { 41 42 var pc = Content as IParameterConfiguration; 43 var vc = Content as IValueConfiguration; 44 45 if (pc != null) { 50 46 this.viewHost.Content = ((IParameterConfiguration)Content).ValueConfigurations; 51 } else if (Content is IValueConfiguration) { 52 if (Content.ActualValue.ValueDataType == typeof(IntValue) || 47 } else if(vc != null) { 48 var rvc = Content as RangeValueConfiguration; 49 if (rvc != null) { 50 if (Content.ActualValue.ValueDataType == typeof(IntValue) || 53 51 Content.ActualValue.ValueDataType == typeof(DoubleValue) || 54 52 Content.ActualValue.ValueDataType == typeof(PercentValue)) { 55 this.viewHost.ViewsLabelVisible = true; 56 this.viewHost.Content = ((IValueConfiguration)Content).RangeConstraint; 57 } else if(Content.ActualValue.ValueDataType == typeof(BoolValue)) { 58 this.viewHost.Content = null; // no configuration required 59 } else { 53 this.viewHost.ViewsLabelVisible = true; 54 this.viewHost.Content = rvc.RangeConstraint; 55 } else if (Content.ActualValue.ValueDataType == typeof(BoolValue)) { 56 this.viewHost.Content = null; // no configuration required 57 } 58 } 59 60 var pvc = Content as ParameterizedValueConfiguration; 61 if (pvc != null) { 60 62 this.viewHost.ViewsLabelVisible = false; 61 this.viewHost.Content = ((IValueConfiguration)Content).ParameterConfigurations;63 this.viewHost.Content = pvc.ParameterConfigurations; 62 64 } 63 65 } else { -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/ValueConfigurationViews/ValueConfigurationCheckedItemList.cs
r5277 r5653 1 1 using System; 2 using System.Collections.Generic;3 using System.ComponentModel;4 using System.Drawing;5 using System.Data;6 2 using System.Linq; 7 using System.Text; 3 using System.Windows.Forms; 4 using HeuristicLab.Collections; 5 using HeuristicLab.Core; 8 6 using HeuristicLab.Core.Views; 9 7 using HeuristicLab.MainForm; 10 using HeuristicLab.Core;11 using System.Windows.Forms;12 8 using HeuristicLab.PluginInfrastructure; 13 using HeuristicLab.Collections;14 9 15 10 namespace HeuristicLab.Problems.MetaOptimization.Views { … … 76 71 if (value is NullValue) { 77 72 return new NullValueConfiguration(); 73 } else if(value is IParameterizedItem) { 74 return new ParameterizedValueConfiguration(value, value.GetType()); 78 75 } else { 79 return new ValueConfiguration(value, value.GetType());80 } 76 return new RangeValueConfiguration(value, value.GetType()); 77 } 81 78 } 82 79 catch (Exception ex) {
Note: See TracChangeset
for help on using the changeset viewer.