Free cookie consent management tool by TermsFeed Policy Generator

source: branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationEnsembleSolutionView.cs @ 6647

Last change on this file since 6647 was 6618, checked in by mkommend, 13 years ago

#1479: Integrated trunk changes.

File size: 2.7 KB
RevLine 
[6612]1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2011 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;
23using System.Windows.Forms;
24using HeuristicLab.MainForm;
25using HeuristicLab.MainForm.WindowsForms;
26
27namespace HeuristicLab.Problems.DataAnalysis.Views {
[6613]28  [View("ClassificationEnsembleSolution View")]
29  [Content(typeof(ClassificationEnsembleSolution), true)]
30  public partial class ClassificationEnsembleSolutionView : ClassificationSolutionView {
31    public ClassificationEnsembleSolutionView() {
[6612]32      InitializeComponent();
[6613]33      AddViewListViewItem(typeof(ClassificationEnsembleSolutionModelView), HeuristicLab.Common.Resources.VSImageLibrary.Function);
[6612]34    }
35
[6613]36    public new ClassificationEnsembleSolution Content {
37      get { return (ClassificationEnsembleSolution)base.Content; }
[6612]38      set { base.Content = value; }
39    }
40
41    protected override void itemsListView_DoubleClick(object sender, EventArgs e) {
[6613]42      if (Content != null && itemsListView.SelectedItems.Count == 1 && itemsListView.SelectedItems[0].Tag == typeof(ClassificationEnsembleSolutionModelView)) {
[6612]43        Type viewType = (Type)itemsListView.SelectedItems[0].Tag;
[6613]44        var view = MainFormManager.MainForm.ShowContent(Content.ClassificationSolutions, viewType);
[6612]45        view.ReadOnly = false;
46        view.Locked = Locked;
47      } else
48        base.itemsListView_DoubleClick(sender, e);
49    }
50
51    protected override void itemsListView_SelectedIndexChanged(object sender, EventArgs e) {
[6613]52      if (Content != null && itemsListView.SelectedItems.Count == 1 && itemsListView.SelectedItems[0].Tag == typeof(ClassificationEnsembleSolutionModelView)) {
[6612]53        detailsGroupBox.Enabled = true;
54        Type viewType = (Type)itemsListView.SelectedItems[0].Tag;
55        viewHost.ViewType = viewType;
[6613]56        viewHost.Content = Content.ClassificationSolutions;
[6612]57        viewHost.ReadOnly = false;
58        viewHost.Locked = Locked;
59      } else
60        base.itemsListView_SelectedIndexChanged(sender, e);
61    }
62  }
63}
Note: See TracBrowser for help on using the repository browser.