- Timestamp:
- 03/28/11 19:12:31 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs
r5848 r5850 35 35 protected TypeSelectorDialog typeSelectorDialog; 36 36 37 protected Type baseType;38 public Type BaseType{39 get { return baseType ; }37 protected IEnumerable<Type> baseTypes; 38 public IEnumerable<Type> BaseTypes { 39 get { return baseTypes; } 40 40 } 41 41 protected bool showNotInstantiableTypes; … … 86 86 87 87 public virtual void Configure(Type baseType, bool showNotInstantiableTypes, bool showGenericTypes) { 88 if (baseType == null) throw new ArgumentNullException(); 88 Configure(new List<Type>() { baseType }, showNotInstantiableTypes, showGenericTypes); 89 } 90 91 public virtual void Configure(IEnumerable<Type> baseTypes, bool showNotInstantiableTypes, bool showGenericTypes) { 92 if (baseTypes == null) throw new ArgumentNullException(); 89 93 if (InvokeRequired) 90 Invoke(new Action< Type, bool, bool>(Configure), baseType, showNotInstantiableTypes, showGenericTypes);94 Invoke(new Action<IEnumerable<Type>, bool, bool>(Configure), baseTypes, showNotInstantiableTypes, showGenericTypes); 91 95 else { 92 this.baseType = baseType;96 this.baseTypes = baseTypes; 93 97 this.showNotInstantiableTypes = showNotInstantiableTypes; 94 98 this.showGenericTypes = showGenericTypes; … … 115 119 pluginNode.Tag = plugin; 116 120 117 var types = from t in ApplicationManager.Manager.GetTypes(BaseType , plugin, ShowNotInstantiableTypes)121 var types = from t in ApplicationManager.Manager.GetTypes(BaseTypes, plugin, ShowNotInstantiableTypes) 118 122 orderby t.Name ascending 119 123 select t; … … 252 256 } 253 257 Type param = typeParametersListView.SelectedItems[0].Tag as Type; 254 Type[] con traints = param.GetGenericParameterConstraints();258 Type[] constraints = param.GetGenericParameterConstraints(); 255 259 bool showNotInstantiableTypes = !param.GenericParameterAttributes.HasFlag(GenericParameterAttributes.DefaultConstructorConstraint); 256 typeSelectorDialog.TypeSelector.Configure( typeof(IItem), showNotInstantiableTypes, true);260 typeSelectorDialog.TypeSelector.Configure(constraints, showNotInstantiableTypes, true); 257 261 258 262 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
Note: See TracChangeset
for help on using the changeset viewer.