- Timestamp:
- 08/29/18 16:45:24 (6 years ago)
- Location:
- branches/2839_HiveProjectManagement
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs
r16040 r16095 436 436 } 437 437 treeView.Nodes.Add(ungroupedGroupNode); 438 } else {439 ungroupedGroupNode ?.Nodes.Clear();438 } else if (ungroupedGroupNode != null) { 439 ungroupedGroupNode.Nodes.Clear(); 440 440 } 441 441 -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
r16072 r16095 338 338 339 339 foreach (var r in resources) { 340 r.ParentResourceId = targetResource ?.Id;340 r.ParentResourceId = targetResource != null ? targetResource.Id : (Guid?)null; 341 341 } 342 342 … … 381 381 var resources = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IEnumerable<Resource>; 382 382 var targetNode = treeView.GetNodeAt(treeView.PointToClient(new Point(e.X, e.Y))); 383 var targetResource = targetNode?.Tagas Resource;383 var targetResource = (targetNode != null ? targetNode.Tag : null) as Resource; 384 384 385 385 if (!IsAdmin() … … 637 637 n.ForeColor = offlineColor; 638 638 if (s.LastHeartbeat.HasValue) 639 n.Text += " [" + s.LastHeartbeat?.ToString("g") + "]";639 n.Text += " [" + (s.LastHeartbeat != null ? s.LastHeartbeat.Value.ToString("g") : null) + "]"; 640 640 } 641 641 } else { -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.cs
r16094 r16095 299 299 || newIncludedResources.Contains(checkedResource)) { 300 300 e.Cancel = true; 301 ExtractStatistics((Resource)resourcesTreeView.SelectedNode?.Tag); 301 302 var selectedNode = resourcesTreeView.SelectedNode; 303 var selectedResource = (Resource)(selectedNode != null ? selectedNode.Tag : null); 304 305 ExtractStatistics(selectedResource); 302 306 } 303 307 } … … 814 818 public event EventHandler SelectedProjectChanged; 815 819 private void OnSelectedProjectChanged() { 816 SelectedProjectChanged?.Invoke(this, EventArgs.Empty); 820 var handler = SelectedProjectChanged; 821 if (handler != null) handler(this, EventArgs.Empty); 817 822 } 818 823 819 824 public event EventHandler AssignedResourcesChanged; 820 825 private void OnAssignedResourcesChanged() { 821 AssignedResourcesChanged?.Invoke(this, EventArgs.Empty); 826 var handler = AssignedResourcesChanged; 827 if (handler != null) handler(this, EventArgs.Empty); 822 828 } 823 829 824 830 public event EventHandler ProjectsTreeViewDoubleClicked; 825 831 private void OnProjectsTreeViewDoubleClicked() { 826 ProjectsTreeViewDoubleClicked?.Invoke(this, EventArgs.Empty); 832 var handler = ProjectsTreeViewDoubleClicked; 833 if (handler != null) handler(this, EventArgs.Empty); 827 834 } 828 835 #endregion
Note: See TracChangeset
for help on using the changeset viewer.