Index: trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs
===================================================================
--- trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs	(revision 16184)
+++ trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs	(revision 16185)
@@ -134,6 +134,8 @@
 
       if (Content != null) {
-        var parentProject = HiveAdminClient.Instance.GetAvailableProjectAncestors(Content.Id).LastOrDefault();
-        if (parentProject == null || parentProject.EndDate.HasValue) {
+        //var parentProject = HiveAdminClient.Instance.GetAvailableProjectAncestors(Content.Id).LastOrDefault();
+        var parentProject = HiveAdminClient.Instance.Projects.FirstOrDefault(x => x.Id == Content.ParentProjectId);
+        if ((!IsAdmin() && (parentProject == null || parentProject.EndDate.HasValue))
+           || (IsAdmin() && parentProject != null && parentProject.EndDate.HasValue)) {
           indefiniteCheckBox.Enabled = false;
         }
Index: trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs
===================================================================
--- trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs	(revision 16184)
+++ trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs	(revision 16185)
@@ -106,31 +106,52 @@
         BuildProjectTree(Content);
       }
+      SetEnabledStateOfControls();
     }
 
     protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      bool selectedProjectExists = selectedProject != null && selectedProject.Id != Guid.Empty && Content.Contains(selectedProject);
-      bool projectIsNew = selectedProject != null && selectedProject.Id == Guid.Empty;
-      bool locked = Content == null || selectedProject == null || Locked || ReadOnly;
-      bool parentOwner = HiveAdminClient.Instance.CheckOwnershipOfParentProject(selectedProject, UserInformation.Instance.User.Id);
-      bool saveLocked = locked || (!IsAdmin() && selectedProject.OwnerUserId != UserInformation.Instance.User.Id && !parentOwner);
-      bool addLocked = saveLocked || projectIsNew || selectedProject.Id == Guid.Empty;
-      bool deleteLocked = locked || (!IsAdmin() && !parentOwner) || Content.Where(x => x.ParentProjectId == selectedProject.Id).Any();
-
-      var now = DateTime.Now;
-      if (!addLocked && (now < selectedProject.StartDate || now > selectedProject.EndDate)) addLocked = true;
+      base.SetEnabledStateOfControls();      
+
+      bool locked = Content == null || Locked || ReadOnly;      
+      bool parentOwner = selectedProject != null && HiveAdminClient.Instance.CheckOwnershipOfParentProject(selectedProject, UserInformation.Instance.User.Id);
+      bool selectedProjectDisabled = selectedProject == null 
+                                     || selectedProject != null && selectedProject.Id == Guid.Empty;
+
+      bool selectedProjectHasJobs =
+        !selectedProjectDisabled && HiveAdminClient.Instance.Jobs.ContainsKey(selectedProject.Id)
+                                 && HiveAdminClient.Instance.Jobs[selectedProject.Id] != null
+                                 && HiveAdminClient.Instance.Jobs[selectedProject.Id].Any();
+
+      bool addLocked = locked
+                       || (selectedProject == null && !IsAdmin())
+                       || (selectedProject != null && selectedProject.Id == Guid.Empty)
+                       || (selectedProject != null && !IsAdmin() && !parentOwner && selectedProject.OwnerUserId != UserInformation.Instance.User.Id)
+                       || (selectedProject != null && (DateTime.Now < selectedProject.StartDate || DateTime.Now > selectedProject.EndDate));
+
+      bool deleteLocked = locked
+                          || !Content.Any()
+                          || selectedProject == null
+                          || Content.Any(x => x.ParentProjectId == selectedProject.Id)
+                          || selectedProjectHasJobs
+                          || (!IsAdmin() && !parentOwner);
+
+      bool saveLocked = locked
+                        || !Content.Any()
+                        || selectedProject == null
+                        || (!IsAdmin() && !parentOwner && selectedProject.OwnerUserId != UserInformation.Instance.User.Id);
+
 
       addButton.Enabled = !addLocked;
       removeButton.Enabled = !deleteLocked;
       saveProjectButton.Enabled = !saveLocked;
+
       projectView.Enabled = !locked;
-      projectPermissionsView.Enabled = !locked;
-      projectResourcesView.Enabled = !locked;
-      projectJobsView.Enabled = !locked;
+      projectPermissionsView.Enabled = !locked && !selectedProjectDisabled;
+      projectResourcesView.Enabled = !locked && !selectedProjectDisabled;
+      projectJobsView.Enabled = !locked && !selectedProjectDisabled;
 
       projectView.Locked = locked;
-      projectPermissionsView.Locked = locked;
-      projectResourcesView.Locked = locked;
-      projectJobsView.Locked = locked;
+      projectPermissionsView.Locked = locked || selectedProjectDisabled;
+      projectResourcesView.Locked = locked || selectedProjectDisabled;
+      projectJobsView.Locked = locked || selectedProjectDisabled;
     }
     #endregion
@@ -254,37 +275,4 @@
       }
 
-      // double check of ChangeSelectedProject(..):
-      // if the user is no admin nor owner of a parent project
-      if (!IsAdmin() && !HiveAdminClient.Instance.CheckOwnershipOfParentProject(selectedProject, UserInformation.Instance.User.Id)) {
-        MessageBox.Show(
-          "Only admins and owners of parent projects are allowed to delete this project.",
-          "HeuristicLab Hive Administrator",
-          MessageBoxButtons.OK,
-          MessageBoxIcon.Error);
-        return;
-      }            
-
-
-      if (Content.Any(x => x.ParentProjectId == selectedProject.Id) 
-          || HiveAdminClient.Instance.ProjectDescendants[selectedProject.Id].Any()) {
-        MessageBox.Show(
-          "Only empty projects can be deleted.",
-          "HeuristicLab Hive Administrator",
-          MessageBoxButtons.OK,
-          MessageBoxIcon.Error);
-        return;
-      }
-
-      if (HiveAdminClient.Instance.Jobs.ContainsKey(selectedProject.Id) 
-        && HiveAdminClient.Instance.Jobs[selectedProject.Id] != null 
-        && HiveAdminClient.Instance.Jobs[selectedProject.Id].Any()) {
-        MessageBox.Show(
-          "There are " + HiveAdminClient.Instance.Jobs[selectedProject.Id].Count + " job(s) using this project and/or child-projects. It is necessary to delete them before the project.",
-          "HeuristicLab Hive Administrator",
-          MessageBoxButtons.OK,
-          MessageBoxIcon.Error);
-        return;
-      }
-
       var result = MessageBox.Show(
         "Do you really want to delete " + selectedProject.Name + "?",
@@ -297,11 +285,7 @@
           action: () => {
             RemoveProject(selectedProject);  
-          },
-          finallyCallback: () => {
-            removeButton.Enabled = true;
           });
-      } else {
-        removeButton.Enabled = true;
-      }
+      }
+      SetEnabledStateOfControls();
     }
 
@@ -540,12 +524,9 @@
       try {
         if (project.Id != Guid.Empty) {
-          var projectsToSave = Content.Where(x => x.Id == Guid.Empty || x.Modified);
-          foreach (var p in projectsToSave)
-            p.Store();
-
           SelectedProject = HiveAdminClient.Instance.GetAvailableProjectAncestors(project.Id).LastOrDefault();
           HiveAdminClient.Delete(project);          
           UpdateProjects();
-        } else {
+        } else {          
+          SelectedProject = Content.FirstOrDefault(x => x.Id == project.ParentProjectId);
           Content.Remove(project);
         }
Index: trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs
===================================================================
--- trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs	(revision 16184)
+++ trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs	(revision 16185)
@@ -164,4 +164,5 @@
       this.treeView.DragOver += new System.Windows.Forms.DragEventHandler(this.treeSlaveGroup_DragEnterOver);
       this.treeView.BeforeCheck += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeSlaveGroup_BeforeCheck);
+      this.treeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeSlaveGroup_AfterCheck);
       // 
       // tabSlaveGroup
Index: trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
===================================================================
--- trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs	(revision 16184)
+++ trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs	(revision 16185)
@@ -125,10 +125,22 @@
 
       HashSet<Guid> descendantResources = null;
+      bool selectedRDeleteLocked = selectedResource == null
+                              || (selectedResource.Id != Guid.Empty && (!HiveAdminClient.Instance.ResourceDescendants.TryGetValue(selectedResource.Id, out descendantResources) || descendantResources.Any()));
+
+      var nodes = GetCheckedNodes(treeView.Nodes).ToList();
+      var checkedResources = nodes.Select(x => x.Tag).OfType<Resource>().ToList();
+      bool checkedRDeleteLocked = false;
+      for (int i = 0; !checkedRDeleteLocked && i < checkedResources.Count; i++) {
+        if (checkedResources[i].Id != Guid.Empty &&
+            (!HiveAdminClient.Instance.ResourceDescendants.TryGetValue(checkedResources[i].Id, out descendantResources) ||
+             descendantResources.Any()))
+          checkedRDeleteLocked = true;
+      }
 
       bool deleteLocked = locked
-                       || !IsAdmin()
-                       || !Content.Any()
-                       || selectedResource == null
-                       || (selectedResource.Id != Guid.Empty && (!HiveAdminClient.Instance.ResourceDescendants.TryGetValue(selectedResource.Id, out descendantResources) || descendantResources.Any()));
+                          || !IsAdmin()
+                          || !Content.Any()
+                          || checkedResources.Any() && checkedRDeleteLocked
+                          || !checkedResources.Any() && selectedRDeleteLocked;
 
       bool saveLocked = locked
@@ -235,6 +247,8 @@
     }
 
-    private async void btnRemoveGroup_Click(object sender, EventArgs e) {
-      if (selectedResource == null) return;
+    private async void btnRemoveGroup_Click(object sender, EventArgs e) {      
+      var nodes = GetCheckedNodes(treeView.Nodes).ToList();
+      var checkedResources = nodes.Select(x => x.Tag).OfType<Resource>().ToList();
+      if (selectedResource == null && !checkedResources.Any()) return;
 
       lock (locker) {
@@ -243,18 +257,33 @@
       }
 
-      var result = MessageBox.Show(
-        "Do you really want to delete " + selectedResource.Name + "?",
-        "HeuristicLab Hive Administrator",
-        MessageBoxButtons.YesNo,
-        MessageBoxIcon.Question);
-      if (result == DialogResult.Yes) {
-        await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions(
-          action: () => {
-            RemoveResource(selectedResource);
-          });
-
-        OnContentChanged();
-        SetEnabledStateOfControls();
-      }
+      if (checkedResources.Count > 0) {
+        var result = MessageBox.Show(
+          "Do you really want to delete all " + checkedResources.Count + " checked resources?",
+          "HeuristicLab Hive Administrator",
+          MessageBoxButtons.YesNo,
+          MessageBoxIcon.Question);
+        if (result == DialogResult.Yes) {
+          await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions(
+            action: () => {
+              RemoveResource(checkedResources);
+            });
+        }
+      } else {
+        var res = checkedResources.Any() ? checkedResources.First() : selectedResource;
+        var result = MessageBox.Show(
+          "Do you really want to delete the selected resource " + res.Name + "?",
+          "HeuristicLab Hive Administrator",
+          MessageBoxButtons.YesNo,
+          MessageBoxIcon.Question);
+        if (result == DialogResult.Yes) {
+          await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions(
+            action: () => {
+              RemoveResource(res);
+            });
+        }
+      }
+
+      OnContentChanged();
+      SetEnabledStateOfControls();
     }
 
@@ -297,4 +326,8 @@
         }
       }
+    }
+
+    private void treeSlaveGroup_AfterCheck(object sender, TreeViewEventArgs e) {
+      SetEnabledStateOfControls();
     }
 
@@ -535,10 +568,46 @@
         if (resource.Id != Guid.Empty) {
           SelectedResource = HiveAdminClient.Instance.GetAvailableResourceAncestors(resource.Id).LastOrDefault();
-          HiveAdminClient.Delete(resource);
+
+          // deal with all new, but not yet saved resources
+          var newResources = Content.Where(x => x.ParentResourceId == resource.Id).ToList();
+          if (newResources.Any(x => x.Id != Guid.Empty)) return;
+          foreach (var nr in newResources) Content.Remove(nr);
+
+          HiveAdminClient.Delete(resource);          
           UpdateResources();
         } else {
-          SelectedResource = null;
+          SelectedResource = Content.FirstOrDefault(x => x.Id == resource.ParentResourceId);
           Content.Remove(resource);
         }
+      } catch (AnonymousUserException) {
+        ShowHiveInformationDialog();
+      }
+    }
+
+    private void RemoveResource(IEnumerable<Resource> resources) {
+      if (resources == null || !resources.Any()) return;
+
+      var ids = resources.Select(x => x.Id).ToList();      
+      try {
+        bool update = false;
+        foreach (var r in resources) {          
+          if (r.Id != Guid.Empty)  {
+            if(r.Id == SelectedResource.Id)
+              SelectedResource = HiveAdminClient.Instance.GetAvailableResourceAncestors(r.Id).LastOrDefault();
+
+            // deal with all new, but not yet saved resources
+            var newResources = Content.Where(x => x.ParentResourceId == r.Id).ToList();
+            if (newResources.Any(x => x.Id != Guid.Empty)) return;
+            foreach (var nr in newResources) Content.Remove(nr);
+
+            HiveAdminClient.Delete(r);
+            update = true;
+          } else {
+            if (r.Id == SelectedResource.Id)
+              SelectedResource = Content.FirstOrDefault(x => x.Id == r.ParentResourceId);
+            Content.Remove(r);
+          }
+        }
+        if (update) UpdateResources();
       } catch (AnonymousUserException) {
         ShowHiveInformationDialog();
@@ -678,7 +747,11 @@
     private Dictionary<Guid, HashSet<Resource>> GetResourceDescendants() {
       var resourceDescendants = new Dictionary<Guid, HashSet<Resource>>();
+      //var resources = Content.Where(x => x.Id != Guid.Empty).Union(HiveAdminClient.Instance.DisabledParentResources).ToList();      
       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) {
+        if(!resourceDescendants.ContainsKey(r.Id))
+          resourceDescendants.Add(r.Id, new HashSet<Resource>());
+      }
       foreach (var r in resources) {
         var parentResourceId = r.ParentResourceId;
