- Timestamp:
- 01/13/16 14:51:38 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
r13502 r13507 21 21 22 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 23 25 using System.Windows.Forms; 24 26 using HeuristicLab.Common; … … 30 32 [View("DataPreprocessing View")] 31 33 [Content(typeof(PreprocessingContext), true)] 32 public partial class DataPreprocessingView : ItemView {34 public partial class DataPreprocessingView : NamedItemView { 33 35 34 36 public DataPreprocessingView() { … … 70 72 viewShortcutListView.Select(); 71 73 74 applyComboBox.Items.Clear(); 75 applyComboBox.DataSource = Content.ExportPossibilities.ToList(); 76 applyComboBox.DisplayMember = "Key"; 77 if (applyComboBox.Items.Count > 0) 78 applyComboBox.SelectedIndex = 0; 72 79 } else { 73 80 viewShortcutListView.Content = null; … … 98 105 99 106 private void exportProblemButton_Click(object sender, EventArgs e) { 100 // ToDo: select one export probability101 var problem = Content.Export();107 var exportOption = (KeyValuePair<string, Func<IItem>>)applyComboBox.SelectedItem; 108 var exportItem = exportOption.Value(); 102 109 103 110 var saveFileDialog = new SaveFileDialog { … … 108 115 }; 109 116 110 var content = problem as IStorableContent;117 var content = exportItem as IStorableContent; 111 118 if (saveFileDialog.ShowDialog() == DialogResult.OK) { 112 119 bool compressed = saveFileDialog.FilterIndex != 1; … … 116 123 117 124 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(); 119 127 120 MainFormManager.MainForm.ShowContent( item);128 MainFormManager.MainForm.ShowContent(exportItem); 121 129 } 122 130
Note: See TracChangeset
for help on using the changeset viewer.