Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/11 14:53:01 (13 years ago)
Author:
swagner
Message:

Implemented review comments of mkommend (#1112)

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  
    317317    private void algorithmTabPage_DragEnterOver(object sender, DragEventArgs e) {
    318318      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;
    320320      if (!ReadOnly && (algorithm != null) && Content.ProblemType.IsAssignableFrom(algorithm.Problem.GetType())) {
    321321        if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link;  // ALT key
     
    328328    private void algorithmTabPage_DragDrop(object sender, DragEventArgs e) {
    329329      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;
    331331        if (e.Effect.HasFlag(DragDropEffects.Copy)) algorithm = (IAlgorithm)algorithm.Clone();
    332332        Content.Algorithm = algorithm;
     
    336336    private void algorithmProblemTabPage_DragEnterOver(object sender, DragEventArgs e) {
    337337      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;
    339339      if (!ReadOnly && (type != null) && Content.ProblemType.IsAssignableFrom(type) && Content.Algorithm.ProblemType.IsAssignableFrom(type)) {
    340340        if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link;  // ALT key
     
    347347    private void algorithmProblemTabPage_DragDrop(object sender, DragEventArgs e) {
    348348      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;
    350350        if (e.Effect.HasFlag(DragDropEffects.Copy)) problem = (ISingleObjectiveDataAnalysisProblem)problem.Clone();
    351351        Content.Problem = problem;
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs

    r5834 r5837  
    317317    private void algorithmTabPage_DragEnterOver(object sender, DragEventArgs e) {
    318318      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;
    320320      if (!ReadOnly && algorithm != null &&
    321321        (algorithm.ProblemType != null || Content.ProblemType.IsAssignableFrom(algorithm.Problem.GetType()))) {
     
    329329    private void algorithmTabPage_DragDrop(object sender, DragEventArgs e) {
    330330      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;
    332332        if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) algorithm = (IAlgorithm)algorithm.Clone();
    333333        Content.Algorithm = algorithm;
     
    338338      e.Effect = DragDropEffects.None;
    339339      if (ReadOnly) return;
    340       IProblem problem = e.Data.GetData("HeuristicLab") as IProblem;
     340      IProblem problem = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IProblem;
    341341      if (problem != null && Content.ProblemType.IsAssignableFrom(problem.GetType()) &&
    342342        Content.Algorithm.ProblemType.IsAssignableFrom(problem.GetType())) {
     
    350350    private void algorithmProblemTabPage_DragDrop(object sender, DragEventArgs e) {
    351351      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;
    353353        if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) problem = (IDataAnalysisProblem)problem.Clone();
    354354        Content.Problem = problem;
Note: See TracChangeset for help on using the changeset viewer.