Index: branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.Designer.cs
===================================================================
--- branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.Designer.cs	(revision 15992)
+++ branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.Designer.cs	(revision 15995)
@@ -123,4 +123,5 @@
       this.treeView.BeforeCheck += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeView_BeforeCheck);
       this.treeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterCheck);
+      this.treeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeView_BeforeSelect);
       this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect);
       // 
Index: branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs
===================================================================
--- branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs	(revision 15992)
+++ branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs	(revision 15995)
@@ -55,4 +55,7 @@
     private readonly Color addedIncludeColor = Color.FromArgb(25, 169, 221, 221); // #a9dddd
     private readonly Color removedIncludeColor = Color.FromArgb(25, 249, 210, 145); // #f9d291
+    private readonly Color selectedBackColor = Color.DodgerBlue;
+    private readonly Color selectedForeColor = Color.White;
+    private readonly Color grayTextColor = SystemColors.GrayText;
 
     private HashSet<Resource> projectExclusiveResources = new HashSet<Resource>();
@@ -83,5 +86,5 @@
         UpdateAssignedResources();
         UpdateIncludedResources();
-        var top = BuildResourceTree(HiveAdminClient.Instance.Resources);
+        var top = BuildResourceTree();
         detailsViewHost.Content = top;
         detailsViewHost.Locked = true;
@@ -108,5 +111,5 @@
       UpdateAssignedResources();
       UpdateIncludedResources();
-      var top = BuildResourceTree(HiveAdminClient.Instance.Resources);
+      var top = BuildResourceTree();
       detailsViewHost.Content = top;
     }
@@ -130,4 +133,13 @@
     }
 
+    private void treeView_BeforeSelect(object sender, TreeViewCancelEventArgs e) {
+      if (e.Node == null || e.Node == ungroupedGroupNode)
+        e.Cancel = true;
+
+      var selectedResource = (Resource)e.Node.Tag;
+      if(HiveAdminClient.Instance.DisabledParentResources.Contains(selectedResource))
+        e.Cancel = true;
+    }
+
     private void treeView_AfterSelect(object sender, TreeViewEventArgs e) {
       var selectedResource = (Resource)e.Node.Tag;
@@ -136,6 +148,14 @@
 
     private void treeView_BeforeCheck(object sender, TreeViewCancelEventArgs e) {
+      if (e.Node == null || e.Node == ungroupedGroupNode) {
+        e.Cancel = true;
+        return;
+      }
+        
       var checkedResource = (Resource)e.Node.Tag;
-      if (newIncludedResources.Contains(checkedResource) || checkedResource.Id == Guid.Empty || e.Node == ungroupedGroupNode) {
+      if (checkedResource == null
+        || checkedResource.Id == Guid.Empty
+        || HiveAdminClient.Instance.DisabledParentResources.Contains(checkedResource) 
+        || newIncludedResources.Contains(checkedResource)) {
         e.Cancel = true;
       } else if (!HiveRoles.CheckAdminUserPermissions()) {
@@ -164,5 +184,5 @@
       UpdateIncludedResources();
 
-      var top = BuildResourceTree(HiveAdminClient.Instance.Resources);
+      var top = BuildResourceTree();
       detailsViewHost.Content = top;
     }
@@ -171,5 +191,5 @@
       UpdateNewAssignedResources();
       UpdateNewIncludedResources();
-      var top = BuildResourceTree(HiveAdminClient.Instance.Resources);
+      var top = BuildResourceTree();
       detailsViewHost.Content = top;
     }
@@ -191,5 +211,5 @@
       // look up for assignments of ancestor projects
       var projectIds = new HashSet<Guid>();
-      HiveClient.Instance.GetAvailableProjectAncestors(projectId).ToList().ForEach(x => projectIds.Add(x.Id));
+      HiveAdminClient.Instance.GetAvailableProjectAncestors(projectId).ToList().ForEach(x => projectIds.Add(x.Id));
 
       var ancestorProjectResources = resources.Where(x => 
@@ -278,21 +298,30 @@
     }
 
-    private Resource BuildResourceTree(IEnumerable<Resource> resources) {
+    private Resource BuildResourceTree() {
       treeView.Nodes.Clear();
-      if (!resources.Any()) return null;
 
       treeView.BeforeCheck -= treeView_BeforeCheck;
       treeView.AfterCheck -= treeView_AfterCheck;
 
-      resources = GetAvailableResourcesForProjectAdministration(Content.Id);
-
+      var resources = GetAvailableResourcesForProjectAdministration(Content.Id);
+
+      var disabledParentResources = HiveAdminClient.Instance.DisabledParentResources;
       var mainResources = new HashSet<Resource>(resources.OfType<SlaveGroup>().Where(x => x.ParentResourceId == null));
-      var parentedMainResources = new HashSet<Resource>(resources.OfType<SlaveGroup>()
-        .Where(x => x.ParentResourceId.HasValue && !resources.Select(y => y.Id).Contains(x.ParentResourceId.Value)));
-      mainResources.UnionWith(parentedMainResources);
-      var subResources = new HashSet<Resource>(resources.Except(mainResources));
+      //var parentedMainResources = new HashSet<Resource>(resources.OfType<SlaveGroup>()
+      //  .Where(x => x.ParentResourceId.HasValue && !resources.Select(y => y.Id).Contains(x.ParentResourceId.Value)));
+      //mainResources.UnionWith(parentedMainResources);
+      var mainDisabledParentResources = new HashSet<Resource>(disabledParentResources.Where(x => x.ParentResourceId == null || x.ParentResourceId == Guid.Empty));
+      mainResources.UnionWith(mainDisabledParentResources);
+      var subResources = new HashSet<Resource>(resources.Union(disabledParentResources).Except(mainResources).OrderByDescending(x => x.Name));
 
       var stack = new Stack<Resource>(mainResources.OrderByDescending(x => x.Name));
+      
       Resource top = null;
+      //bool nodeSelected = false;
+      if (detailsViewHost != null && detailsViewHost.Content != null && detailsViewHost.Content is Resource) {
+        var resourceId = ((Resource)detailsViewHost.Content).Id;
+        top = resources.Where(x => x.Id == resourceId).FirstOrDefault();
+      }
+      
 
       TreeNode currentNode = null;
@@ -305,7 +334,16 @@
 
       while (stack.Any()) {
-        if(top == null)  top = stack.Peek();
         var newResource = stack.Pop();
         var newNode = new TreeNode(newResource.Name) { Tag = newResource };
+
+        if(top == null && !disabledParentResources.Contains(newResource)) {
+          top = newResource;
+        }
+
+        //if(!nodeSelected && top != null && newResource.Id == top.Id) {
+        //  newNode.BackColor = selectedBackColor;
+        //  newNode.ForeColor = selectedForeColor;
+        //  nodeSelected = true;
+        //}
 
         // search for parent node of newNode and save in currentNode
@@ -323,5 +361,8 @@
         }
 
-        if (newAssignedResources.Contains(newResource)) {
+        if (disabledParentResources.Contains(newResource)) {
+          newNode.Checked = false;
+          newNode.ForeColor = grayTextColor;
+        } else if (newAssignedResources.Contains(newResource)) {
           newNode.Checked = true;
           if(!HiveRoles.CheckAdminUserPermissions()) {
@@ -398,7 +439,24 @@
       treeView.BeforeCheck += treeView_BeforeCheck;
       treeView.AfterCheck += treeView_AfterCheck;
-      treeView.ExpandAll();
+      
+      ExpandResourceNodesOfInterest(treeView.Nodes);
 
       return top;
+    }
+
+    private void ExpandResourceNodesOfInterest(TreeNodeCollection nodes) {
+      foreach (TreeNode n in nodes) {
+        Resource r = (Resource)n.Tag;
+        if (n.Nodes.Count > 0) {
+          if (HiveAdminClient.Instance.GetAvailableResourceDescendants(r.Id).OfType<SlaveGroup>().Any()) {
+            n.Expand();
+            ExpandResourceNodesOfInterest(n.Nodes);
+          } else {
+            n.Collapse();
+          }
+        } else {
+          n.Collapse();
+        }
+      }
     }
 
Index: branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs
===================================================================
--- branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs	(revision 15992)
+++ branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs	(revision 15995)
@@ -46,4 +46,5 @@
     private readonly Color selectedBackColor = Color.DodgerBlue;
     private readonly Color selectedForeColor = Color.White;
+    private readonly Color grayTextColor = SystemColors.GrayText;
 
     private Project selectedProject = null;
@@ -293,5 +294,7 @@
     private void projectsTreeView_MouseDown(object sender, MouseEventArgs e) {
       var node = projectsTreeView.GetNodeAt(e.Location);
-      if(node != null) ChangeSelectedProjectNode(node);
+      if (node == null) return;
+      var p = (Project)node.Tag;
+      if(!HiveAdminClient.Instance.DisabledParentProjects.Contains(p)) ChangeSelectedProjectNode(node);
     }
 
@@ -378,10 +381,13 @@
       if (!projects.Any()) return;
 
+      var disabledParentProjects = HiveAdminClient.Instance.DisabledParentProjects;
       var mainProjects = new HashSet<Project>(projects.Where(x => x.ParentProjectId == null));
-      var parentedMainProjects = new HashSet<Project>(projects
-        .Where(x => x.ParentProjectId.HasValue
-        && !projects.Select(y => y.Id).Contains(x.ParentProjectId.Value)));
-      mainProjects.UnionWith(parentedMainProjects);
-      var subProbjects = new HashSet<Project>(projects.Except(mainProjects));
+      //var parentedMainProjects = new HashSet<Project>(projects
+      //  .Where(x => x.ParentProjectId.HasValue
+      //  && !projects.Select(y => y.Id).Contains(x.ParentProjectId.Value)));
+      //mainProjects.UnionWith(parentedMainProjects);
+      var mainDisabledParentProjects = new HashSet<Project>(disabledParentProjects.Where(x => x.ParentProjectId == null || x.ParentProjectId == Guid.Empty));
+      mainProjects.UnionWith(mainDisabledParentProjects);
+      var subProbjects = new HashSet<Project>(projects.Union(disabledParentProjects).Except(mainProjects));
 
       var stack = new Stack<Project>(mainProjects.OrderByDescending(x => x.Name));
@@ -397,8 +403,8 @@
         StyleTreeNode(newNode, newProject);
       
-        if (selectedProject == null) {
+        if (selectedProject == null && !disabledParentProjects.Contains(newProject)) {
           SelectedProject = newProject;
         }
-        if (newProject.Id == selectedProject.Id && !nodeSelected) {
+        if (!nodeSelected && selectedProject != null && selectedProject.Id == newProject.Id) {
           newNode.BackColor = selectedBackColor;
           newNode.ForeColor = selectedForeColor;
@@ -424,4 +430,9 @@
 
         newNode.SelectedImageIndex = newNode.ImageIndex;
+
+        if (disabledParentProjects.Contains(newProject)) {
+          newNode.Checked = false;
+          newNode.ForeColor = grayTextColor;
+        }
 
         var childProjects = subProbjects.Where(x => x.ParentProjectId == newProject.Id);
@@ -444,5 +455,7 @@
       n.ForeColor = Color.Black;
 
-      if (p.Id == Guid.Empty) {
+      if (HiveAdminClient.Instance.DisabledParentProjects.Select(x => x.Id).Contains(p.Id)) {
+        n.ForeColor = grayTextColor;
+      } else if (p.Id == Guid.Empty) {
         n.Text += NOT_STORED_TAG;
       } else if (p.Modified) {
Index: branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
===================================================================
--- branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs	(revision 15992)
+++ branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs	(revision 15995)
@@ -51,4 +51,5 @@
     private readonly Color calculatingColor = Color.FromArgb(255, 58, 114, 35); // #3a7223
     private readonly Color offlineColor = Color.FromArgb(255, 187, 36, 36); // #bb2424
+    private readonly Color grayTextColor = SystemColors.GrayText;
 
 
@@ -301,5 +302,7 @@
     private void treeSlaveGroup_MouseDown(object sender, MouseEventArgs e) {
       var node = treeView.GetNodeAt(e.Location);
-      if(node != null && node != ungroupedGroupNode) ChangeSelectedResourceNode(node);
+      if (node == null || node == ungroupedGroupNode) return;
+      var r = (Resource)node.Tag;
+      if(!HiveAdminClient.Instance.DisabledParentResources.Contains(r)) ChangeSelectedResourceNode(node);
     }
 
@@ -311,4 +314,9 @@
       if(e.Node == ungroupedGroupNode) {
         e.Cancel = true;
+      } else {
+        var r = (Resource)e.Node.Tag;
+        if(HiveAdminClient.Instance.DisabledParentResources.Contains(r)) {
+          e.Cancel = true;
+        }
       }
     }
@@ -395,10 +403,13 @@
       if (!resources.Any()) return;
 
+      var disabledParentResources = HiveAdminClient.Instance.DisabledParentResources;
       var mainResources = new HashSet<Resource>(resources.OfType<SlaveGroup>()
         .Where(x => x.ParentResourceId == null));
-      var parentedMainResources = new HashSet<Resource>(resources.OfType<SlaveGroup>()
-        .Where(x => x.ParentResourceId.HasValue && !resources.Select(y => y.Id).Contains(x.ParentResourceId.Value)));
-      mainResources.UnionWith(parentedMainResources);
-      var subResources = new HashSet<Resource>(resources.Except(mainResources).OrderByDescending(x => x.Name));
+      //var parentedMainResources = new HashSet<Resource>(resources.OfType<SlaveGroup>()
+      //  .Where(x => x.ParentResourceId.HasValue && !resources.Select(y => y.Id).Contains(x.ParentResourceId.Value)));
+      //mainResources.UnionWith(parentedMainResources);
+      var mainDisabledParentResources = new HashSet<Resource>(disabledParentResources.Where(x => x.ParentResourceId == null || x.ParentResourceId == Guid.Empty));
+      mainResources.UnionWith(mainDisabledParentResources);
+      var subResources = new HashSet<Resource>(resources.Union(disabledParentResources).Except(mainResources).OrderByDescending(x => x.Name));
 
       var stack = new Stack<Resource>(mainResources.OrderByDescending(x => x.Name));
@@ -414,12 +425,17 @@
         StyleTreeNode(newNode, newResource, resources);
 
-        if (selectedResource == null) {
+        if (selectedResource == null && !disabledParentResources.Contains(newResource)) {
           SelectedResource = newResource;
         }
-        if (newResource.Id == selectedResource.Id && !nodeSelected) {
+        if (!nodeSelected && selectedResource != null && newResource.Id == selectedResource.Id) {
           newNode.BackColor = selectedBackColor;
           newNode.ForeColor = selectedForeColor;
           newNode.Text += SELECTED_TAG;
           nodeSelected = true;
+        }
+
+        if(disabledParentResources.Contains(newResource)) {
+          newNode.Checked = false;
+          newNode.ForeColor = grayTextColor;
         }
 
@@ -505,5 +521,5 @@
         Resource r = (Resource)n.Tag;
         if (n.Nodes.Count > 0) {
-          if (HiveClient.Instance.GetAvailableResourceDescendants(r.Id).OfType<SlaveGroup>().Any()) {
+          if (HiveAdminClient.Instance.GetAvailableResourceDescendants(r.Id).OfType<SlaveGroup>().Any()) {
             n.Expand();
             ExpandResourceNodesOfInterest(n.Nodes);
@@ -570,8 +586,11 @@
       n.ForeColor = Color.Black;
 
-      // not stored (i.e. new), changed
-      if (r.Id == Guid.Empty && n != ungroupedGroupNode /*!r.Name.StartsWith(UNGROUPED_GROUP_NAME)*/) {
+      if(HiveAdminClient.Instance.DisabledParentResources.Select(x => x.Id).Contains(r.Id)) {
+        n.ForeColor = grayTextColor;
+      } else if (r.Id == Guid.Empty && n != ungroupedGroupNode /*!r.Name.StartsWith(UNGROUPED_GROUP_NAME)*/) {
+        // not stored (i.e. new)
         n.Text += NOT_STORED_TAG;
       } else if (r.Modified && n != ungroupedGroupNode /*!r.Name.StartsWith(UNGROUPED_GROUP_NAME)*/) {
+        // changed
         n.Text += CHANGES_NOT_STORED_TAG;
       }
@@ -682,10 +701,11 @@
     private Dictionary<Guid, HashSet<Resource>> GetResourceDescendants() {
       var resourceDescendants = new Dictionary<Guid, HashSet<Resource>>();
-
-      foreach (var r in Content) resourceDescendants.Add(r.Id, new HashSet<Resource>());
-      foreach(var r in Content) {
+      var resources = Content.Union(HiveAdminClient.Instance.DisabledParentResources).ToList();
+
+      foreach (var r in resources) resourceDescendants.Add(r.Id, new HashSet<Resource>());
+      foreach(var r in resources) {
         var parentResourceId = r.ParentResourceId;
         while(parentResourceId != null) {
-          var parent = Content.SingleOrDefault(x => x.Id == parentResourceId);
+          var parent = resources.SingleOrDefault(x => x.Id == parentResourceId);
           if(parent != null) {
             resourceDescendants[parent.Id].Add(r);
