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
RevLine 
[10134]1using System.Windows.Forms;
2using HeuristicLab.Core.Views;
3using HeuristicLab.MainForm;
4using HeuristicLab.MainForm.WindowsForms;
5
6namespace HeuristicLab.DataPreprocessing {
7  [View("Data Preprocessing View")]
[10219]8  [Content(typeof(IPreprocessingContext), false)]
9  [Content(typeof(PreprocessingContext), true)]
[10134]10  public partial class DataPreprocessingView : ItemView {
11
[10219]12    public new IPreprocessingContext Content {
13      get { return (IPreprocessingContext)base.Content; }
[10134]14      set { base.Content = value; }
15    }
16
17    public DataPreprocessingView() {
18      InitializeComponent();
19    }
20
21    protected override void OnContentChanged() {
22      base.OnContentChanged();
[10219]23    }
[10134]24
[10219]25    private void button1_Click(object sender, System.EventArgs e) {
[10134]26
[10220]27      IPreprocessingData Data = Content.Data;
[10134]28
[10220]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);
[10134]33        }
34      }
35
[10220]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
[10134]46    }
47  }
48}
Note: See TracBrowser for help on using the repository browser.