Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6652


Ignore:
Timestamp:
08/11/11 16:24:49 (13 years ago)
Author:
mkommend
Message:

#1594: Refactored DataAnalysisSolutionViews and inherited from NamedItemView to display name and description.

Location:
trunk/sources
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs

    r5834 r6652  
    2626
    2727namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views {
    28   [Content(typeof(SymbolicRegressionSolution), true)]
     28  [Content(typeof(SymbolicRegressionSolution), false)]
    2929  [View("SymbolicRegressionSolution View")]
    3030  public partial class SymbolicRegressionSolutionView : RegressionSolutionView {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r6642 r6652  
    202202    <Compile Include="Interfaces\IDataAnalysisSolutionEvaluationView.cs" />
    203203    <Compile Include="MenuItems\CreateEnsembleMenuItem.cs" />
     204    <Compile Include="Solution Views\NamedDataAnalysisSolutionView.cs">
     205      <SubType>UserControl</SubType>
     206    </Compile>
     207    <Compile Include="Solution Views\NamedDataAnalysisSolutionView.Designer.cs">
     208      <DependentUpon>NamedDataAnalysisSolutionView.cs</DependentUpon>
     209    </Compile>
    204210    <Compile Include="Solution Views\RegressionSolutionView.cs">
    205211      <SubType>UserControl</SubType>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationSolutionView.cs

    r6642 r6652  
    2525namespace HeuristicLab.Problems.DataAnalysis.Views {
    2626  [View("ClassificationSolution View")]
    27   [Content(typeof(ClassificationSolutionBase), true)]
     27  [Content(typeof(ClassificationSolutionBase), false)]
    2828  public partial class ClassificationSolutionView : DataAnalysisSolutionView {
    2929    public ClassificationSolutionView() {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClusteringSolutionView.cs

    r6642 r6652  
    2525namespace HeuristicLab.Problems.DataAnalysis.Views {
    2626  [View("ClusteringSolution View")]
    27   [Content(typeof(ClusteringSolution), true)]
     27  [Content(typeof(ClusteringSolution), false)]
    2828  public partial class ClusteringSolutionView : DataAnalysisSolutionView {
    2929    public ClusteringSolutionView() {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs

    r6642 r6652  
    2525using System.Linq;
    2626using System.Windows.Forms;
     27using HeuristicLab.Core.Views;
    2728using HeuristicLab.MainForm;
     29using HeuristicLab.Optimization;
    2830using HeuristicLab.Optimization.Views;
    2931
    3032namespace HeuristicLab.Problems.DataAnalysis.Views {
    3133  [View("DataAnalysisSolution View")]
    32   [Content(typeof(DataAnalysisSolution), true)]
    33   public partial class DataAnalysisSolutionView : ResultCollectionView {
     34  [Content(typeof(DataAnalysisSolution), false)]
     35  public partial class DataAnalysisSolutionView : NamedItemCollectionView<IResult> {
    3436    public DataAnalysisSolutionView() {
    3537      InitializeComponent();
     38      viewHost.ViewsLabelVisible = false;
     39      base.ReadOnly = true;
    3640    }
    3741
     
    5862    }
    5963
     64    protected override IResult CreateItem() {
     65      return null;
     66    }
     67
    6068    protected virtual void AddEvaluationViewTypes() {
    6169      if (Content != null) {
     
    6876
    6977    protected override void itemsListView_DoubleClick(object sender, EventArgs e) {
    70       if (itemsListView.SelectedItems.Count == 1 && itemsListView.SelectedItems[0].Tag is Type) {
    71         Type viewType = (Type)itemsListView.SelectedItems[0].Tag;
     78      if (itemsListView.SelectedItems.Count != 1) return;
     79
     80      IResult result = itemsListView.SelectedItems[0].Tag as IResult;
     81      Type viewType = itemsListView.SelectedItems[0].Tag as Type;
     82      if (result != null) {
     83        IContentView view = MainFormManager.MainForm.ShowContent(result, typeof(ResultView));
     84        if (view != null) {
     85          view.ReadOnly = ReadOnly;
     86          view.Locked = Locked;
     87        }
     88      } else if (viewType != null) {
    7289        MainFormManager.MainForm.ShowContent(Content, viewType);
    73       } else
    74         base.itemsListView_DoubleClick(sender, e);
     90      }
    7591    }
    7692
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DiscriminantFunctionClassificationSolutionView.cs

    r6642 r6652  
    2020#endregion
    2121
    22 using System.Windows.Forms;
     22
    2323using HeuristicLab.MainForm;
    24 
    2524namespace HeuristicLab.Problems.DataAnalysis.Views {
    26   [View("DiscriminantFunctionClassificationSolution View")]
    27   [Content(typeof(DiscriminantFunctionClassificationSolutionBase), true)]
    28   public partial class DiscriminantFunctionClassificationSolutionView : DataAnalysisSolutionView {
     25  [View("ClassificationSolution View")]
     26  [Content(typeof(DiscriminantFunctionClassificationSolutionBase), false)]
     27  public partial class DiscriminantFunctionClassificationSolutionView : ClassificationSolutionView {
    2928    public DiscriminantFunctionClassificationSolutionView() {
    3029      InitializeComponent();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs

    r6642 r6652  
    2525namespace HeuristicLab.Problems.DataAnalysis.Views {
    2626  [View("RegressionSolution View")]
    27   [Content(typeof(RegressionSolutionBase), true)]
     27  [Content(typeof(RegressionSolutionBase), false)]
    2828  public partial class RegressionSolutionView : DataAnalysisSolutionView {
    2929    public RegressionSolutionView() {
Note: See TracChangeset for help on using the changeset viewer.