// Background Thread Function: Get all the additional Project data
 private void ProjectDataBackgroundLoading(List <IProject> projectlist)
 {
     foreach (IProject p in projectlist)
     {
         p.ChangeLog  = getProjectChangeLog(p.ID);
         p.RoadMap    = getProjectRoadMap(p.ID);
         p.Types      = getTypes(p.ID);
         p.Priorities = getPriorities(p.ID);
         p.Versions   = getVersions(p.ID);
         p.AllLoaded  = true;
         UpdatedProjectEventArgs eventargs = new UpdatedProjectEventArgs(p);
         this._eventAggregator.GetEvent <UpdatedProjectEvent>().Publish(eventargs);
     }
 }
 private void OnProjectUpdated(UpdatedProjectEventArgs e)
 {
     // Prevent "Null reference Exception" (... appeared only occasionally?!?)
     if (this.SelectedProject != null && e.Project != null)
     {
         // Update only, if the currently visible Project information changed
         if (e.Project.ID == this.SelectedProject.ID)
         {
             this.SelectedProject = null;
             this.SelectedProject = e.Project;
             if (e.Project.Versions != null)
             {
                 this.SelectedVersion = e.Project.Versions.ElementAtOrDefault(0);
             }
             this.DataLoaded   = (e.Project.AllLoaded) ? 100 : 10;
             this.CanCalculate = (DataLoaded == 100) ? true : false;
         }
     }
 }