Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/14/16 17:51:48 (8 years ago)
Author:
pfleck
Message:

#2559

  • Enabled type selection for creating/importing/exporting/applying.
  • Deleted unnecessary interfaces.
  • Reorganized source files of DataPreprocessing.
Location:
trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs

    r13507 r13508  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
     23using System.IO;
     24using System.Threading.Tasks;
    2525using System.Windows.Forms;
    2626using HeuristicLab.Common;
     
    2828using HeuristicLab.Core.Views;
    2929using HeuristicLab.MainForm;
     30using HeuristicLab.Problems.DataAnalysis;
     31using HeuristicLab.Problems.Instances.DataAnalysis;
     32using HeuristicLab.Problems.Instances.DataAnalysis.Views;
    3033
    3134namespace HeuristicLab.DataPreprocessing.Views {
     
    6871
    6972        viewShortcutListView.Content = viewShortcuts.AsReadOnly();
    70 
    7173        viewShortcutListView.ItemsListView.Items[0].Selected = true;
    7274        viewShortcutListView.Select();
    7375
    74         applyComboBox.Items.Clear();
    75         applyComboBox.DataSource = Content.ExportPossibilities.ToList();
    76         applyComboBox.DisplayMember = "Key";
    77         if (applyComboBox.Items.Count > 0)
    78           applyComboBox.SelectedIndex = 0;
     76        applyTypeContextMenuStrip.Items.Clear();
     77        exportTypeContextMenuStrip.Items.Clear();
     78        foreach (var exportOption in Content.GetSourceExportOptions()) {
     79          var applyMenuItem = new ToolStripMenuItem(exportOption.Key) { Tag = exportOption.Value };
     80          applyMenuItem.Click += applyToolStripMenuItem_Click;
     81          applyTypeContextMenuStrip.Items.Add(applyMenuItem);
     82
     83          var exportMenuItem = new ToolStripMenuItem(exportOption.Key) { Tag = exportOption.Value };
     84          exportMenuItem.Click += exportToolStripMenuItem_Click;
     85          exportTypeContextMenuStrip.Items.Add(exportMenuItem);
     86        }
     87        var exportCsvMenuItem = new ToolStripMenuItem(".csv");
     88        exportCsvMenuItem.Click += exportCsvMenuItem_Click;
     89        exportTypeContextMenuStrip.Items.Add(exportCsvMenuItem);
    7990      } else {
    8091        viewShortcutListView.Content = null;
    8192      }
    8293    }
    83 
    8494    protected override void RegisterContentEvents() {
    8595      base.RegisterContentEvents();
     96      Content.Reset += Content_Reset;
    8697      Content.Data.FilterChanged += Data_FilterChanged;
    8798    }
     
    89100    protected override void DeregisterContentEvents() {
    90101      base.DeregisterContentEvents();
     102      Content.Reset -= Content_Reset;
    91103      Content.Data.FilterChanged -= Data_FilterChanged;
     104    }
     105
     106    void Content_Reset(object sender, EventArgs e) {
     107      OnContentChanged(); // Reset by setting new content
    92108    }
    93109
     
    104120    }
    105121
     122    #region New
     123    private void newButton_Click(object sender, EventArgs e) {
     124      newProblemDataTypeContextMenuStrip.Show(Cursor.Position);
     125    }
     126    private void newRegressionToolStripMenuItem_Click(object sender, EventArgs e) {
     127      Content.Import(new RegressionProblemData());
     128    }
     129    private void newClassificationToolStripMenuItem_Click(object sender, EventArgs e) {
     130      Content.Import(new ClassificationProblemData());
     131    }
     132    private void newTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) {
     133      Content.Import(new TimeSeriesPrognosisProblemData());
     134    }
     135    #endregion
     136
     137    #region Import
     138    private void importButton_Click(object sender, EventArgs e) {
     139      importProblemDataTypeContextMenuStrip.Show(Cursor.Position);
     140    }
     141    private void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) {
     142      Import(new RegressionCSVInstanceProvider(), new RegressionImportTypeDialog(),
     143        (dialog => ((RegressionImportTypeDialog)dialog).ImportType));
     144    }
     145    private void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) {
     146      Import(new ClassificationCSVInstanceProvider(), new ClassificationImportTypeDialog(),
     147        (dialog => ((ClassificationImportTypeDialog)dialog).ImportType));
     148    }
     149    private void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) {
     150      Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportTypeDialog(),
     151        (dialog => ((TimeSeriesPrognosisImportTypeDialog)dialog).ImportType));
     152    }
     153    private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportTypeDialog importTypeDialog,
     154      Func<DataAnalysisImportTypeDialog, TImportType> getImportType)
     155      where TProblemData : class, IDataAnalysisProblemData
     156      where TImportType : DataAnalysisImportType {
     157      if (importTypeDialog.ShowDialog() == DialogResult.OK) {
     158        Task.Run(() => {
     159          TProblemData instance;
     160          var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm;
     161          // lock active view and show progress bar
     162          var activeView = (IContentView)MainFormManager.MainForm.ActiveView;
     163
     164          try {
     165            var progress = mainForm.AddOperationProgressToContent(activeView.Content, "Loading problem instance.");
     166
     167            instanceProvider.ProgressChanged += (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; };
     168
     169            instance = instanceProvider.ImportData(importTypeDialog.Path, getImportType(importTypeDialog), importTypeDialog.CSVFormat);
     170          } catch (IOException ex) {
     171            MessageBox.Show(string.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error);
     172            mainForm.RemoveOperationProgressFromContent(activeView.Content);
     173            return;
     174          }
     175          try {
     176            Content.Import(instance);
     177          } catch (IOException ex) {
     178            MessageBox.Show(string.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(importTypeDialog.Path), Environment.NewLine + ex.Message), "Cannot load instance");
     179          } finally {
     180            mainForm.RemoveOperationProgressFromContent(activeView.Content);
     181          }
     182        });
     183      }
     184    }
     185    #endregion
     186
     187    #region Apply
     188    private void applyInNewTabButton_Click(object sender, EventArgs e) {
     189      applyTypeContextMenuStrip.Show(Cursor.Position);
     190    }
     191    private void applyToolStripMenuItem_Click(object sender, EventArgs e) {
     192      var menuItem = (ToolStripMenuItem)sender;
     193      var itemCreator = (Func<IItem>)menuItem.Tag;
     194      MainFormManager.MainForm.ShowContent(itemCreator());
     195    }
     196    #endregion
     197
     198    #region Export
    106199    private void exportProblemButton_Click(object sender, EventArgs e) {
    107       var exportOption = (KeyValuePair<string, Func<IItem>>)applyComboBox.SelectedItem;
    108       var exportItem = exportOption.Value();
    109 
     200      exportTypeContextMenuStrip.Show(Cursor.Position);
     201    }
     202    private void exportToolStripMenuItem_Click(object sender, EventArgs e) {
     203      var menuItem = (ToolStripMenuItem)sender;
     204      var itemCreator = (Func<IItem>)menuItem.Tag;
    110205      var saveFileDialog = new SaveFileDialog {
    111206        Title = "Save Item",
     
    115210      };
    116211
    117       var content = exportItem as IStorableContent;
    118212      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
    119         bool compressed = saveFileDialog.FilterIndex != 1;
    120         ContentManager.Save(content, saveFileDialog.FileName, compressed);
    121       }
    122     }
    123 
    124     private void applyInNewTabButton_Click(object sender, EventArgs e) {
    125       var exportOption = (KeyValuePair<string, Func<IItem>>)applyComboBox.SelectedItem;
    126       var exportItem = exportOption.Value();
    127 
    128       MainFormManager.MainForm.ShowContent(exportItem);
    129     }
    130 
     213        Task.Run(() => {
     214          bool compressed = saveFileDialog.FilterIndex != 1;
     215          var storable = itemCreator() as IStorableContent;
     216          if (storable != null) {
     217            var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm;
     218            var activeView = (IContentView)MainFormManager.MainForm.ActiveView;
     219            try {
     220              mainForm.AddOperationProgressToContent(activeView.Content, "Exporting data.");
     221              ContentManager.Save(storable, saveFileDialog.FileName, compressed);
     222            } finally {
     223              mainForm.RemoveOperationProgressFromContent(activeView.Content);
     224            }
     225          }
     226        });
     227      }
     228    }
     229    private void exportCsvMenuItem_Click(object sender, EventArgs e) {
     230      var saveFileDialog = new SaveFileDialog {
     231        Title = "Save Data",
     232        DefaultExt = "csv",
     233        Filter = "CSV files|*.csv|All files|*.*",
     234        FilterIndex = 1
     235      };
     236
     237      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
     238        Task.Run(() => {
     239          var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm;
     240          var activeView = (IContentView)MainFormManager.MainForm.ActiveView;
     241          try {
     242            var problemData = Content.CreateNewProblemData();
     243            mainForm.AddOperationProgressToContent(activeView.Content, "Exporting data.");
     244            if (problemData is TimeSeriesPrognosisProblemData)
     245              Export(new TimeSeriesPrognosisCSVInstanceProvider(), problemData, saveFileDialog.FileName);
     246            else if (problemData is RegressionProblemData)
     247              Export(new RegressionCSVInstanceProvider(), problemData, saveFileDialog.FileName);
     248            else if (problemData is ClassificationProblemData)
     249              Export(new ClassificationCSVInstanceProvider(), problemData, saveFileDialog.FileName);
     250          } finally {
     251            mainForm.RemoveOperationProgressFromContent(activeView.Content);
     252          }
     253        });
     254      }
     255    }
     256    private void Export<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider,
     257      IDataAnalysisProblemData problemData, string path)
     258      where TProblemData : class, IDataAnalysisProblemData where TImportType : DataAnalysisImportType {
     259      instanceProvider.ExportData((TProblemData)problemData, path);
     260    }
     261    #endregion
     262
     263    #region Undo / Redo
    131264    private void undoButton_Click(object sender, EventArgs e) {
    132265      Content.Data.Undo();
    133266    }
     267    #endregion
    134268  }
    135269}
  • trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.designer.cs

    r13507 r13508  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.components = new System.ComponentModel.Container();
    4748      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DataPreprocessingView));
    4849      this.undoButton = new System.Windows.Forms.Button();
     
    5051      this.exportProblemButton = new System.Windows.Forms.Button();
    5152      this.lblFilterActive = new System.Windows.Forms.Label();
    52       this.applyComboBox = new System.Windows.Forms.ComboBox();
    53       this.exportLabel = new System.Windows.Forms.Label();
    5453      this.redoButton = new System.Windows.Forms.Button();
     54      this.newButton = new System.Windows.Forms.Button();
     55      this.importButton = new System.Windows.Forms.Button();
     56      this.newProblemDataTypeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
     57      this.newRegressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     58      this.newClassificationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     59      this.newTimeSeriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     60      this.importProblemDataTypeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
     61      this.importRegressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     62      this.importClassificationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     63      this.importTimeSeriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    5564      this.viewShortcutListView = new HeuristicLab.DataPreprocessing.Views.ViewShortcutListView();
     65      this.applyTypeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
     66      this.exportTypeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
    5667      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     68      this.newProblemDataTypeContextMenuStrip.SuspendLayout();
     69      this.importProblemDataTypeContextMenuStrip.SuspendLayout();
    5770      this.SuspendLayout();
    5871      //
     
    7083      //
    7184      this.undoButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Undo;
    72       this.undoButton.Location = new System.Drawing.Point(6, 56);
     85      this.undoButton.Location = new System.Drawing.Point(131, 26);
    7386      this.undoButton.Name = "undoButton";
    7487      this.undoButton.Size = new System.Drawing.Size(24, 24);
     
    8194      //
    8295      this.applyInNewTabButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;
    83       this.applyInNewTabButton.Location = new System.Drawing.Point(57, 26);
     96      this.applyInNewTabButton.Location = new System.Drawing.Point(69, 26);
    8497      this.applyInNewTabButton.Name = "applyInNewTabButton";
    8598      this.applyInNewTabButton.Size = new System.Drawing.Size(24, 24);
     
    91104      // exportProblemButton
    92105      //
    93       this.exportProblemButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Save;
    94       this.exportProblemButton.Location = new System.Drawing.Point(87, 26);
     106      this.exportProblemButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.SaveAs;
     107      this.exportProblemButton.Location = new System.Drawing.Point(99, 26);
    95108      this.exportProblemButton.Name = "exportProblemButton";
    96109      this.exportProblemButton.Size = new System.Drawing.Size(24, 24);
    97110      this.exportProblemButton.TabIndex = 3;
    98       this.toolTip.SetToolTip(this.exportProblemButton, "Save");
     111      this.toolTip.SetToolTip(this.exportProblemButton, "Export to File");
    99112      this.exportProblemButton.UseVisualStyleBackColor = true;
    100113      this.exportProblemButton.Click += new System.EventHandler(this.exportProblemButton_Click);
     
    103116      //
    104117      this.lblFilterActive.AutoSize = true;
    105       this.lblFilterActive.Location = new System.Drawing.Point(84, 62);
     118      this.lblFilterActive.Location = new System.Drawing.Point(203, 31);
    106119      this.lblFilterActive.Name = "lblFilterActive";
    107120      this.lblFilterActive.Size = new System.Drawing.Size(277, 13);
     
    110123      this.lblFilterActive.Visible = false;
    111124      //
    112       // applyComboBox
    113       //
    114       this.applyComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    115             | System.Windows.Forms.AnchorStyles.Right)));
    116       this.applyComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    117       this.applyComboBox.FormattingEnabled = true;
    118       this.applyComboBox.Items.AddRange(new object[] {
    119             "Algorithm",
    120             "Problem",
    121             "ProblemData"});
    122       this.applyComboBox.Location = new System.Drawing.Point(117, 28);
    123       this.applyComboBox.Name = "applyComboBox";
    124       this.applyComboBox.Size = new System.Drawing.Size(696, 21);
    125       this.applyComboBox.TabIndex = 4;
    126       //
    127       // exportLabel
    128       //
    129       this.exportLabel.AutoSize = true;
    130       this.exportLabel.Location = new System.Drawing.Point(5, 31);
    131       this.exportLabel.Name = "exportLabel";
    132       this.exportLabel.Size = new System.Drawing.Size(40, 13);
    133       this.exportLabel.TabIndex = 8;
    134       this.exportLabel.Text = "Export:";
    135       //
    136125      // redoButton
    137126      //
    138127      this.redoButton.Enabled = false;
    139128      this.redoButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Redo;
    140       this.redoButton.Location = new System.Drawing.Point(36, 56);
     129      this.redoButton.Location = new System.Drawing.Point(161, 26);
    141130      this.redoButton.Name = "redoButton";
    142131      this.redoButton.Size = new System.Drawing.Size(24, 24);
     
    145134      this.redoButton.UseVisualStyleBackColor = true;
    146135      //
     136      // newButton
     137      //
     138      this.newButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.NewDocument;
     139      this.newButton.Location = new System.Drawing.Point(6, 26);
     140      this.newButton.Name = "newButton";
     141      this.newButton.Size = new System.Drawing.Size(24, 24);
     142      this.newButton.TabIndex = 3;
     143      this.newButton.UseVisualStyleBackColor = true;
     144      this.newButton.Click += new System.EventHandler(this.newButton_Click);
     145      //
     146      // importButton
     147      //
     148      this.importButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Open;
     149      this.importButton.Location = new System.Drawing.Point(36, 26);
     150      this.importButton.Name = "importButton";
     151      this.importButton.Size = new System.Drawing.Size(24, 24);
     152      this.importButton.TabIndex = 3;
     153      this.importButton.UseVisualStyleBackColor = true;
     154      this.importButton.Click += new System.EventHandler(this.importButton_Click);
     155      //
     156      // newProblemDataTypeContextMenuStrip
     157      //
     158      this.newProblemDataTypeContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     159            this.newRegressionToolStripMenuItem,
     160            this.newClassificationToolStripMenuItem,
     161            this.newTimeSeriesToolStripMenuItem});
     162      this.newProblemDataTypeContextMenuStrip.Name = "newProblemDataTypeContextMenuStrip";
     163      this.newProblemDataTypeContextMenuStrip.Size = new System.Drawing.Size(190, 70);
     164      //
     165      // newRegressionToolStripMenuItem
     166      //
     167      this.newRegressionToolStripMenuItem.Name = "newRegressionToolStripMenuItem";
     168      this.newRegressionToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
     169      this.newRegressionToolStripMenuItem.Text = "Regression";
     170      this.newRegressionToolStripMenuItem.Click += new System.EventHandler(this.newRegressionToolStripMenuItem_Click);
     171      //
     172      // newClassificationToolStripMenuItem
     173      //
     174      this.newClassificationToolStripMenuItem.Name = "newClassificationToolStripMenuItem";
     175      this.newClassificationToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
     176      this.newClassificationToolStripMenuItem.Text = "Classification";
     177      this.newClassificationToolStripMenuItem.Click += new System.EventHandler(this.newClassificationToolStripMenuItem_Click);
     178      //
     179      // newTimeSeriesToolStripMenuItem
     180      //
     181      this.newTimeSeriesToolStripMenuItem.Name = "newTimeSeriesToolStripMenuItem";
     182      this.newTimeSeriesToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
     183      this.newTimeSeriesToolStripMenuItem.Text = "Time Series Prognosis";
     184      this.newTimeSeriesToolStripMenuItem.Click += new System.EventHandler(this.newTimeSeriesToolStripMenuItem_Click);
     185      //
     186      // importProblemDataTypeContextMenuStrip
     187      //
     188      this.importProblemDataTypeContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     189            this.importRegressionToolStripMenuItem,
     190            this.importClassificationToolStripMenuItem,
     191            this.importTimeSeriesToolStripMenuItem});
     192      this.importProblemDataTypeContextMenuStrip.Name = "newProblemDataTypeContextMenuStrip";
     193      this.importProblemDataTypeContextMenuStrip.Size = new System.Drawing.Size(190, 92);
     194      //
     195      // importRegressionToolStripMenuItem
     196      //
     197      this.importRegressionToolStripMenuItem.Name = "importRegressionToolStripMenuItem";
     198      this.importRegressionToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
     199      this.importRegressionToolStripMenuItem.Text = "Regression";
     200      this.importRegressionToolStripMenuItem.Click += new System.EventHandler(this.importRegressionToolStripMenuItem_Click);
     201      //
     202      // importClassificationToolStripMenuItem
     203      //
     204      this.importClassificationToolStripMenuItem.Name = "importClassificationToolStripMenuItem";
     205      this.importClassificationToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
     206      this.importClassificationToolStripMenuItem.Text = "Classification";
     207      this.importClassificationToolStripMenuItem.Click += new System.EventHandler(this.importClassificationToolStripMenuItem_Click);
     208      //
     209      // importTimeSeriesToolStripMenuItem
     210      //
     211      this.importTimeSeriesToolStripMenuItem.Name = "importTimeSeriesToolStripMenuItem";
     212      this.importTimeSeriesToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
     213      this.importTimeSeriesToolStripMenuItem.Text = "Time Series Prognosis";
     214      this.importTimeSeriesToolStripMenuItem.Click += new System.EventHandler(this.importTimeSeriesToolStripMenuItem_Click);
     215      //
    147216      // viewShortcutListView
    148217      //
     
    152221      this.viewShortcutListView.Caption = "ViewShortcutCollection View";
    153222      this.viewShortcutListView.Content = null;
    154       this.viewShortcutListView.Location = new System.Drawing.Point(4, 86);
     223      this.viewShortcutListView.Location = new System.Drawing.Point(4, 56);
    155224      this.viewShortcutListView.Name = "viewShortcutListView";
    156225      this.viewShortcutListView.ReadOnly = false;
    157       this.viewShortcutListView.Size = new System.Drawing.Size(831, 360);
     226      this.viewShortcutListView.Size = new System.Drawing.Size(831, 390);
    158227      this.viewShortcutListView.TabIndex = 7;
     228      //
     229      // applyTypeContextMenuStrip
     230      //
     231      this.applyTypeContextMenuStrip.Name = "newProblemDataTypeContextMenuStrip";
     232      this.applyTypeContextMenuStrip.Size = new System.Drawing.Size(61, 4);
     233      //
     234      // exportTypeContextMenuStrip
     235      //
     236      this.exportTypeContextMenuStrip.Name = "newProblemDataTypeContextMenuStrip";
     237      this.exportTypeContextMenuStrip.Size = new System.Drawing.Size(61, 4);
    159238      //
    160239      // DataPreprocessingView
     
    162241      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    163242      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    164       this.Controls.Add(this.applyComboBox);
    165       this.Controls.Add(this.exportLabel);
     243      this.Controls.Add(this.newButton);
     244      this.Controls.Add(this.importButton);
     245      this.Controls.Add(this.applyInNewTabButton);
    166246      this.Controls.Add(this.exportProblemButton);
    167       this.Controls.Add(this.applyInNewTabButton);
     247      this.Controls.Add(this.undoButton);
     248      this.Controls.Add(this.redoButton);
    168249      this.Controls.Add(this.lblFilterActive);
    169250      this.Controls.Add(this.viewShortcutListView);
    170       this.Controls.Add(this.redoButton);
    171       this.Controls.Add(this.undoButton);
    172251      this.Name = "DataPreprocessingView";
    173252      this.Size = new System.Drawing.Size(838, 449);
    174       this.Controls.SetChildIndex(this.undoButton, 0);
    175       this.Controls.SetChildIndex(this.redoButton, 0);
    176253      this.Controls.SetChildIndex(this.viewShortcutListView, 0);
    177254      this.Controls.SetChildIndex(this.lblFilterActive, 0);
     255      this.Controls.SetChildIndex(this.redoButton, 0);
     256      this.Controls.SetChildIndex(this.undoButton, 0);
     257      this.Controls.SetChildIndex(this.exportProblemButton, 0);
     258      this.Controls.SetChildIndex(this.applyInNewTabButton, 0);
     259      this.Controls.SetChildIndex(this.importButton, 0);
     260      this.Controls.SetChildIndex(this.newButton, 0);
     261      this.Controls.SetChildIndex(this.infoLabel, 0);
     262      this.Controls.SetChildIndex(this.nameTextBox, 0);
    178263      this.Controls.SetChildIndex(this.nameLabel, 0);
    179       this.Controls.SetChildIndex(this.nameTextBox, 0);
    180       this.Controls.SetChildIndex(this.infoLabel, 0);
    181       this.Controls.SetChildIndex(this.applyInNewTabButton, 0);
    182       this.Controls.SetChildIndex(this.exportProblemButton, 0);
    183       this.Controls.SetChildIndex(this.exportLabel, 0);
    184       this.Controls.SetChildIndex(this.applyComboBox, 0);
    185264      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     265      this.newProblemDataTypeContextMenuStrip.ResumeLayout(false);
     266      this.importProblemDataTypeContextMenuStrip.ResumeLayout(false);
    186267      this.ResumeLayout(false);
    187268      this.PerformLayout();
     
    196277    private ViewShortcutListView viewShortcutListView;
    197278    private System.Windows.Forms.Label lblFilterActive;
    198     private System.Windows.Forms.Label exportLabel;
    199279    private System.Windows.Forms.Button redoButton;
    200     private System.Windows.Forms.ComboBox applyComboBox;
     280    private System.Windows.Forms.Button newButton;
     281    private System.Windows.Forms.Button importButton;
     282    private System.Windows.Forms.ContextMenuStrip newProblemDataTypeContextMenuStrip;
     283    private System.Windows.Forms.ToolStripMenuItem newRegressionToolStripMenuItem;
     284    private System.Windows.Forms.ToolStripMenuItem newClassificationToolStripMenuItem;
     285    private System.Windows.Forms.ToolStripMenuItem newTimeSeriesToolStripMenuItem;
     286    private System.Windows.Forms.ContextMenuStrip importProblemDataTypeContextMenuStrip;
     287    private System.Windows.Forms.ToolStripMenuItem importRegressionToolStripMenuItem;
     288    private System.Windows.Forms.ToolStripMenuItem importClassificationToolStripMenuItem;
     289    private System.Windows.Forms.ToolStripMenuItem importTimeSeriesToolStripMenuItem;
     290    private System.Windows.Forms.ContextMenuStrip applyTypeContextMenuStrip;
     291    private System.Windows.Forms.ContextMenuStrip exportTypeContextMenuStrip;
    201292  }
    202293}
  • trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs

    r13502 r13508  
    3434      IDataAnalysisProblem problem;
    3535      GetMostOuterContent(currentView as Control, out algorithm, out problem);
    36       var context = new PreprocessingContext(algorithm ?? problem ?? problemData as IItem);
     36      var context = new PreprocessingContext(problemData, algorithm ?? problem ?? problemData as IItem);
    3737      MainFormManager.MainForm.ShowContent(context);
    3838    }
  • trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj

    r13502 r13508  
    255255      <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project>
    256256      <Name>HeuristicLab.Collections-3.3</Name>
     257      <Private>False</Private>
    257258    </ProjectReference>
    258259    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
     
    309310      <Project>{C664305E-497C-4533-A140-967DEDB05C19}</Project>
    310311      <Name>HeuristicLab.Optimizer-3.3</Name>
     312      <Private>False</Private>
    311313    </ProjectReference>
    312314    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
     
    323325      <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project>
    324326      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
     327      <Private>False</Private>
     328    </ProjectReference>
     329    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.DataAnalysis.Views\3.3\HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj">
     330      <Project>{72232235-B6CF-4E6C-B086-9E9E11AA0717}</Project>
     331      <Name>HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3</Name>
     332      <Private>False</Private>
     333    </ProjectReference>
     334    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.DataAnalysis\3.3\HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj">
     335      <Project>{94C7714E-29D4-4D6D-B213-2C18D627AB75}</Project>
     336      <Name>HeuristicLab.Problems.Instances.DataAnalysis-3.3</Name>
     337      <Private>False</Private>
     338    </ProjectReference>
     339    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
     340      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
     341      <Name>HeuristicLab.Problems.Instances-3.3</Name>
    325342      <Private>False</Private>
    326343    </ProjectReference>
  • trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/Plugin.cs.frame

    r13504 r13508  
    4444  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
    4545  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views", "3.4")]
     46  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
     47  [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")]
     48  [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis.Views", "3.3")]
    4649  [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")]
    4750  public class HeuristicLabDataPreprocessingViewPlugin : PluginBase {
Note: See TracChangeset for help on using the changeset viewer.