Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/11 19:12:31 (13 years ago)
Author:
mkommend
Message:

#1454: Implemented TypeDiscovery with multiple base types and adapted TypeSelector and CrossValidation.

File:
1 edited

Legend:

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

    r5837 r5850  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    2425using System.Windows.Forms;
     
    252253            if (error != null) throw error;
    253254            IAlgorithm algorithm = content as IAlgorithm;
    254             if (algorithm == null || !(algorithm.Problem is IDataAnalysisProblem<IDataAnalysisProblemData>))
     255            if (algorithm == null || !(algorithm.Problem is IDataAnalysisProblem))
    255256              MessageBox.Show(this, "The selected file does not contain an algorithm or the problem of the algorithm is not a DataAnalysisProblem.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error);
    256257            else
     
    274275        problemTypeSelectorDialog.Caption = "Select Problem";
    275276        problemTypeSelectorDialog.TypeSelector.Caption = "Available Problems";
    276         problemTypeSelectorDialog.TypeSelector.Configure(Content.ProblemType, false, true);
    277       }
     277      }
     278      problemTypeSelectorDialog.TypeSelector.Configure(new List<Type>() { Content.ProblemType, Content.Algorithm.ProblemType }, false, true);
    278279      if (problemTypeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
    279         try {
    280           Content.Problem = (IDataAnalysisProblem)problemTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
    281         }
    282         catch (Exception ex) {
    283           ErrorHandling.ShowErrorDialog(this, ex);
    284         }
     280        Content.Problem = (IDataAnalysisProblem)problemTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
    285281      }
    286282    }
Note: See TracChangeset for help on using the changeset viewer.