Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/MultiVariateDataAnalysisSolutionView.cs @ 10011

Last change on this file since 10011 was 4556, checked in by gkronber, 14 years ago

Added classes and views for analysis of symbolic time series prognosis results. #1142

File size: 2.6 KB
RevLine 
[4556]1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21using System;
22using System.Windows.Forms;
23using HeuristicLab.MainForm;
24using HeuristicLab.MainForm.WindowsForms;
25using HeuristicLab.Problems.DataAnalysis.MultiVariate;
26
27namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Views {
28  [View("Multi-Variate Data Analysis Solution View")]
29  [Content(typeof(IMultiVariateDataAnalysisSolution))]
30  public partial class MultiVariateDataAnalysisSolutionView : AsynchronousContentView {
31    public MultiVariateDataAnalysisSolutionView() {
32      InitializeComponent();
33    }
34
35    public new IMultiVariateDataAnalysisSolution Content {
36      get { return (IMultiVariateDataAnalysisSolution)base.Content; }
37      set { base.Content = value; }
38    }
39
40    protected override void OnContentChanged() {
41      base.OnContentChanged();
42      if (Content != null) {
43        modelViewHost.Content = Content.Model;
44        dataViewHost.Content = Content.ProblemData;
45      } else {
46        modelViewHost.Content = null;
47        dataViewHost.Content = null;
48      }
49    }
50
51    protected override void RegisterContentEvents() {
52      base.RegisterContentEvents();
53      Content.ModelChanged += new EventHandler(Content_ModelChanged);
54      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
55    }
56
57    protected override void DeregisterContentEvents() {
58      base.DeregisterContentEvents();
59      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
60      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
61    }
62
63    private void Content_ModelChanged(object sender, EventArgs e) {
64      modelViewHost.Content = Content.Model;
65    }
66    private void Content_ProblemDataChanged(object sender, EventArgs e) {
67      dataViewHost.Content = Content.ProblemData;
68    }
69  }
70}
Note: See TracBrowser for help on using the repository browser.