Free cookie consent management tool by TermsFeed Policy Generator

source: stable/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs @ 13100

Last change on this file since 13100 was 12009, checked in by ascheibe, 10 years ago

#2212 updated copyright year

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