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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.cs

    r16094 r16095  
    299299          || newIncludedResources.Contains(checkedResource)) {
    300300          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);
    302306        }
    303307      }
     
    814818    public event EventHandler SelectedProjectChanged;
    815819    private void OnSelectedProjectChanged() {
    816       SelectedProjectChanged?.Invoke(this, EventArgs.Empty);
     820      var handler = SelectedProjectChanged;
     821      if (handler != null) handler(this, EventArgs.Empty);
    817822    }
    818823
    819824    public event EventHandler AssignedResourcesChanged;
    820825    private void OnAssignedResourcesChanged() {
    821       AssignedResourcesChanged?.Invoke(this, EventArgs.Empty);
     826      var handler = AssignedResourcesChanged;
     827      if (handler != null) handler(this, EventArgs.Empty);
    822828    }
    823829
    824830    public event EventHandler ProjectsTreeViewDoubleClicked;
    825831    private void OnProjectsTreeViewDoubleClicked() {
    826       ProjectsTreeViewDoubleClicked?.Invoke(this, EventArgs.Empty);
     832      var handler = ProjectsTreeViewDoubleClicked;
     833      if (handler != null) handler(this, EventArgs.Empty);
    827834    }
    828835    #endregion
Note: See TracChangeset for help on using the changeset viewer.