Changeset 6017 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3
- Timestamp:
- 04/17/11 11:03:48 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/MetaOptimizationProblemView.cs
r5654 r6017 2 2 using System.Linq; 3 3 using System.Windows.Forms; 4 using HeuristicLab.Common; 4 5 using HeuristicLab.Core; 5 6 using HeuristicLab.MainForm; … … 89 90 private void parameterCollectionView_DragEnterOver(object sender, System.Windows.Forms.DragEventArgs e) { 90 91 e.Effect = DragDropEffects.None; 91 Type type = e.Data.GetData("Type") as Type;92 if ( (type != null)&& (Content.AlgorithmType.ValidTypes.Contains(type))) {93 IAlgorithm algorithm = e.Data.GetData( "Value") as IAlgorithm;92 var type = e.Data.GetData(Constants.DragDropDataFormat).GetType(); 93 if (!ReadOnly && (Content.AlgorithmType.ValidTypes.Contains(type))) { 94 IAlgorithm algorithm = e.Data.GetData(Constants.DragDropDataFormat) as IAlgorithm; 94 95 if (algorithm != null && algorithm.Problem == null || Content.ProblemType.ValidTypes.Contains(algorithm.Problem.GetType())) { 95 96 e.Effect = DragDropEffects.Copy; … … 99 100 private void parameterCollectionView_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { 100 101 if (e.Effect != DragDropEffects.None) { 101 IAlgorithm algorithm = e.Data.GetData( "Value") as IAlgorithm;102 IAlgorithm algorithm = e.Data.GetData(Constants.DragDropDataFormat) as IAlgorithm; 102 103 Content.ImportAlgorithm(algorithm); 103 104 }
Note: See TracChangeset
for help on using the changeset viewer.