Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/10 14:36:22 (14 years ago)
Author:
mkommend
Message:
  • refactored ViewHost and various views to use fewer nested controls
  • added UnitTests for ContentViews to ensure proper using of the ContentAttribute
  • fixed some views which could not handle null as Content

(ticket #972)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/EstimatedValuesView.cs

    r3933 r4011  
    8989      if (InvokeRequired) Invoke((Action)UpdateEstimatedValues);
    9090      else {
    91         double[,] values =
    92         MatrixExtensions<double>.Create(
    93           Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable.Value),
    94           Content.EstimatedValues.ToArray());
    95         var content = new DoubleMatrix(values);
    96         content.ColumnNames = new string[] { "Original", "Estimated" };
    97         matrixView.Content = content;
     91        DoubleMatrix matrix = null;
     92        if (Content != null) {
     93          double[,] values =
     94          MatrixExtensions<double>.Create(
     95            Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable.Value),
     96            Content.EstimatedValues.ToArray());
     97          matrix = new DoubleMatrix(values);
     98          matrix.ColumnNames = new string[] { "Original", "Estimated" };
     99        }
     100        matrixView.Content = matrix;
    98101      }
    99102    }
Note: See TracChangeset for help on using the changeset viewer.