Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/DataPreprocessingView.cs @ 10220

Last change on this file since 10220 was 10220, checked in by tsteinre, 11 years ago
  • implemented ExportToDataset for IPreprocessingData
File size: 1.2 KB
Line 
1using System.Windows.Forms;
2using HeuristicLab.Core.Views;
3using HeuristicLab.MainForm;
4using HeuristicLab.MainForm.WindowsForms;
5
6namespace HeuristicLab.DataPreprocessing {
7  [View("Data Preprocessing View")]
8  [Content(typeof(IPreprocessingContext), false)]
9  [Content(typeof(PreprocessingContext), true)]
10  public partial class DataPreprocessingView : ItemView {
11
12    public new IPreprocessingContext Content {
13      get { return (IPreprocessingContext)base.Content; }
14      set { base.Content = value; }
15    }
16
17    public DataPreprocessingView() {
18      InitializeComponent();
19    }
20
21    protected override void OnContentChanged() {
22      base.OnContentChanged();
23    }
24
25    private void button1_Click(object sender, System.EventArgs e) {
26
27      IPreprocessingData Data = Content.Data;
28
29      foreach (string variable in Data.VariableNames) {
30        for (int j = 0; j < Data.Rows; j++) {
31          // assume: all double
32          Data.SetCell(variable, j, 1.0);
33        }
34      }
35
36      MessageBox.Show("Success, now cloning... ");
37
38
39      //Dataset ds = Data.ExportToDataset();
40      //var cloner = new Cloner();
41
42      //cloner.RegisterClonedObject()
43
44      //var clone = null;
45
46    }
47  }
48}
Note: See TracBrowser for help on using the repository browser.