Changeset 5663 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs
- Timestamp:
- 03/10/11 14:41:17 (13 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression
- Files:
-
- 1 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs
r5642 r5663 29 29 30 30 namespace HeuristicLab.Problems.DataAnalysis.Views { 31 [View(" Scatter Plot View")]32 [Content(typeof( DataAnalysisSolution), true)]33 public partial class ScatterPlotView : AsynchronousContentView {34 private const string ALL_SERIES = "All Samples";35 private const string TRAINING_SERIES = "Training Samples";36 private const string TEST_SERIES = "Test Samples";37 38 public new DataAnalysisSolution Content {39 get { return ( DataAnalysisSolution)base.Content; }31 [View("Regression solution scatter plot")] 32 [Content(typeof(IRegressionSolution))] 33 public partial class RegressionSolutionScatterPlotView : AsynchronousContentView { 34 private const string ALL_SERIES = "All samples"; 35 private const string TRAINING_SERIES = "Training samples"; 36 private const string TEST_SERIES = "Test samples"; 37 38 public new IRegressionSolution Content { 39 get { return (IRegressionSolution)base.Content; } 40 40 set { base.Content = value; } 41 41 } 42 42 43 public ScatterPlotView()43 public RegressionSolutionScatterPlotView() 44 44 : base() { 45 45 InitializeComponent(); … … 77 77 protected override void RegisterContentEvents() { 78 78 base.RegisterContentEvents(); 79 Content. EstimatedValuesChanged += new EventHandler(Content_EstimatedValuesChanged);79 Content.ModelChanged += new EventHandler(Content_ModelChanged); 80 80 Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged); 81 81 } 82 82 protected override void DeregisterContentEvents() { 83 83 base.DeregisterContentEvents(); 84 Content. EstimatedValuesChanged -= new EventHandler(Content_EstimatedValuesChanged);84 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 85 85 Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged); 86 86 } … … 90 90 UpdateChart(); 91 91 } 92 private void Content_ EstimatedValuesChanged(object sender, EventArgs e) {92 private void Content_ModelChanged(object sender, EventArgs e) { 93 93 UpdateSeries(); 94 94 } … … 126 126 if (InvokeRequired) Invoke((Action)UpdateSeries); 127 127 else { 128 string targetVariableName = Content.ProblemData.TargetVariable .Value;128 string targetVariableName = Content.ProblemData.TargetVariable; 129 129 Dataset dataset = Content.ProblemData.Dataset; 130 130 if (this.chart.Series[ALL_SERIES].Points.Count > 0) … … 170 170 } 171 171 } else if (Content != null) { 172 string targetVariableName = Content.ProblemData.TargetVariable .Value;172 string targetVariableName = Content.ProblemData.TargetVariable; 173 173 174 174 IEnumerable<double> predictedValues = null;
Note: See TracChangeset
for help on using the changeset viewer.