Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/29/18 16:45:24 (6 years ago)
Author:
jkarder
Message:

#2839: worked on hive project management

  • removed usage of null-conditional operator
Location:
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs

    r16040 r16095  
    436436        }
    437437        treeView.Nodes.Add(ungroupedGroupNode);
    438       } else {
    439         ungroupedGroupNode?.Nodes.Clear();
     438      } else if (ungroupedGroupNode != null) {
     439        ungroupedGroupNode.Nodes.Clear();
    440440      }
    441441
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs

    r16072 r16095  
    338338
    339339      foreach (var r in resources) {
    340         r.ParentResourceId = targetResource?.Id;
     340        r.ParentResourceId = targetResource != null ? targetResource.Id : (Guid?)null;
    341341      }
    342342
     
    381381      var resources = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IEnumerable<Resource>;
    382382      var targetNode = treeView.GetNodeAt(treeView.PointToClient(new Point(e.X, e.Y)));
    383       var targetResource = targetNode?.Tag as Resource;
     383      var targetResource = (targetNode != null ? targetNode.Tag : null) as Resource;
    384384
    385385      if (!IsAdmin()
     
    637637          n.ForeColor = offlineColor;
    638638          if (s.LastHeartbeat.HasValue)
    639             n.Text += " [" + s.LastHeartbeat?.ToString("g") + "]";
     639            n.Text += " [" + (s.LastHeartbeat != null ? s.LastHeartbeat.Value.ToString("g") : null) + "]";
    640640        }
    641641      } else {
Note: See TracChangeset for help on using the changeset viewer.