Changeset 11281
- Timestamp:
- 08/18/14 14:29:03 (10 years ago)
- Location:
- stable
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 11214
- Property svn:mergeinfo changed
-
stable/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs
r11170 r11281 21 21 22 22 using System.Windows.Forms; 23 using HeuristicLab.Core;24 using HeuristicLab.Core.Views;25 23 using HeuristicLab.MainForm; 26 24 using HeuristicLab.Optimization; 27 25 using HeuristicLab.Problems.DataAnalysis; 28 26 using HeuristicLab.Problems.DataAnalysis.Views; 29 using View = HeuristicLab.MainForm.WindowsForms.View;30 27 31 28 namespace HeuristicLab.DataPreprocessing.Views { 32 29 public class DataPreprocessorStarter : IDataPreprocessorStarter { 33 30 34 public void Start(IDataAnalysisProblemData problemData, View currentView) {31 public void Start(IDataAnalysisProblemData problemData, IContentView currentView) { 35 32 IAlgorithm algorithm; 36 33 IDataAnalysisProblem problem; 37 IItem parentItem = GetMostOuterContent(currentView, out algorithm, out problem);34 GetMostOuterContent(currentView as Control, out algorithm, out problem); 38 35 var context = new PreprocessingContext(problemData, algorithm, problem); 39 36 MainFormManager.MainForm.ShowContent(context); 40 37 } 41 38 42 private IItemGetMostOuterContent(Control control, out IAlgorithm algorithm, out IDataAnalysisProblem problem) {39 private void GetMostOuterContent(Control control, out IAlgorithm algorithm, out IDataAnalysisProblem problem) { 43 40 algorithm = null; 44 41 problem = null; 45 ItemView itemView = null; 46 do { 42 43 while (control != null) { 44 IContentView contentView = control as IContentView; 45 if (contentView != null) { 46 algorithm = contentView.Content as IAlgorithm; 47 problem = contentView.Content as IDataAnalysisProblem; 48 } 47 49 control = control.Parent; 48 if (control is ItemView) { 49 itemView = (ItemView)control; 50 if (itemView.Content is IAlgorithm) { 51 algorithm = (IAlgorithm)itemView.Content; 52 } 53 if (itemView.Content is IDataAnalysisProblem) { 54 problem = (IDataAnalysisProblem)itemView.Content; 55 } 56 } 57 } while (control != null); 58 59 return itemView.Content; 50 } 60 51 } 61 52 } -
stable/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Views merged: 11214
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IDataPreprocessorStarter.cs
r11170 r11281 20 20 #endregion 21 21 22 using HeuristicLab.MainForm .WindowsForms;22 using HeuristicLab.MainForm; 23 23 24 24 namespace HeuristicLab.Problems.DataAnalysis.Views { 25 25 public interface IDataPreprocessorStarter { 26 void Start(IDataAnalysisProblemData problemData, View currentView);26 void Start(IDataAnalysisProblemData problemData, IContentView currentView); 27 27 } 28 28 }
Note: See TracChangeset
for help on using the changeset viewer.