- Timestamp:
- 01/05/18 15:10:38 (7 years ago)
- Location:
- branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj
r15422 r15576 284 284 </ProjectReference> 285 285 </ItemGroup> 286 <ItemGroup> 287 <EmbeddedResource Include="Views\ProjectView.resx"> 288 <DependentUpon>ProjectView.cs</DependentUpon> 289 </EmbeddedResource> 290 </ItemGroup> 286 291 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 287 292 <PropertyGroup> -
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectPermissionsView.Designer.cs
r15422 r15576 108 108 this.permissionsGroupBox.TabIndex = 0; 109 109 this.permissionsGroupBox.TabStop = false; 110 this.permissionsGroupBox.Text = "Permissions (Assigned + In herited)";110 this.permissionsGroupBox.Text = "Permissions (Assigned + Included)"; 111 111 // 112 112 // treeView -
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectPermissionsView.cs
r15567 r15576 39 39 private readonly HashSet<UserGroupBase> assignedPermissions = new HashSet<UserGroupBase>(); 40 40 private readonly HashSet<UserGroupBase> inheritedPermissions = new HashSet<UserGroupBase>(); 41 private readonly HashSet<UserGroupBase> newAssignedPermissions = new HashSet<UserGroupBase>(); 42 private readonly HashSet<UserGroupBase> newInheritedPermissions = new HashSet<UserGroupBase>(); 43 private readonly Dictionary<Guid, HashSet<UserGroupBase>> userGroupAncestors = new Dictionary<Guid, HashSet<UserGroupBase>>(); 44 private readonly Dictionary<Guid, HashSet<UserGroupBase>> userGroupDescendants = new Dictionary<Guid, HashSet<UserGroupBase>>(); 45 46 private readonly Color addedAssignmentColor = Color.FromArgb(255, 87, 191, 193); // #57bfc1 47 private readonly Color removedAssignmentColor = Color.FromArgb(255, 236, 159, 72); // #ec9f48 48 private readonly Color addedIncludeColor = Color.FromArgb(25, 169, 221, 221); // #a9dddd 49 private readonly Color removedIncludeColor = Color.FromArgb(25, 249, 210, 145); // #f9d291 41 50 42 51 public new Project Content { … … 58 67 assignedPermissions.Clear(); 59 68 inheritedPermissions.Clear(); 69 newAssignedPermissions.Clear(); 70 newInheritedPermissions.Clear(); 60 71 treeView.Nodes.Clear(); 61 72 detailsViewHost.Content = null; 62 73 } else { 63 UpdateAssignedPermissions(); 64 UpdateInheritedPermissions(); 65 var top = BuildPermissionsList(AccessClient.Instance.UsersAndGroups); 66 detailsViewHost.Content = top; 74 UpdatePermissionList(); 67 75 detailsViewHost.ActiveView.Locked = true; 68 69 76 } 70 77 } … … 77 84 78 85 private void refreshButton_Click(object sender, EventArgs e) { 86 UpdatePermissionList(); 87 } 88 89 private async void inheritButton_Click(object sender, EventArgs e) { 90 await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions( 91 action: () => SetGrantedProjectPermissions(Content.Id, newAssignedPermissions.Select(x => x.Id), false, true, true)); 92 UpdatePermissionList(); 93 } 94 95 private async void saveButton_Click(object sender, EventArgs e) { 96 await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions( 97 action: () => SetGrantedProjectPermissions(Content.Id, newAssignedPermissions.Select(x => x.Id), false, false, false)); 98 UpdatePermissionList(); 99 } 100 101 private void treeView_AfterSelect(object sender, TreeViewEventArgs e) { 102 var selectedPermission = (UserGroupBase)e.Node.Tag; 103 detailsViewHost.Content = selectedPermission; 104 } 105 106 private void treeView_BeforeCheck(object sender, TreeViewCancelEventArgs e) { 107 var checkedPermission = (UserGroupBase)e.Node.Tag; 108 if (e.Node.Parent == null || newInheritedPermissions.Contains(checkedPermission) || checkedPermission.Id == Guid.Empty) e.Cancel = true; 109 } 110 111 private void treeView_AfterCheck(object sender, TreeViewEventArgs e) { 112 var checkedPermission = (UserGroupBase)e.Node.Tag; 113 if (e.Node.Checked) 114 newAssignedPermissions.Add(checkedPermission); 115 else 116 newAssignedPermissions.Remove(checkedPermission); 117 118 UpdateNewPermissionList(); 119 } 120 #endregion 121 122 #region Helpers 123 private void UpdatePermissionList() { 124 UpdateUserGroupGenealogy(); 79 125 UpdateAssignedPermissions(); 80 126 UpdateInheritedPermissions(); … … 83 129 } 84 130 85 private void inheritButton_Click(object sender, EventArgs e) { 86 SetGrantedProjectPermissions(Content.Id, Enumerable.Empty<Guid>()); 87 UpdateAssignedPermissions(); 88 UpdateInheritedPermissions(); 131 private void UpdateNewPermissionList() { 132 UpdateNewAssignedPermissions(); 133 UpdateNewInheritedPermissions(); 89 134 var top = BuildPermissionsList(AccessClient.Instance.UsersAndGroups); 90 135 detailsViewHost.Content = top; 91 136 } 92 137 93 private async void saveButton_Click(object sender, EventArgs e) { 94 await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions( 95 action: () => SetGrantedProjectPermissions(Content.Id, assignedPermissions.Select(x => x.Id))); 96 } 97 98 private void treeView_AfterSelect(object sender, TreeViewEventArgs e) { 99 var selectedPermission = (UserGroupBase)e.Node.Tag; 100 detailsViewHost.Content = selectedPermission; 101 } 102 103 private void treeView_BeforeCheck(object sender, TreeViewCancelEventArgs e) { 104 var checkedPermission = (UserGroupBase)e.Node.Tag; 105 if (e.Node.Parent == null || inheritedPermissions.Contains(checkedPermission) || checkedPermission.Id == Guid.Empty) e.Cancel = true; 106 } 107 108 private void treeView_AfterCheck(object sender, TreeViewEventArgs e) { 109 var checkedPermission = (UserGroupBase)e.Node.Tag; 110 if (e.Node.Checked) 111 assignedPermissions.Add(checkedPermission); 112 else 113 assignedPermissions.Remove(checkedPermission); 114 } 115 #endregion 116 117 #region Helpers 138 private void UpdateAssignedPermissions() { 139 assignedPermissions.Clear(); 140 newAssignedPermissions.Clear(); 141 var grantedPermissions = GetGrantedPermissionsForProject(Content.Id); 142 foreach (var r in grantedPermissions) { 143 assignedPermissions.Add(r); 144 newAssignedPermissions.Add(r); 145 } 146 } 147 148 private void UpdateNewAssignedPermissions() { 149 for(int i = newAssignedPermissions.Count-1; i >= 0; i--) { 150 if(newAssignedPermissions.Intersect(userGroupAncestors[newAssignedPermissions.ElementAt(i).Id]).Any()) { 151 newAssignedPermissions.Remove(newAssignedPermissions.ElementAt(i)); 152 } 153 } 154 } 155 156 private void UpdateInheritedPermissions() { 157 inheritedPermissions.Clear(); 158 newInheritedPermissions.Clear(); 159 foreach(var item in assignedPermissions) { 160 if(userGroupDescendants.ContainsKey(item.Id)) { 161 foreach(var descendant in userGroupDescendants[item.Id]) { 162 inheritedPermissions.Add(descendant); 163 newInheritedPermissions.Add(descendant); 164 } 165 } 166 } 167 } 168 169 private void UpdateNewInheritedPermissions() { 170 newInheritedPermissions.Clear(); 171 foreach(var item in newAssignedPermissions) { 172 if(userGroupDescendants.ContainsKey(item.Id)) { 173 foreach(var descendant in userGroupDescendants[item.Id]) { 174 newInheritedPermissions.Add(descendant); 175 } 176 } 177 } 178 } 179 180 private void UpdateUserGroupGenealogy() { 181 userGroupAncestors.Clear(); 182 userGroupDescendants.Clear(); 183 184 var usersAndGroups = AccessClient.Instance.UsersAndGroups; 185 foreach (var ug in usersAndGroups) { 186 userGroupAncestors.Add(ug.Id, new HashSet<UserGroupBase>()); 187 userGroupDescendants.Add(ug.Id, new HashSet<UserGroupBase>()); 188 } 189 190 var userGroupTree = HiveServiceLocator.Instance.CallHiveService(s => s.GetUserGroupTree()); 191 foreach(var branch in userGroupTree) { 192 var parent = usersAndGroups.Where(x => x.Id == branch.Key).SingleOrDefault(); 193 if(parent != null) { 194 var userGroupsToAdd = usersAndGroups.Where(x => userGroupTree[parent.Id].Contains(x.Id)); 195 foreach (var node in userGroupsToAdd) { 196 userGroupDescendants[parent.Id].Add(node); 197 userGroupAncestors[node.Id].Add(parent); 198 } 199 } 200 } 201 } 202 118 203 private static IEnumerable<UserGroupBase> GetGrantedPermissionsForProject(Guid projectId) { 119 204 var projectPermissions = HiveServiceLocator.Instance.CallHiveService(s => s.GetProjectPermissions(projectId)); … … 122 207 } 123 208 124 private static void SetGrantedProjectPermissions(Guid projectId, IEnumerable<Guid> userIds) { 209 private static void SetGrantedProjectPermissions(Guid projectId, IEnumerable<Guid> userIds, bool reassign, bool cascading, bool reassignCascading) { 210 if (projectId == null || userIds == null) return; 125 211 HiveServiceLocator.Instance.CallHiveService(s => { 126 var currentlyAssignedPermissions = s.GetProjectPermissions(projectId); 127 s.RevokeProjectPermissions(projectId, currentlyAssignedPermissions.Select(x => x.GrantedUserId).ToList()); 128 s.GrantProjectPermissions(projectId, userIds.ToList()); 212 s.SaveProjectPermissions(projectId, userIds.ToList(), reassign, cascading, reassignCascading); 129 213 }); 130 }131 132 private void UpdateAssignedPermissions() {133 assignedPermissions.Clear();134 foreach (var r in GetGrantedPermissionsForProject(Content.Id))135 assignedPermissions.Add(r);136 }137 138 private void UpdateInheritedPermissions() {139 inheritedPermissions.Clear();140 var parentProject = HiveAdminClient.Instance.Projects.SingleOrDefault(x => x.Id == Content.ParentProjectId);141 while (parentProject != null) {142 foreach (var r in GetGrantedPermissionsForProject(parentProject.Id))143 inheritedPermissions.Add(r);144 parentProject = HiveAdminClient.Instance.Projects.SingleOrDefault(x => x.Id == parentProject.ParentProjectId);145 }146 214 } 147 215 … … 164 232 node.ImageIndex = userGroupImageIndex; 165 233 node.SelectedImageIndex = node.ImageIndex; 166 167 if (inheritedPermissions.Contains(group)) { 168 node.Checked = true; 169 node.Text += " (Inherited)"; 170 node.ForeColor = SystemColors.GrayText; 171 } else if (assignedPermissions.Contains(group)) 172 node.Checked = true; 173 234 BuildNode(group, node); 174 235 groupsNode.Nodes.Add(node); 175 236 if (first == null) first = group; … … 183 244 node.ImageIndex = userImageIndex; 184 245 node.SelectedImageIndex = node.ImageIndex; 185 186 if (inheritedPermissions.Contains(user)) { 187 node.Checked = true; 188 node.Text += " (Inherited)"; 189 node.ForeColor = SystemColors.GrayText; 190 } else if (assignedPermissions.Contains(user)) 191 node.Checked = true; 192 246 BuildNode(user, node); 193 247 usersNode.Nodes.Add(node); 194 248 if (first == null) first = user; … … 203 257 return first; 204 258 } 259 260 private void BuildNode(UserGroupBase ug, TreeNode node) { 261 var addedPermissions = newAssignedPermissions.Except(assignedPermissions); 262 var removedPermissions = assignedPermissions.Except(newAssignedPermissions); 263 var addedIncludes = newInheritedPermissions.Except(inheritedPermissions); 264 var removedIncludes = inheritedPermissions.Except(newInheritedPermissions); 265 266 if (newAssignedPermissions.Contains(ug)) { 267 node.Checked = true; 268 } else if (newInheritedPermissions.Contains(ug)) { 269 node.Checked = true; 270 node.ForeColor = SystemColors.GrayText; 271 } 272 273 if (inheritedPermissions.Contains(ug) && newInheritedPermissions.Contains(ug)) { 274 node.Text += " [included]"; 275 } else if (addedIncludes.Contains(ug)) { 276 node.BackColor = addedIncludeColor; 277 node.ForeColor = SystemColors.GrayText; 278 node.Text += " [added include]"; 279 } else if (removedIncludes.Contains(ug)) { 280 node.BackColor = removedIncludeColor; 281 node.ForeColor = SystemColors.GrayText; 282 node.Text += " [removed include]"; 283 } 284 285 if (addedPermissions.Contains(ug)) { 286 node.BackColor = addedAssignmentColor; 287 node.ForeColor = SystemColors.ControlText; 288 node.Text += " [added assignment]"; 289 } else if (removedPermissions.Contains(ug)) { 290 node.BackColor = removedAssignmentColor; 291 node.ForeColor = SystemColors.ControlText; 292 node.Text += " [removed assignment]"; 293 } 294 295 } 296 205 297 #endregion 206 298 } -
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.Designer.cs
r15422 r15576 102 102 this.resourcesGroupBox.TabIndex = 0; 103 103 this.resourcesGroupBox.TabStop = false; 104 this.resourcesGroupBox.Text = "Resources (Assigned + In herited)";104 this.resourcesGroupBox.Text = "Resources (Assigned + Included)"; 105 105 // 106 106 // treeView -
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs
r15567 r15576 97 97 } 98 98 99 private void inheritButton_Click(object sender, EventArgs e) { 100 return; 101 SetAssignedProjectResources(Content.Id, Enumerable.Empty<Guid>()); 102 UpdateAssignedResources(); 103 UpdateResourceGenealogy(); 104 var top = BuildResourceTree(HiveAdminClient.Instance.Resources); 105 detailsViewHost.Content = top; 99 private async void inheritButton_Click(object sender, EventArgs e) { 100 await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions( 101 action: () => { 102 SetAssignedProjectResources(Content.Id, newAssignedResources.Select(x => x.Id), false, true); 103 }); 104 UpdateResourceTree(); 106 105 } 107 106 … … 109 108 await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions( 110 109 action: () => { 111 SetAssignedProjectResources(Content.Id, newAssignedResources.Select(x => x.Id) );110 SetAssignedProjectResources(Content.Id, newAssignedResources.Select(x => x.Id), false, false); 112 111 }); 113 112 UpdateResourceTree(); … … 132 131 } 133 132 134 UpdateNewAssignedResources(); 135 UpdateNewInheritedResources(); 136 var top = BuildResourceTree(HiveAdminClient.Instance.Resources); 137 detailsViewHost.Content = top; 133 UpdateNewResourceTree(); 138 134 } 139 135 #endregion 140 136 141 137 #region Helpers 142 143 //private void DisableResourceTree(TreeNode node) {144 // foreach(var n in node.Nodes) {145 146 // }147 //}148 138 149 139 private void UpdateResourceTree() { … … 154 144 } 155 145 146 private void UpdateNewResourceTree() { 147 UpdateNewAssignedResources(); 148 UpdateNewInheritedResources(); 149 var top = BuildResourceTree(HiveAdminClient.Instance.Resources); 150 detailsViewHost.Content = top; 151 } 152 156 153 private static IEnumerable<Resource> GetAssignedResourcesForProject(Guid projectId) { 157 154 var assignedProjectResources = HiveServiceLocator.Instance.CallHiveService(s => s.GetAssignedResourcesForProject(projectId)); … … 159 156 } 160 157 161 private void SetAssignedProjectResources(Guid projectId, IEnumerable<Guid> resourceIds) { 158 private void SetAssignedProjectResources(Guid projectId, IEnumerable<Guid> resourceIds, bool reassign, bool cascading) { 159 if (projectId == null || resourceIds == null) return; 162 160 HiveServiceLocator.Instance.CallHiveService(s => { 163 var currentlyAssignedResources = s.GetAssignedResourcesForProject(projectId); 164 s.UnassignProjectResources(projectId, currentlyAssignedResources.Select(x => x.ResourceId).ToList()); 165 s.AssignProjectResources(projectId, resourceIds.ToList()); 161 s.SaveProjectResourceAssignments(projectId, resourceIds.ToList(), reassign, cascading, true); 166 162 }); 167 163 } … … 295 291 newNode.BackColor = addedIncludeColor; 296 292 newNode.ForeColor = SystemColors.GrayText; 297 newNode.Text += " [ +included]";293 newNode.Text += " [added include]"; 298 294 } else if (removedIncludes.Contains(newResource)) { 299 295 newNode.BackColor = removedIncludeColor; 300 newNode.Text += " [ -included]";296 newNode.Text += " [removed include]"; 301 297 } 302 298 … … 304 300 newNode.BackColor = addedAssignmentColor; 305 301 newNode.ForeColor = SystemColors.ControlText; 306 newNode.Text += " [added ]";302 newNode.Text += " [added assignment]"; 307 303 } else if (removedAssignments.Contains(newResource)) { 308 304 newNode.BackColor = removedAssignmentColor; 309 305 newNode.ForeColor = SystemColors.ControlText; 310 newNode.Text += " [removed ]";306 newNode.Text += " [removed assignment]"; 311 307 } 312 308 -
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.Designer.cs
r15422 r15576 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProjectView)); 27 this.idLabel = new System.Windows.Forms.Label(); 28 this.idTextBox = new System.Windows.Forms.TextBox(); 26 29 this.nameLabel = new System.Windows.Forms.Label(); 27 30 this.nameTextBox = new System.Windows.Forms.TextBox(); … … 40 43 this.SuspendLayout(); 41 44 // 45 // idLabel 46 // 47 this.idLabel.AutoSize = true; 48 this.idLabel.Location = new System.Drawing.Point(3, 11); 49 this.idLabel.Name = "idLabel"; 50 this.idLabel.Size = new System.Drawing.Size(19, 13); 51 this.idLabel.TabIndex = 0; 52 this.idLabel.Text = "Id:"; 53 // 54 // idTextBox 55 // 56 this.idTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 57 | System.Windows.Forms.AnchorStyles.Right))); 58 this.idTextBox.Location = new System.Drawing.Point(72, 8); 59 this.idTextBox.Name = "idTextBox"; 60 this.idTextBox.ReadOnly = true; 61 this.idTextBox.Size = new System.Drawing.Size(464, 20); 62 this.idTextBox.TabIndex = 1; 63 // 42 64 // nameLabel 43 65 // 44 66 this.nameLabel.AutoSize = true; 45 this.nameLabel.Location = new System.Drawing.Point(3, 11);67 this.nameLabel.Location = new System.Drawing.Point(3, 37); 46 68 this.nameLabel.Name = "nameLabel"; 47 69 this.nameLabel.Size = new System.Drawing.Size(38, 13); 48 this.nameLabel.TabIndex = 0;70 this.nameLabel.TabIndex = 2; 49 71 this.nameLabel.Text = "Name:"; 50 72 // … … 53 75 this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 54 76 | System.Windows.Forms.AnchorStyles.Right))); 55 this.nameTextBox.Location = new System.Drawing.Point(72, 8);77 this.nameTextBox.Location = new System.Drawing.Point(72, 34); 56 78 this.nameTextBox.Name = "nameTextBox"; 57 79 this.nameTextBox.Size = new System.Drawing.Size(464, 20); 58 this.nameTextBox.TabIndex = 1;80 this.nameTextBox.TabIndex = 3; 59 81 this.nameTextBox.TextChanged += new System.EventHandler(this.nameTextBox_TextChanged); 60 82 this.nameTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.nameTextBox_Validating); … … 63 85 // 64 86 this.descriptionLabel.AutoSize = true; 65 this.descriptionLabel.Location = new System.Drawing.Point(3, 37);87 this.descriptionLabel.Location = new System.Drawing.Point(3, 63); 66 88 this.descriptionLabel.Name = "descriptionLabel"; 67 89 this.descriptionLabel.Size = new System.Drawing.Size(63, 13); 68 this.descriptionLabel.TabIndex = 2;90 this.descriptionLabel.TabIndex = 4; 69 91 this.descriptionLabel.Text = "Description:"; 70 92 // … … 73 95 this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 74 96 | System.Windows.Forms.AnchorStyles.Right))); 75 this.descriptionTextBox.Location = new System.Drawing.Point(72, 34);97 this.descriptionTextBox.Location = new System.Drawing.Point(72, 60); 76 98 this.descriptionTextBox.Multiline = true; 77 99 this.descriptionTextBox.Name = "descriptionTextBox"; 78 100 this.descriptionTextBox.Size = new System.Drawing.Size(464, 98); 79 this.descriptionTextBox.TabIndex = 3;101 this.descriptionTextBox.TabIndex = 5; 80 102 this.descriptionTextBox.TextChanged += new System.EventHandler(this.descriptionTextBox_TextChanged); 81 103 // … … 86 108 this.ownerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 87 109 this.ownerComboBox.FormattingEnabled = true; 88 this.ownerComboBox.Location = new System.Drawing.Point(102, 1 38);110 this.ownerComboBox.Location = new System.Drawing.Point(102, 164); 89 111 this.ownerComboBox.Name = "ownerComboBox"; 90 112 this.ownerComboBox.Size = new System.Drawing.Size(434, 21); 91 this.ownerComboBox.TabIndex = 5;113 this.ownerComboBox.TabIndex = 6; 92 114 this.ownerComboBox.SelectedIndexChanged += new System.EventHandler(this.ownerComboBox_SelectedIndexChanged); 93 115 // … … 95 117 // 96 118 this.ownerLabel.AutoSize = true; 97 this.ownerLabel.Location = new System.Drawing.Point(3, 1 41);119 this.ownerLabel.Location = new System.Drawing.Point(3, 167); 98 120 this.ownerLabel.Name = "ownerLabel"; 99 121 this.ownerLabel.Size = new System.Drawing.Size(41, 13); 100 this.ownerLabel.TabIndex = 4;122 this.ownerLabel.TabIndex = 7; 101 123 this.ownerLabel.Text = "Owner:"; 102 124 // … … 104 126 // 105 127 this.createdLabel.AutoSize = true; 106 this.createdLabel.Location = new System.Drawing.Point(3, 1 71);128 this.createdLabel.Location = new System.Drawing.Point(3, 197); 107 129 this.createdLabel.Name = "createdLabel"; 108 130 this.createdLabel.Size = new System.Drawing.Size(47, 13); 109 this.createdLabel.TabIndex = 6;131 this.createdLabel.TabIndex = 8; 110 132 this.createdLabel.Text = "Created:"; 111 133 // … … 115 137 this.startDateTimePicker.Enabled = false; 116 138 this.startDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom; 117 this.startDateTimePicker.Location = new System.Drawing.Point(72, 190);139 this.startDateTimePicker.Location = new System.Drawing.Point(72, 216); 118 140 this.startDateTimePicker.Name = "startDateTimePicker"; 119 141 this.startDateTimePicker.Size = new System.Drawing.Size(200, 20); … … 124 146 // 125 147 this.startLabel.AutoSize = true; 126 this.startLabel.Location = new System.Drawing.Point(3, 197);148 this.startLabel.Location = new System.Drawing.Point(3, 223); 127 149 this.startLabel.Name = "startLabel"; 128 150 this.startLabel.Size = new System.Drawing.Size(32, 13); 129 this.startLabel.TabIndex = 8;151 this.startLabel.TabIndex = 10; 130 152 this.startLabel.Text = "Start:"; 131 153 // … … 135 157 this.endDateTimePicker.Enabled = false; 136 158 this.endDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom; 137 this.endDateTimePicker.Location = new System.Drawing.Point(72, 2 17);159 this.endDateTimePicker.Location = new System.Drawing.Point(72, 243); 138 160 this.endDateTimePicker.Name = "endDateTimePicker"; 139 161 this.endDateTimePicker.Size = new System.Drawing.Size(200, 20); … … 144 166 // 145 167 this.endLabel.AutoSize = true; 146 this.endLabel.Location = new System.Drawing.Point(3, 2 23);168 this.endLabel.Location = new System.Drawing.Point(3, 249); 147 169 this.endLabel.Name = "endLabel"; 148 170 this.endLabel.Size = new System.Drawing.Size(29, 13); … … 153 175 // 154 176 this.indefiniteCheckBox.AutoSize = true; 155 this.indefiniteCheckBox.Location = new System.Drawing.Point(278, 2 19);177 this.indefiniteCheckBox.Location = new System.Drawing.Point(278, 245); 156 178 this.indefiniteCheckBox.Name = "indefiniteCheckBox"; 157 179 this.indefiniteCheckBox.Size = new System.Drawing.Size(69, 17); 158 this.indefiniteCheckBox.TabIndex = 1 2;180 this.indefiniteCheckBox.TabIndex = 13; 159 181 this.indefiniteCheckBox.Text = "Indefinite"; 160 182 this.indefiniteCheckBox.UseVisualStyleBackColor = true; … … 163 185 // createdTextBox 164 186 // 165 this.createdTextBox.Location = new System.Drawing.Point(72, 1 64);187 this.createdTextBox.Location = new System.Drawing.Point(72, 190); 166 188 this.createdTextBox.Name = "createdTextBox"; 167 189 this.createdTextBox.ReadOnly = true; 168 190 this.createdTextBox.Size = new System.Drawing.Size(200, 20); 169 this.createdTextBox.TabIndex = 7;191 this.createdTextBox.TabIndex = 14; 170 192 // 171 193 // refreshButton 172 194 // 173 this.refreshButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;174 this.refreshButton.Location = new System.Drawing.Point(72, 1 36);195 this.refreshButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshButton.Image"))); 196 this.refreshButton.Location = new System.Drawing.Point(72, 162); 175 197 this.refreshButton.Name = "refreshButton"; 176 198 this.refreshButton.Size = new System.Drawing.Size(24, 24); … … 197 219 this.Controls.Add(this.nameTextBox); 198 220 this.Controls.Add(this.nameLabel); 221 this.Controls.Add(this.idTextBox); 222 this.Controls.Add(this.idLabel); 199 223 this.Name = "ProjectView"; 200 this.Size = new System.Drawing.Size(539, 2 46);224 this.Size = new System.Drawing.Size(539, 271); 201 225 this.Load += new System.EventHandler(this.ProjectView_Load); 202 226 this.ResumeLayout(false); … … 207 231 #endregion 208 232 233 private System.Windows.Forms.Label idLabel; 234 protected System.Windows.Forms.TextBox idTextBox; 209 235 private System.Windows.Forms.Label nameLabel; 210 236 private System.Windows.Forms.TextBox nameTextBox; -
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs
r15422 r15576 67 67 base.OnContentChanged(); 68 68 if (Content == null) { 69 idTextBox.Clear(); 69 70 nameTextBox.Clear(); 70 71 descriptionTextBox.Clear(); … … 75 76 indefiniteCheckBox.Checked = false; 76 77 } else { 78 idTextBox.Text = Content.Id.ToString(); 77 79 nameTextBox.Text = Content.Name; 78 80 descriptionTextBox.Text = Content.Description; -
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourceView.cs
r15567 r15576 59 59 base.SetEnabledStateOfControls(); 60 60 bool enabled = Content != null && !Locked; 61 nameTextBox. Enabled =enabled;62 descriptionTextBox. Enabled =enabled;63 heartbeatIntervalNumericUpDown. Enabled =enabled;61 nameTextBox.ReadOnly = !enabled; 62 descriptionTextBox.ReadOnly = !enabled; 63 heartbeatIntervalNumericUpDown.ReadOnly = !enabled; 64 64 publicCheckBox.Enabled = enabled; 65 65 } -
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
r15567 r15576 344 344 } 345 345 newNode.SelectedImageIndex = newNode.ImageIndex; 346 if (newResource.OwnerUserId == UserInformation.Instance.User.Id)347 newNode.BackColor = ownedResourceColor;346 //if (newResource.OwnerUserId == UserInformation.Instance.User.Id) 347 // newNode.BackColor = ownedResourceColor; 348 348 } 349 349
Note: See TracChangeset
for help on using the changeset viewer.