Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/03/14 11:38:40 (10 years ago)
Author:
ascheibe
Message:

#2117 implemented review comments:

  • fixed updating of enabled state in Hive menu items
  • fixed casts in RefreshableHiveJobView
  • fixed cloning call
  • removed hiveTaskFound variable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r10150 r11079  
    468468    private void jobsTreeView_DragEnter(object sender, DragEventArgs e) {
    469469      e.Effect = DragDropEffects.None;
    470       var obj = e.Data.GetData(Constants.DragDropDataFormat) as IDeepCloneable;
     470      var obj = (IDeepCloneable)e.Data.GetData(Constants.DragDropDataFormat);
     471
    471472      Type objType = obj.GetType();
    472 
    473       var hiveTaskFound = ItemTask.IsTypeSupported(objType);
    474       if (hiveTaskFound) {
     473      if (ItemTask.IsTypeSupported(objType)) {
    475474        if (Content.Id != Guid.Empty) e.Effect = DragDropEffects.None;
    476475        else if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link;  // ALT key
     
    481480    private void jobsTreeView_DragDrop(object sender, DragEventArgs e) {
    482481      if (e.Effect != DragDropEffects.None) {
    483         var obj = e.Data.GetData(Constants.DragDropDataFormat) as IItem;
     482        var obj = (IItem)e.Data.GetData(Constants.DragDropDataFormat);
    484483
    485484        IItem newObj = null;
    486485        if (e.Effect.HasFlag(DragDropEffects.Copy)) {
    487           newObj = obj.Clone(new Cloner()) as IItem;
     486          newObj = (IItem)obj.Clone();
    488487        } else {
    489488          newObj = obj;
     
    495494        }
    496495        if (newObj is IExecutable) {
    497           IExecutable exec = newObj as IExecutable;
     496          IExecutable exec = (IExecutable)newObj;
    498497          if (exec.ExecutionState != ExecutionState.Prepared) {
    499498            exec.Prepare();
Note: See TracChangeset for help on using the changeset viewer.