Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisSolutionView.cs @ 3902

Last change on this file since 3902 was 3884, checked in by gkronber, 14 years ago

Worked on support vector regression operators and views. #1009

File size: 2.6 KB
Line 
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.Collections.Generic;
23using System.ComponentModel;
24using System.Drawing;
25using System.Data;
26using System.Linq;
27using System.Text;
28using System.Windows.Forms;
29using HeuristicLab.MainForm;
30using HeuristicLab.MainForm.WindowsForms;
31
32namespace HeuristicLab.Problems.DataAnalysis.Views {
33  [View("Data Analysis Solution View")]
34  [Content(typeof(DataAnalysisSolution))]
35  public partial class DataAnalysisSolutionView : AsynchronousContentView {
36    public DataAnalysisSolutionView() {
37      InitializeComponent();
38    }
39
40    public new DataAnalysisSolution Content {
41      get { return (DataAnalysisSolution)base.Content; }
42      set { base.Content = value; }
43    }
44
45    protected override void OnContentChanged() {
46      base.OnContentChanged();
47      if (Content != null) {
48        modelViewHost.Content = Content.Model;
49        dataViewHost.Content = Content.ProblemData;
50      } else {
51        modelViewHost.Content = null;
52        dataViewHost.Content = null;
53      }
54      SetEnabledStateOfControls();
55    }
56
57    protected override void RegisterContentEvents() {
58      base.RegisterContentEvents();
59      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
60    }
61    protected override void DeregisterContentEvents() {
62      base.DeregisterContentEvents();
63      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
64    }
65    private void Content_ProblemDataChanged(object sender, EventArgs e) {
66      dataViewHost.Content = Content.ProblemData;
67    }
68
69    protected override void OnReadOnlyChanged() {
70      base.OnReadOnlyChanged();
71    }
72    protected override void OnLockedChanged() {
73      base.OnLockedChanged();
74    }
75    private void SetEnabledStateOfControls() {
76    }
77  }
78}
Note: See TracBrowser for help on using the repository browser.