Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveStatistics/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs @ 12853

Last change on this file since 12853 was 12012, checked in by ascheibe, 10 years ago

#2212 merged r12008, r12009, r12010 back into trunk

File size: 2.5 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2015 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
21
22using System.Collections.Generic;
23using System.ComponentModel;
24using System.Linq;
25using System.Windows.Forms;
26using HeuristicLab.Data;
27using HeuristicLab.MainForm;
28using HeuristicLab.MainForm.WindowsForms;
29using HeuristicLab.PluginInfrastructure;
30using System;
31using HeuristicLab.DataPreprocessing;
32using HeuristicLab.Problems.DataAnalysis.Views;
33
34namespace HeuristicLab.Problems.DataAnalysis.Views {
35  [View("Preprocessing Feature Correlation View")]
36  [Content(typeof(CorrelationMatrixContent), false)]
37  public partial class PreprocessingFeatureCorrelationView : AsynchronousContentView {
38
39    public new CorrelationMatrixContent Content
40    {
41      get { return (CorrelationMatrixContent) base.Content; }
42      set { base.Content = value; }
43    }
44
45    FeatureCorrelationView correlationView;
46
47    public PreprocessingFeatureCorrelationView() {
48      InitializeComponent();
49      correlationView = new FeatureCorrelationView();
50      correlationView.Dock = DockStyle.Fill;
51      this.Controls.Add(correlationView);
52    }
53
54
55    protected override void RegisterContentEvents() {
56      base.RegisterContentEvents();
57      Content.Changed += Data_Changed;     
58    }
59
60    protected override void DeregisterContentEvents() {
61      Content.Changed -= Data_Changed;     
62      base.DeregisterContentEvents();
63    }
64
65    private void Data_Changed(object sender, DataPreprocessingChangedEventArgs e) {
66      OnContentChanged();
67    }
68
69    protected override void OnContentChanged() {
70      base.OnContentChanged();
71      if (Content == null) {
72        correlationView.Content = null;
73        return;
74      }
75
76      correlationView.Content = Content.ProblemData;
77    }
78  }
79}
Note: See TracBrowser for help on using the repository browser.