Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/LineChartView.cs @ 10377

Last change on this file since 10377 was 10377, checked in by aesterer, 10 years ago

Added line chart and basic logic for line chart

File size: 1.6 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Drawing;
5using System.Linq;
6using System.Text;
7using System.Windows.Forms;
8using HeuristicLab.Core.Views;
9using HeuristicLab.MainForm;
10using HeuristicLab.MainForm.WindowsForms;
11using HeuristicLab.Problems.DataAnalysis;
12using HeuristicLab.Data.Views;
13using HeuristicLab.Analysis;
14
15namespace HeuristicLab.DataPreprocessing.Views {
16
17  [View("Line Chart View")]
18  [Content(typeof(LineChartContent), false)]
19  public partial class LineChartView : ItemView {
20
21    private DataTable dataTable;
22
23    public LineChartView() {
24      InitializeComponent();
25    }
26
27    private void InitDataTable() {
28      dataTable = new DataTable("LineChart");
29      ILineChartLogic logic = Content.LineChartLogic;
30      logic.FillDataTable(dataTable);
31    }
32
33    public new LineChartContent Content {
34      get { return (LineChartContent)base.Content; }
35      set { base.Content = value; }
36    }
37
38    protected override void OnContentChanged() {
39      base.OnContentChanged();
40      if (Content != null) {
41        InitDataTable();
42        InitVariablesListBox();
43        viewHost.Content = dataTable;
44
45      }
46    }
47
48    private void InitVariablesListBox() {
49      ILineChartLogic logic = Content.LineChartLogic;
50
51      //foreach (var variableName in logic.GetVariableNames()) {
52      //  variablesListBox.Items.Add(variableName,true);
53      //}
54    }
55
56    private void variablesListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
57      //string item = variablesListBox.Items[e.Index] as string;
58
59    }
60  }
61}
62
63
Note: See TracBrowser for help on using the repository browser.