Changeset 11594 for branches/Breadcrumbs/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs
- Timestamp:
- 11/27/14 11:23:37 (9 years ago)
- Location:
- branches/Breadcrumbs
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/Breadcrumbs
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Breadcrumbs/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs
r10676 r11594 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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 }
Note: See TracChangeset
for help on using the changeset viewer.