Changeset 15412 for branches/HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
- Timestamp:
- 10/07/17 10:32:07 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
r15401 r15412 23 23 using System.ComponentModel; 24 24 using System.Linq; 25 using System.Text;26 25 using System.Threading; 27 26 using System.Threading.Tasks; … … 118 117 nameTextBox.Text = string.Empty; 119 118 executionTimeTextBox.Text = string.Empty; 120 resourceNamesTextBox.Text = string.Empty;119 projectNameTextBox.Text = string.Empty; 121 120 refreshAutomaticallyCheckBox.Checked = false; 122 121 lock (runCollectionViewLocker) { … … 137 136 } 138 137 } 139 } 140 finally { 138 } finally { 141 139 SuppressEvents = false; 142 140 } … … 158 156 tabControl.Enabled = !Locked; 159 157 nameTextBox.Enabled = !Locked; 160 resourceNamesTextBox.Enabled = !Locked;158 projectNameTextBox.Enabled = !Locked; 161 159 searchButton.Enabled = !Locked; 162 160 jobsTreeView.Enabled = !Locked; … … 183 181 184 182 this.nameTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing; 185 this.resourceNamesTextBox.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;186 183 this.searchButton.Enabled = Content.IsControllable && Content.ExecutionState == ExecutionState.Prepared && !alreadyUploaded && !Content.IsProgressing; 187 184 this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing; … … 335 332 if (hiveResourceSelectorDialog == null) 336 333 hiveResourceSelectorDialog = new HiveResourceSelectorDialog(); 334 337 335 if (hiveResourceSelectorDialog.ShowDialog(this) == DialogResult.OK) { 338 StringBuilder sb = new StringBuilder();339 //foreach (Project resource in hiveResourceSelectorDialog.GetSelectedResources()) {340 // sb.Append(resource.Name);341 // sb.Append(";");342 //}343 //resourceNamesTextBox.Text = sb.ToString();344 //if (Content.Job.ResourceNames != resourceNamesTextBox.Text)345 // Content.Job.ResourceNames = resourceNamesTextBox.Text;346 336 var selectedProject = hiveResourceSelectorDialog.SelectedProject; 347 resourceNamesTextBox.Text = selectedProject.Name;348 if (Content.Job.ProjectId != selectedProject.Id)349 Content.Job.ProjectId = selectedProject.Id;337 projectNameTextBox.Text = selectedProject.Name; 338 Content.Job.ProjectId = selectedProject.Id; 339 Content.Job.ResourceIds = hiveResourceSelectorDialog.SelectedResources.Select(x => x.Id).ToList(); 350 340 } 351 341 } … … 421 411 try { 422 412 invoker.EndInvoke(ar); 423 } 424 catch (Exception ex) { 425 ThreadPool.QueueUserWorkItem(delegate(object exception) { ErrorHandling.ShowErrorDialog(this, (Exception)exception); }, ex); 413 } catch (Exception ex) { 414 ThreadPool.QueueUserWorkItem(delegate (object exception) { ErrorHandling.ShowErrorDialog(this, (Exception)exception); }, ex); 426 415 } 427 416 }, null); … … 510 499 if (subTask is OptimizerHiveTask) { 511 500 OptimizerHiveTask ohTask = subTask as OptimizerHiveTask; 512 ohTask.ExecuteReadActionOnItemTask(new Action(delegate () {501 ohTask.ExecuteReadActionOnItemTask(new Action(delegate () { 513 502 runs.AddRange(ohTask.ItemTask.Item.Runs); 514 503 }));
Note: See TracChangeset
for help on using the changeset viewer.