Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5898


Ignore:
Timestamp:
03/30/11 18:27:08 (13 years ago)
Author:
mkommend
Message:

#1454: Updated TypeSelector to handle logical connection operators when discovering multiple types.

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs

    r5862 r5898  
    275275        problemTypeSelectorDialog.TypeSelector.Caption = "Available Problems";
    276276      }
    277       problemTypeSelectorDialog.TypeSelector.Configure(new List<Type>() { Content.ProblemType, Content.Algorithm.ProblemType }, false, true);
     277      problemTypeSelectorDialog.TypeSelector.Configure(new List<Type>() { Content.ProblemType, Content.Algorithm.ProblemType }, false, true, true);
    278278      if (problemTypeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
    279279        Content.Problem = (IDataAnalysisProblem)problemTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
  • trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs

    r5859 r5898  
    8686
    8787    public virtual void Configure(Type baseType, bool showNotInstantiableTypes, bool showGenericTypes) {
    88       Configure(new List<Type>() { baseType }, showNotInstantiableTypes, showGenericTypes);
    89     }
    90 
    91     public virtual void Configure(IEnumerable<Type> baseTypes, bool showNotInstantiableTypes, bool showGenericTypes) {
     88      Configure(new List<Type>() { baseType }, showNotInstantiableTypes, showGenericTypes, true);
     89    }
     90
     91    public virtual void Configure(IEnumerable<Type> baseTypes, bool showNotInstantiableTypes, bool showGenericTypes, bool allTypes) {
    9292      if (baseTypes == null) throw new ArgumentNullException();
    9393      if (InvokeRequired)
    94         Invoke(new Action<IEnumerable<Type>, bool, bool>(Configure), baseTypes, showNotInstantiableTypes, showGenericTypes);
     94        Invoke(new Action<IEnumerable<Type>, bool, bool, bool>(Configure), baseTypes, showNotInstantiableTypes, showGenericTypes, allTypes);
    9595      else {
    9696        this.baseTypes = baseTypes;
     
    114114        foreach (IPluginDescription plugin in plugins) {
    115115          TreeNode pluginNode = new TreeNode();
    116           pluginNode.Text = string.Format("{0} [{1}.{2}]", plugin.Name, plugin.Version.Major, plugin.Version.Minor);
     116          pluginNode.Text = string.Format("{0} {1}.{2}", plugin.Name, plugin.Version.Major, plugin.Version.Minor);
    117117          pluginNode.ImageIndex = 1;
    118118          pluginNode.SelectedImageIndex = pluginNode.ImageIndex;
    119119          pluginNode.Tag = plugin;
    120120
    121           var types = from t in ApplicationManager.Manager.GetTypes(BaseTypes, plugin, ShowNotInstantiableTypes)
     121          var types = from t in ApplicationManager.Manager.GetTypes(BaseTypes, plugin, ShowNotInstantiableTypes, allTypes)
    122122                      orderby t.Name ascending
    123123                      select t;
     
    258258      Type[] constraints = param.GetGenericParameterConstraints();
    259259      bool showNotInstantiableTypes = !param.GenericParameterAttributes.HasFlag(GenericParameterAttributes.DefaultConstructorConstraint);
    260       typeSelectorDialog.TypeSelector.Configure(constraints, showNotInstantiableTypes, true);
     260      typeSelectorDialog.TypeSelector.Configure(constraints, showNotInstantiableTypes, true, true);
    261261
    262262      if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
Note: See TracChangeset for help on using the changeset viewer.