Changeset 16202 for trunk/HeuristicLab.Clients.Hive.Administrator
- Timestamp:
- 10/01/18 15:14:44 (6 years ago)
- Location:
- trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/HiveAdministratorView.Designer.cs
r16117 r16202 29 29 this.components = new System.ComponentModel.Container(); 30 30 this.tabAdmin = new System.Windows.Forms.TabControl(); 31 this.tab Slaves = new System.Windows.Forms.TabPage();31 this.tabResources = new System.Windows.Forms.TabPage(); 32 32 this.resourcesView = new HeuristicLab.Clients.Hive.Administrator.Views.ResourcesView(); 33 this.tabP age1= new System.Windows.Forms.TabPage();33 this.tabProjects = new System.Windows.Forms.TabPage(); 34 34 this.imageListUsers = new System.Windows.Forms.ImageList(this.components); 35 35 this.projectsView = new HeuristicLab.Clients.Hive.Administrator.Views.ProjectsView(); 36 36 this.tabAdmin.SuspendLayout(); 37 this.tab Slaves.SuspendLayout();38 this.tabP age1.SuspendLayout();37 this.tabResources.SuspendLayout(); 38 this.tabProjects.SuspendLayout(); 39 39 this.SuspendLayout(); 40 40 // … … 44 44 | System.Windows.Forms.AnchorStyles.Left) 45 45 | System.Windows.Forms.AnchorStyles.Right))); 46 this.tabAdmin.Controls.Add(this.tab Slaves);47 this.tabAdmin.Controls.Add(this.tabP age1);46 this.tabAdmin.Controls.Add(this.tabResources); 47 this.tabAdmin.Controls.Add(this.tabProjects); 48 48 this.tabAdmin.Location = new System.Drawing.Point(3, 0); 49 49 this.tabAdmin.Name = "tabAdmin"; … … 52 52 this.tabAdmin.TabIndex = 0; 53 53 // 54 // tab Slaves54 // tabResources 55 55 // 56 this.tab Slaves.Controls.Add(this.resourcesView);57 this.tab Slaves.Location = new System.Drawing.Point(4, 22);58 this.tab Slaves.Name = "tabSlaves";59 this.tab Slaves.Padding = new System.Windows.Forms.Padding(3);60 this.tab Slaves.Size = new System.Drawing.Size(734, 520);61 this.tab Slaves.TabIndex = 3;62 this.tab Slaves.Text = "Slaves";63 this.tab Slaves.UseVisualStyleBackColor = true;56 this.tabResources.Controls.Add(this.resourcesView); 57 this.tabResources.Location = new System.Drawing.Point(4, 22); 58 this.tabResources.Name = "tabResources"; 59 this.tabResources.Padding = new System.Windows.Forms.Padding(3); 60 this.tabResources.Size = new System.Drawing.Size(734, 520); 61 this.tabResources.TabIndex = 3; 62 this.tabResources.Text = "Resources"; 63 this.tabResources.UseVisualStyleBackColor = true; 64 64 // 65 65 // resourcesView … … 76 76 this.resourcesView.TabIndex = 0; 77 77 // 78 // tabP age178 // tabProjects 79 79 // 80 this.tabP age1.Controls.Add(this.projectsView);81 this.tabP age1.Location = new System.Drawing.Point(4, 22);82 this.tabP age1.Name = "tabPage1";83 this.tabP age1.Size = new System.Drawing.Size(734, 520);84 this.tabP age1.TabIndex = 4;85 this.tabP age1.Text = "Projects";86 this.tabP age1.UseVisualStyleBackColor = true;80 this.tabProjects.Controls.Add(this.projectsView); 81 this.tabProjects.Location = new System.Drawing.Point(4, 22); 82 this.tabProjects.Name = "tabProjects"; 83 this.tabProjects.Size = new System.Drawing.Size(734, 520); 84 this.tabProjects.TabIndex = 4; 85 this.tabProjects.Text = "Projects"; 86 this.tabProjects.UseVisualStyleBackColor = true; 87 87 // 88 88 // imageListUsers … … 112 112 this.Size = new System.Drawing.Size(745, 546); 113 113 this.tabAdmin.ResumeLayout(false); 114 this.tab Slaves.ResumeLayout(false);115 this.tabP age1.ResumeLayout(false);114 this.tabResources.ResumeLayout(false); 115 this.tabProjects.ResumeLayout(false); 116 116 this.ResumeLayout(false); 117 117 … … 122 122 private System.ComponentModel.IContainer components; 123 123 private System.Windows.Forms.ImageList imageListUsers; 124 private System.Windows.Forms.TabPage tab Slaves;125 private System.Windows.Forms.TabPage tabP age1;124 private System.Windows.Forms.TabPage tabResources; 125 private System.Windows.Forms.TabPage tabProjects; 126 126 private ProjectsView projectsView; 127 127 } -
trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs
r16117 r16202 86 86 UpdateAssignedResources(); 87 87 UpdateIncludedResources(); 88 var top = BuildResourceTree(); 89 detailsViewHost.Content = top; 90 detailsViewHost.Locked = true; 91 } 88 detailsViewHost.Content = BuildResourceTree(); 89 } 90 SetEnabledStateOfControls(); 92 91 } 93 92 … … 99 98 saveButton.Enabled = enabled; 100 99 treeView.Enabled = enabled; 100 101 if (detailsViewHost != null) { 102 detailsViewHost.Locked = true; 103 } 101 104 } 102 105 #endregion -
trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.cs
r16185 r16202 118 118 endDateTimePicker.Enabled = !indefiniteCheckBox.Checked; 119 119 } 120 SetEnabledStateOfControls(); 120 121 RegisterControlEvents(); 121 122 } … … 141 142 } 142 143 143 if ( !IsAdmin() && !HiveAdminClient.Instance.CheckOwnershipOfParentProject(Content, UserInformation.Instance.User.Id)) {144 if (Content.Id != Guid.Empty && !IsAdmin() && !HiveAdminClient.Instance.CheckOwnershipOfParentProject(Content, UserInformation.Instance.User.Id)) { 144 145 ownerComboBox.Enabled = false; 145 146 startDateTimePicker.Enabled = false; -
trunk/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs
r16185 r16202 43 43 private const string NOT_STORED_TAG = "*"; // " [not stored]"; 44 44 private const string CHANGES_NOT_STORED_TAG = "*"; // " [changes not stored]"; 45 private const string INACTIVE_TAG = " [inactive]"; 45 46 46 47 private readonly Color selectedBackColor = Color.DodgerBlue; … … 476 477 if (HiveAdminClient.Instance.DisabledParentProjects.Select(x => x.Id).Contains(p.Id)) { 477 478 n.ForeColor = grayTextColor; 478 } else if (p.Id == Guid.Empty) { 479 n.Text += NOT_STORED_TAG; 480 } else if (p.Modified) { 481 n.Text += CHANGES_NOT_STORED_TAG; 479 } else { 480 if (p.Id == Guid.Empty) { 481 n.Text += NOT_STORED_TAG; 482 } else if (p.Modified) { 483 n.Text += CHANGES_NOT_STORED_TAG; 484 } 485 486 if (!IsActive(p)) { 487 n.ForeColor = grayTextColor; 488 n.Text += INACTIVE_TAG; 489 } 482 490 } 483 491 } … … 536 544 } 537 545 546 private bool IsActive(Project project) { 547 return DateTime.Now >= project.StartDate 548 && (project.EndDate == null 549 || DateTime.Now < project.EndDate.Value); 550 } 551 538 552 private bool IsAuthorized(Project project) { 539 553 return project != null && UserInformation.Instance.UserExists;
Note: See TracChangeset
for help on using the changeset viewer.