Free cookie consent management tool by TermsFeed Policy Generator

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

#2559

  • Enabled different export types for preprocessing.
  • Hid unused buttons in ViewShortcutListView.
  • Made data preprocessing a NamedItem to allow naming.
File:
1 edited

Legend:

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

    r13502 r13507  
    2121
    2222using System;
     23using System.Collections.Generic;
     24using System.Linq;
    2325using System.Windows.Forms;
    2426using HeuristicLab.Common;
     
    3032  [View("DataPreprocessing View")]
    3133  [Content(typeof(PreprocessingContext), true)]
    32   public partial class DataPreprocessingView : ItemView {
     34  public partial class DataPreprocessingView : NamedItemView {
    3335
    3436    public DataPreprocessingView() {
     
    7072        viewShortcutListView.Select();
    7173
     74        applyComboBox.Items.Clear();
     75        applyComboBox.DataSource = Content.ExportPossibilities.ToList();
     76        applyComboBox.DisplayMember = "Key";
     77        if (applyComboBox.Items.Count > 0)
     78          applyComboBox.SelectedIndex = 0;
    7279      } else {
    7380        viewShortcutListView.Content = null;
     
    98105
    99106    private void exportProblemButton_Click(object sender, EventArgs e) {
    100       // ToDo: select one export probability
    101       var problem = Content.Export();
     107      var exportOption = (KeyValuePair<string, Func<IItem>>)applyComboBox.SelectedItem;
     108      var exportItem = exportOption.Value();
    102109
    103110      var saveFileDialog = new SaveFileDialog {
     
    108115      };
    109116
    110       var content = problem as IStorableContent;
     117      var content = exportItem as IStorableContent;
    111118      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
    112119        bool compressed = saveFileDialog.FilterIndex != 1;
     
    116123
    117124    private void applyInNewTabButton_Click(object sender, EventArgs e) {
    118       var item = Content.Export();
     125      var exportOption = (KeyValuePair<string, Func<IItem>>)applyComboBox.SelectedItem;
     126      var exportItem = exportOption.Value();
    119127
    120       MainFormManager.MainForm.ShowContent(item);
     128      MainFormManager.MainForm.ShowContent(exportItem);
    121129    }
    122130
Note: See TracChangeset for help on using the changeset viewer.