Changeset 10307 for branches/DataPreprocessing
- Timestamp:
- 01/08/14 15:08:22 (11 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataPreprocessorStarter.cs
r10251 r10307 34 34 public void Start(IDataAnalysisProblemData problemData, View currentView) { 35 35 IAlgorithm algorithm; 36 IItem parentItem = GetMostOuterContent(currentView, out algorithm); 37 var context = new PreprocessingContext(problemData, parentItem, algorithm); 36 IProblem problem; 37 IItem parentItem = GetMostOuterContent(currentView, out algorithm, out problem); 38 var context = new PreprocessingContext(problemData, parentItem, algorithm, problem); 38 39 MainFormManager.MainForm.ShowContent(context); 39 40 } 40 41 41 private IItem GetMostOuterContent(Control control, out IAlgorithm algorithm ) {42 private IItem GetMostOuterContent(Control control, out IAlgorithm algorithm, out IProblem problem) { 42 43 algorithm = null; 44 problem = null; 43 45 ItemView itemView = null; 44 46 do { … … 49 51 algorithm = (IAlgorithm)itemView.Content; 50 52 } 53 if (itemView.Content is IProblem) { 54 problem = (IProblem)itemView.Content; 55 } 51 56 } 52 57 } while (control != null); … … 54 59 return itemView.Content; 55 60 } 56 57 61 } 58 59 62 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs
r10250 r10307 28 28 [Item("PreprocessingContext", "PreprocessingContext")] 29 29 public class PreprocessingContext : Item, IPreprocessingContext { 30 public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IItem parentItem, IAlgorithm algorithm ) {30 public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IItem parentItem, IAlgorithm algorithm, IProblem problem) { 31 31 Data = new PreprocessingData(dataAnalysisProblemData); 32 32 ParentItem = parentItem; 33 33 DataAnalysisProblemData = dataAnalysisProblemData; 34 34 Algorithm = algorithm; 35 Problem = problem; 35 36 } 36 37 … … 41 42 DataAnalysisProblemData = original.DataAnalysisProblemData; 42 43 Algorithm = original.Algorithm; 44 Problem = original.Problem; 43 45 } 44 46 … … 54 56 public IAlgorithm Algorithm { get; private set; } 55 57 58 public IProblem Problem { get; private set; } 59 56 60 public override IDeepCloneable Clone(Cloner cloner) { 57 61 return new PreprocessingContext(this, cloner); -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs
r10240 r10307 23 23 using HeuristicLab.Optimization; 24 24 using HeuristicLab.Problems.DataAnalysis; 25 25 26 namespace HeuristicLab.DataPreprocessing { 26 27 public interface IPreprocessingContext : IItem { … … 35 36 36 37 IAlgorithm Algorithm { get; } 38 39 IProblem Problem { get; } 37 40 } 38 41 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataPreprocessingView.cs
r10304 r10307 105 105 106 106 private void exportProblemButton_Click(object sender, EventArgs e) { 107 // TODO 107 var saveFileDialog = new SaveFileDialog { 108 Title = "Save Item", 109 DefaultExt = "hl", 110 Filter = "Uncompressed HeuristicLab Files|*.hl|HeuristicLab Files|*.hl|All Files|*.*", 111 FilterIndex = 2 112 }; 113 114 var content = Content.Problem as IStorableContent; 115 if (saveFileDialog.ShowDialog() == DialogResult.OK) { 116 bool compressed = saveFileDialog.FilterIndex != 1; 117 ContentManager.Save(content, saveFileDialog.FileName, compressed); 118 } 108 119 } 109 120 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataPreprocessingView.designer.cs
r10304 r10307 123 123 #endregion 124 124 125 private System.Windows.Forms.SplitContainer splitContainer1;126 125 private System.Windows.Forms.ListView contentListView; 127 126 private System.Windows.Forms.Button exportProblemButton; 128 127 private System.Windows.Forms.Button applyInNewTabButton; 129 128 private MainForm.WindowsForms.ViewHost viewHost; 129 private System.Windows.Forms.SplitContainer splitContainer1; 130 130 131 131 } -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IDataPreprocessorStarter.cs
r10250 r10307 20 20 #endregion 21 21 22 23 22 using HeuristicLab.MainForm.WindowsForms; 24 23
Note: See TracChangeset
for help on using the changeset viewer.