Changeset 16209 for trunk/HeuristicLab.Clients.Hive.JobManager
- Timestamp:
- 10/03/18 15:06:21 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
r16117 r16209 139 139 } 140 140 141 // project look up 141 142 if (Content.Job != null && Content.Job.ProjectId == Guid.Empty) { 142 143 if (HiveClient.Instance != null && HiveClient.Instance.Projects != null && HiveClient.Instance.Projects.Count == 1) { … … 150 151 } 151 152 } 152 } 153 154 155 nameTextBox.Text = Content.Job.Name; 156 descriptionTextBox.Text = Content.Job.Description; 157 executionTimeTextBox.Text = Content.ExecutionTime.ToString(); 158 refreshAutomaticallyCheckBox.Checked = Content.RefreshAutomatically; 159 160 // project look up 161 if(Content.Job.ProjectId != null && Content.Job.ProjectId != Guid.Empty) { 162 if(selectedProject == null || selectedProject.Id != Content.Job.ProjectId) { 153 } else if (Content.Job != null && Content.Job.ProjectId != Guid.Empty) { 154 if (selectedProject == null || selectedProject.Id != Content.Job.ProjectId) { 163 155 selectedProject = GetProject(Content.Job.ProjectId); 156 hiveResourceSelectorDialog = null; 164 157 if (selectedProject != null) { 165 158 projectNameTextBox.Text = selectedProject.Name; … … 168 161 } 169 162 } 163 164 if(hiveResourceSelectorDialog == null) 165 hiveResourceSelectorDialog = new HiveResourceSelectorDialog(Content.Job.Id, Content.Job.ProjectId); 166 167 if (Content.Job.ResourceIds == null) { 168 Content.Job.ResourceIds = HiveClient.Instance.GetAssignedResourcesForJob(Content.Job.Id) 169 .Select(x => x.Id) 170 .ToList(); 171 hiveResourceSelectorDialog.SelectedResourceIds = Content.Job.ResourceIds; 172 } 173 170 174 } else { 171 175 selectedProject = null; … … 173 177 Content.Job.ResourceIds = null; 174 178 } 179 180 181 nameTextBox.Text = Content.Job.Name; 182 descriptionTextBox.Text = Content.Job.Description; 183 executionTimeTextBox.Text = Content.ExecutionTime.ToString(); 184 refreshAutomaticallyCheckBox.Checked = Content.RefreshAutomatically; 175 185 176 186 logView.Content = Content.Log; … … 501 511 } 502 512 503 private void updateButton_Click2(object sender, EventArgs e) {504 if (Content.ExecutionState == ExecutionState.Stopped) {505 MessageBox.Show("Job cannot be updated once it stopped.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Information);506 return;507 }508 509 HiveClient.UpdateJob(510 (Exception ex) => ErrorHandling.ShowErrorDialog(this, "Update failed.", ex),511 Content,512 new CancellationToken());513 UpdateSelectorDialog();514 }515 516 513 private void updateButton_Click(object sender, EventArgs e) { 517 514 if (Content.ExecutionState == ExecutionState.Stopped) { … … 556 553 } else { 557 554 startButton.Enabled = Content.IsControllable && Content.HiveTasks != null && Content.HiveTasks.Count > 0 558 && Content.Job.ProjectId != null && Content.Job.ProjectId !=Guid.Empty && Content.Job.ResourceIds != null && Content.Job.ResourceIds.Any()555 && Content.Job.ProjectId != Guid.Empty && Content.Job.ResourceIds != null && Content.Job.ResourceIds.Any() 559 556 && (Content.ExecutionState == ExecutionState.Prepared || Content.ExecutionState == ExecutionState.Paused) && !Content.IsProgressing; 560 557 pauseButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Started && !Content.IsProgressing;
Note: See TracChangeset
for help on using the changeset viewer.