Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15567


Ignore:
Timestamp:
01/02/18 13:51:29 (7 years ago)
Author:
jzenisek
Message:

#2839 worked on views for project and resource administration

Location:
branches/HiveProjectManagement
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserGroupView.cs

    r15422 r15567  
    6868    }
    6969
     70    protected override void SetEnabledStateOfControls() {
     71      base.SetEnabledStateOfControls();
     72      bool enabled = Content != null && !Locked;
     73      groupNameTextBox.ReadOnly = enabled;
     74    }
     75
    7076    private void groupNameTextBox_TextChanged(object sender, EventArgs e) {
    7177      if (Content != null && Content.Name != groupNameTextBox.Text)
  • branches/HiveProjectManagement/HeuristicLab.Clients.Access.Administration/3.3/Views/UserView.cs

    r14185 r15567  
    6464    protected override void SetEnabledStateOfControls() {
    6565      base.SetEnabledStateOfControls();
     66      bool enabled = Content != null && !Locked;
     67     
     68      userNameTextBox.ReadOnly = enabled;
     69      fullNameTextBox.ReadOnly = enabled;
     70      emailTextBox.ReadOnly = enabled;
     71
    6672      if (Content == null) {
    6773        resetPasswordButton.Enabled = false;
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectPermissionsView.cs

    r15422 r15567  
    6565        var top = BuildPermissionsList(AccessClient.Instance.UsersAndGroups);
    6666        detailsViewHost.Content = top;
     67        detailsViewHost.ActiveView.Locked = true;
     68       
    6769      }
    6870    }
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs

    r15559 r15567  
    2929using HeuristicLab.Core.Views;
    3030using HeuristicLab.MainForm;
     31using System.Collections;
    3132
    3233namespace HeuristicLab.Clients.Hive.Administrator.Views {
     
    4546    private readonly Dictionary<Guid, HashSet<Resource>> resourceAncestors = new Dictionary<Guid, HashSet<Resource>>();
    4647    private readonly Dictionary<Guid, HashSet<Resource>> resourceDescendants = new Dictionary<Guid, HashSet<Resource>>();
    47     //private readonly Color ownedResourceColor = Color.LightGreen;
    48     private readonly Color changedAssignmentColor = Color.FromArgb(255, Color.LightGreen);
    49     private readonly Color changedInheritanceColor = Color.FromArgb(255, Color.LightGray);
     48    //private readonly Color addedAssignmentColor = Color.FromArgb(255, 0, 174, 179); // #00aeb3
     49    private readonly Color addedAssignmentColor = Color.FromArgb(255, 87, 191, 193); // #57bfc1
     50    private readonly Color removedAssignmentColor = Color.FromArgb(255, 236, 159, 72); // #ec9f48
     51    private readonly Color addedIncludeColor = Color.FromArgb(25, 169, 221, 221); // #a9dddd
     52    private readonly Color removedIncludeColor = Color.FromArgb(25, 249, 210, 145); // #f9d291
    5053
    5154    public new Project Content {
     
    7679        var top = BuildResourceTree(HiveAdminClient.Instance.Resources);
    7780        detailsViewHost.Content = top;
     81        detailsViewHost.ActiveView.Locked = true;
    7882      }
    7983    }
     
    250254      Resource currentResource = null;
    251255
    252       var assignmentDiff = new HashSet<Resource>(newAssignedResources);
    253       assignmentDiff.SymmetricExceptWith(assignedResources);
    254       var inheritanceDiff = new HashSet<Resource>(newInheritedResources);
    255       inheritanceDiff.SymmetricExceptWith(inheritedResources);
     256
     257      var addedAssignments = newAssignedResources.Except(assignedResources);
     258      var removedAssignments = assignedResources.Except(newAssignedResources);
     259      var addedIncludes = newInheritedResources.Except(inheritedResources);
     260      var removedIncludes = inheritedResources.Except(newInheritedResources);
     261
     262      //var assignmentDiff = new HashSet<Resource>(newAssignedResources);
     263      //assignmentDiff.SymmetricExceptWith(assignedResources);
     264      //var inheritanceDiff = new HashSet<Resource>(newInheritedResources);
     265      //inheritanceDiff.SymmetricExceptWith(inheritedResources);
    256266
    257267      while (stack.Any()) {
     
    273283        }
    274284
    275 
    276285        if (newAssignedResources.Contains(newResource)) {
    277286          newNode.Checked = true;
    278287        } else if (newInheritedResources.Contains(newResource)) {
    279288          newNode.Checked = true;
    280           newNode.Text += " (Inherited)";
    281289          newNode.ForeColor = SystemColors.GrayText;
    282290        }
    283291
    284         if (assignmentDiff.Contains(newResource)) {
    285           newNode.BackColor = changedAssignmentColor;
    286           newNode.Text += " [changed]";
    287         } else if(inheritanceDiff.Contains(newResource)) {
    288           newNode.BackColor = changedInheritanceColor;
    289           newNode.Text += " [changed]";
     292          if (inheritedResources.Contains(newResource) && newInheritedResources.Contains(newResource)) {
     293          newNode.Text += " [included]";
     294        } else if (addedIncludes.Contains(newResource)) {
     295          newNode.BackColor = addedIncludeColor;
     296          newNode.ForeColor = SystemColors.GrayText;
     297          newNode.Text += " [+included]";
     298        } else if (removedIncludes.Contains(newResource)) {
     299          newNode.BackColor = removedIncludeColor;
     300          newNode.Text += " [-included]";
     301        }
     302
     303        if (addedAssignments.Contains(newResource)) {
     304          newNode.BackColor = addedAssignmentColor;
     305          newNode.ForeColor = SystemColors.ControlText;
     306          newNode.Text += " [added]";
     307        } else if (removedAssignments.Contains(newResource)) {
     308          newNode.BackColor = removedAssignmentColor;
     309          newNode.ForeColor = SystemColors.ControlText;
     310          newNode.Text += " [removed]";
    290311        }
    291312
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs

    r15559 r15567  
    4040    private const int greenFlagImageIndex = 0;
    4141    private const int redFlagImageIndex = 1;
    42     private readonly Color changedColor = Color.FromArgb(255, Color.LightGreen);
    43     private readonly Color selectedColor = Color.SkyBlue;
     42    private readonly Color changedColor = Color.FromArgb(255, 87, 191, 193); // #57bfc1
     43    private readonly Color selectedColor = Color.FromArgb(255, 240, 194, 59); // #f0c23b
    4444
    4545    private readonly object locker = new object();
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourceView.cs

    r15422 r15567  
    5858    protected override void SetEnabledStateOfControls() {
    5959      base.SetEnabledStateOfControls();
    60       bool enabled = Content != null;
     60      bool enabled = Content != null && !Locked;
    6161      nameTextBox.Enabled = enabled;
    6262      descriptionTextBox.Enabled = enabled;
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs

    r15557 r15567  
    9898    protected override void SetEnabledStateOfControls() {
    9999      base.SetEnabledStateOfControls();
    100       bool enabled = Content != null;
     100      bool enabled = Content != null && !Locked;
    101101      btnAddGroup.Enabled = enabled;
    102102      btnRemoveGroup.Enabled = enabled;
Note: See TracChangeset for help on using the changeset viewer.