Changeset 5837 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views
- Timestamp:
- 03/28/11 14:53:01 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.cs
r5744 r5837 317 317 private void algorithmTabPage_DragEnterOver(object sender, DragEventArgs e) { 318 318 e.Effect = DragDropEffects.None; 319 IAlgorithm algorithm = e.Data.GetData( "HeuristicLab") as IAlgorithm;319 IAlgorithm algorithm = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IAlgorithm; 320 320 if (!ReadOnly && (algorithm != null) && Content.ProblemType.IsAssignableFrom(algorithm.Problem.GetType())) { 321 321 if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key … … 328 328 private void algorithmTabPage_DragDrop(object sender, DragEventArgs e) { 329 329 if (e.Effect != DragDropEffects.None) { 330 IAlgorithm algorithm = e.Data.GetData( "HeuristicLab") as IAlgorithm;330 IAlgorithm algorithm = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IAlgorithm; 331 331 if (e.Effect.HasFlag(DragDropEffects.Copy)) algorithm = (IAlgorithm)algorithm.Clone(); 332 332 Content.Algorithm = algorithm; … … 336 336 private void algorithmProblemTabPage_DragEnterOver(object sender, DragEventArgs e) { 337 337 e.Effect = DragDropEffects.None; 338 Type type = e.Data.GetData( "HeuristicLab") != null ? e.Data.GetData("HeuristicLab").GetType() : null;338 Type type = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) != null ? e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat).GetType() : null; 339 339 if (!ReadOnly && (type != null) && Content.ProblemType.IsAssignableFrom(type) && Content.Algorithm.ProblemType.IsAssignableFrom(type)) { 340 340 if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key … … 347 347 private void algorithmProblemTabPage_DragDrop(object sender, DragEventArgs e) { 348 348 if (e.Effect != DragDropEffects.None) { 349 ISingleObjectiveDataAnalysisProblem problem = e.Data.GetData( "HeuristicLab") as ISingleObjectiveDataAnalysisProblem;349 ISingleObjectiveDataAnalysisProblem problem = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as ISingleObjectiveDataAnalysisProblem; 350 350 if (e.Effect.HasFlag(DragDropEffects.Copy)) problem = (ISingleObjectiveDataAnalysisProblem)problem.Clone(); 351 351 Content.Problem = problem; -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs
r5834 r5837 317 317 private void algorithmTabPage_DragEnterOver(object sender, DragEventArgs e) { 318 318 e.Effect = DragDropEffects.None; 319 IAlgorithm algorithm = e.Data.GetData( "HeuristicLab") as IAlgorithm;319 IAlgorithm algorithm = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IAlgorithm; 320 320 if (!ReadOnly && algorithm != null && 321 321 (algorithm.ProblemType != null || Content.ProblemType.IsAssignableFrom(algorithm.Problem.GetType()))) { … … 329 329 private void algorithmTabPage_DragDrop(object sender, DragEventArgs e) { 330 330 if (e.Effect != DragDropEffects.None) { 331 IAlgorithm algorithm = e.Data.GetData( "HeuristicLab") as IAlgorithm;331 IAlgorithm algorithm = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IAlgorithm; 332 332 if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) algorithm = (IAlgorithm)algorithm.Clone(); 333 333 Content.Algorithm = algorithm; … … 338 338 e.Effect = DragDropEffects.None; 339 339 if (ReadOnly) return; 340 IProblem problem = e.Data.GetData( "HeuristicLab") as IProblem;340 IProblem problem = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IProblem; 341 341 if (problem != null && Content.ProblemType.IsAssignableFrom(problem.GetType()) && 342 342 Content.Algorithm.ProblemType.IsAssignableFrom(problem.GetType())) { … … 350 350 private void algorithmProblemTabPage_DragDrop(object sender, DragEventArgs e) { 351 351 if (e.Effect != DragDropEffects.None) { 352 IDataAnalysisProblem problem = e.Data.GetData( "HeuristicLab") as IDataAnalysisProblem;352 IDataAnalysisProblem problem = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IDataAnalysisProblem; 353 353 if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) problem = (IDataAnalysisProblem)problem.Clone(); 354 354 Content.Problem = problem;
Note: See TracChangeset
for help on using the changeset viewer.