- Timestamp:
- 07/02/18 15:51:17 (6 years ago)
- Location:
- branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectJobsView.cs
r15969 r15978 144 144 145 145 private StringMatrix CreateValueMatrix() { 146 if (Content == null || Content.Id == Guid.Empty) 147 return new StringMatrix(); 148 146 149 var jobs = HiveAdminClient.Instance.Jobs[Content.Id]; 147 150 var resources = HiveAdminClient.Instance.Resources; … … 172 175 if (InvokeRequired) Invoke((Action)UpdateJobs); 173 176 else { 174 StringMatrix matrix = null; 175 if(Content != null) { 176 matrix = CreateValueMatrix(); 177 if(Content != null && Content.Id != null && Content.Id != Guid.Empty) { 178 var matrix = CreateValueMatrix(); 179 matrixView.Content = matrix; 180 if(matrix != null) { 181 foreach (DataGridViewRow row in matrixView.DataGridView.Rows) { 182 string val = ((string)row.Cells[0].Value); 183 if (val == JobState.Online.ToString()) { 184 row.DefaultCellStyle.BackColor = onlineStatusColor; 185 } else if (val == JobState.StatisticsPending.ToString()) { 186 row.DefaultCellStyle.BackColor = statisticsPendingStatusColor; 187 } else if (val == JobState.DeletionPending.ToString()) { 188 row.DefaultCellStyle.BackColor = deletionPendingStatusColor; 189 } 190 } 191 192 matrixView.DataGridView.AutoResizeColumns(); 193 matrixView.DataGridView.Columns[0].MinimumWidth = 90; 194 matrixView.DataGridView.Columns[1].MinimumWidth = 108; 195 } 177 196 } else { 178 197 refreshButton.Enabled = false; 179 198 removeButton.Enabled = false; 180 } 181 matrixView.Content = matrix; 182 183 foreach(DataGridViewRow row in matrixView.DataGridView.Rows) { 184 string val = ((string)row.Cells[0].Value); 185 if (val == JobState.Online.ToString()) { 186 row.DefaultCellStyle.BackColor = onlineStatusColor; 187 } else if(val == JobState.StatisticsPending.ToString()) { 188 row.DefaultCellStyle.BackColor = statisticsPendingStatusColor; 189 } else if(val == JobState.DeletionPending.ToString()) { 190 row.DefaultCellStyle.BackColor = deletionPendingStatusColor; 191 } 192 } 193 194 matrixView.DataGridView.AutoResizeColumns(); 195 matrixView.DataGridView.Columns[0].MinimumWidth = 90; 196 matrixView.DataGridView.Columns[1].MinimumWidth = 108; 199 matrixView.Content = null; 200 } 197 201 } 198 202 } -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectPermissionsView.cs
r15955 r15978 143 143 #region Helpers 144 144 private void UpdatePermissionList() { 145 AccessClient.Instance.Refresh(); 146 145 147 UpdateUserGroupGenealogy(); 146 148 UpdateAssignedPermissions(); -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs
r15955 r15978 117 117 SetAssignedProjectResources(Content.Id, newAssignedResources.Select(x => x.Id), false, true, false); 118 118 }); 119 HiveAdminClient.Instance.Refresh(); 119 120 UpdateResourceTree(); 120 121 } -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs
r15953 r15978 198 198 this.viewHost.Caption = "View"; 199 199 this.viewHost.Content = null; 200 this.viewHost.Enabled = false;200 this.viewHost.Enabled = true; 201 201 this.viewHost.Location = new System.Drawing.Point(6, 6); 202 202 this.viewHost.Name = "viewHost"; -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
r15953 r15978 123 123 btnRemoveGroup.Enabled = !locked; 124 124 btnSave.Enabled = !locked; 125 viewHost.Locked = locked; 125 viewHost.Enabled = true; 126 //viewHost.Locked = locked; 127 viewHost.Locked = false; 128 viewHost.ReadOnly = false; 126 129 scheduleView.Locked = locked; 127 scheduleView.SetEnabledStateOfSchedule(!scheduleLocked);130 //scheduleView.SetEnabledStateOfSchedule(!scheduleLocked); 128 131 } 129 132 #endregion -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.cs
r15956 r15978 234 234 } 235 235 236 public virtual void SetEnabledStateOfSchedule(bool state) {237 if (InvokeRequired) {238 Invoke(new Action(() => SetEnabledStateOfSchedule(state)));239 } else {240 if (Content == null || Locked || ReadOnly) state = false;241 //groupBox1.Enabled = state;242 btnClearCal.Enabled = state;243 btnSaveCal.Enabled = state;244 }245 }236 //public virtual void SetEnabledStateOfSchedule(bool state) { 237 // if (InvokeRequired) { 238 // Invoke(new Action(() => SetEnabledStateOfSchedule(state))); 239 // } else { 240 // if (Content == null || Locked || ReadOnly) state = false; 241 // //groupBox1.Enabled = state; 242 // btnClearCal.Enabled = state; 243 // btnSaveCal.Enabled = state; 244 // } 245 //} 246 246 247 247 private void btnClearCal_Click(object sender, System.EventArgs e) { -
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.cs
r15422 r15978 60 60 protected override void SetEnabledStateOfControls() { 61 61 base.SetEnabledStateOfControls(); 62 disposableCheckBox.Enabled = Content != null; 62 bool enabled = Content != null && !Locked; 63 disposableCheckBox.Enabled = enabled; 63 64 } 64 65 #endregion
Note: See TracChangeset
for help on using the changeset viewer.