- Timestamp:
- 08/30/12 16:08:24 (12 years ago)
- Location:
- branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views/3.3
- Files:
-
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views/3.3/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views-3.3.csproj
r8524 r8544 106 106 <SubType>Code</SubType> 107 107 </Compile> 108 <Compile Include="ObjectSelectorDialog.cs">109 <SubType>Form</SubType>110 </Compile>111 <Compile Include="ObjectSelectorDialog.Designer.cs">112 <DependentUpon>ObjectSelectorDialog.cs</DependentUpon>113 </Compile>114 108 <Compile Include="OptimizableView.cs"> 115 109 <SubType>UserControl</SubType> -
branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views/3.3/ValueConfigurationViews/ValueView.cs
r8535 r8544 23 23 using System.Linq; 24 24 using System.Windows.Forms; 25 using HeuristicLab.Core;26 25 using HeuristicLab.Core.Views; 27 26 using HeuristicLab.MainForm; … … 66 65 67 66 private void setValueButton_Click(object sender, EventArgs e) { 67 // TODO: valid values get lost if the value was set to be optimized before 68 68 var withoutNullValue = Content.ValidValues.Where(x => x != null && !(x is NullValue)); 69 var objectSelectorDialog = new ObjectSelectorDialog<IItem>(withoutNullValue.GroupBy(x => ApplicationManager.Manager.GetDeclaringPlugin(x.GetType()).Name)); 70 if (objectSelectorDialog.ShowDialog(this) == DialogResult.OK) { 69 var typeSelectorDialog = new TypeSelectorDialog(); 70 typeSelectorDialog.Caption = "Select Item"; 71 typeSelectorDialog.TypeSelector.Caption = "Available Items"; 72 typeSelectorDialog.TypeSelector.Configure(withoutNullValue.Select(x => x.GetType()), false, false, false); 73 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 71 74 try { 72 Content.Value = objectSelectorDialog.Item;75 Content.Value = withoutNullValue.Single(x => x.GetType() == typeSelectorDialog.TypeSelector.SelectedType); 73 76 valueViewHost.Content = Content.Value; 74 77 }
Note: See TracChangeset
for help on using the changeset viewer.