Changeset 9356 for branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views/3.3/ValueConfigurationViews/ValueConfigurationCheckedItemListView.cs
- Timestamp:
- 04/11/13 17:11:32 (12 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views/3.3/ValueConfigurationViews/ValueConfigurationCheckedItemListView.cs
r9343 r9356 10 10 [View("ValueConfigurationList View")] 11 11 [Content(typeof(ICheckedValueConfigurationList), IsDefaultView = true)] 12 public sealed partial class ValueConfigurationCheckedItem CollectionView : CheckedItemListView<IValueConfiguration> {12 public sealed partial class ValueConfigurationCheckedItemListView : CheckedItemListView<IValueConfiguration> { 13 13 public new ICheckedValueConfigurationList Content { 14 14 get { return (ICheckedValueConfigurationList)base.Content; } … … 16 16 } 17 17 18 public ValueConfigurationCheckedItem CollectionView() {18 public ValueConfigurationCheckedItemListView() { 19 19 InitializeComponent(); 20 20 this.viewHost.ViewsLabelVisible = false; 21 this.typeSelectorDialog = new TypeSelectorDialog(); 21 22 } 22 23 … … 45 46 46 47 protected override IValueConfiguration CreateItem() { 47 var objectSelectorDialog = new ObjectSelectorDialog<IItem>(Content.ValidValues.GroupBy(x => ApplicationManager.Manager.GetDeclaringPlugin(x.GetType()).Name)); 48 if (objectSelectorDialog.ShowDialog(this) == DialogResult.OK) { 48 typeSelectorDialog.Caption = "Select Item"; 49 typeSelectorDialog.TypeSelector.Caption = "Available Items"; 50 typeSelectorDialog.TypeSelector.Configure(Content.ValidValues.Select(x => x.GetType()), false, false, false); 51 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 49 52 try { 50 IItem value = (IItem) objectSelectorDialog.Item.Clone();53 IItem value = (IItem)Content.ValidValues.Single(x => x.GetType() == typeSelectorDialog.TypeSelector.SelectedType).Clone(); 51 54 if (value is NullValue) { 52 55 return new NullValueConfiguration();
Note: See TracChangeset
for help on using the changeset viewer.