Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/22/11 16:45:46 (13 years ago)
Author:
mkommend
Message:

#1418: Merged trunk changes into branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs

    r5445 r5796  
    162162    protected virtual void valueGroupBox_DragEnterOver(object sender, DragEventArgs e) {
    163163      e.Effect = DragDropEffects.None;
    164       Type type = e.Data.GetData("Type") as Type;
    165       if (!ReadOnly && (type != null) && (Content.DataType.IsAssignableFrom(type))) {
     164      if (!ReadOnly && (e.Data.GetData("HeuristicLab") != null) && Content.DataType.IsAssignableFrom(e.Data.GetData("HeuristicLab").GetType())) {
    166165        if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link;  // ALT key
    167166        else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move;  // SHIFT key
    168         else if ((e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) e.Effect = DragDropEffects.Copy;
    169         else if ((e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) e.Effect = DragDropEffects.Move;
    170         else if ((e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) e.Effect = DragDropEffects.Link;
     167        else if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy;
     168        else if (e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move;
     169        else if (e.AllowedEffect.HasFlag(DragDropEffects.Link)) e.Effect = DragDropEffects.Link;
    171170      }
    172171    }
    173172    protected virtual void valueGroupBox_DragDrop(object sender, DragEventArgs e) {
    174173      if (e.Effect != DragDropEffects.None) {
    175         T value = e.Data.GetData("Value") as T;
    176         if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) value = (T)value.Clone();
     174        T value = e.Data.GetData("HeuristicLab") as T;
     175        if (e.Effect.HasFlag(DragDropEffects.Copy)) value = (T)value.Clone();
    177176        Content.Value = value;
    178177      }
Note: See TracChangeset for help on using the changeset viewer.