Changeset 5337 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/MetaOptimizationProblemView.cs
- Timestamp:
- 01/20/11 01:30:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/MetaOptimizationProblemView.cs
r5328 r5337 72 72 73 73 if (dlgResult == DialogResult.OK) { 74 EngineAlgorithm algorithm = Content.Algorithm;74 IAlgorithm algorithm = Content.Algorithm; 75 75 if(Content.Problems.Count > 0) algorithm.Problem = Content.Problems.First(); 76 76 Experiment experiment; … … 93 93 Type type = e.Data.GetData("Type") as Type; 94 94 if ((type != null) && (Content.AlgorithmType.ValidTypes.Contains(type))) { 95 EngineAlgorithm algorithm = e.Data.GetData("Value") as EngineAlgorithm;96 if (algorithm .Problem == null || Content.ProblemType.ValidTypes.Contains(algorithm.Problem.GetType())) {95 IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm; 96 if (algorithm != null && algorithm.Problem == null || Content.ProblemType.ValidTypes.Contains(algorithm.Problem.GetType())) { 97 97 e.Effect = DragDropEffects.Copy; 98 98 } … … 101 101 protected void parameterCollectionView_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { 102 102 if (e.Effect != DragDropEffects.None) { 103 EngineAlgorithm algorithm = e.Data.GetData("Value") as EngineAlgorithm;103 IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm; 104 104 Content.ImportAlgorithm(algorithm); 105 105 }
Note: See TracChangeset
for help on using the changeset viewer.