Last change
on this file since 6362 was
6178,
checked in by cneumuel, 14 years ago
|
#1233
- added semaphores to ensure an appdomain is never unloaded when the start method has not finished
- HiveEngine uploading and downloading of jobs works and is displayed in the view
|
File size:
926 bytes
|
Rev | Line | |
---|
[6033] | 1 |
|
---|
| 2 | using System.Drawing;
|
---|
| 3 | using HeuristicLab.Clients.Hive.Jobs;
|
---|
| 4 | using HeuristicLab.Core;
|
---|
| 5 | using HeuristicLab.Optimization;
|
---|
| 6 | namespace HeuristicLab.Clients.Hive.Views.ExperimentManager.TreeView {
|
---|
| 7 | public class DeleteJobTreeNodeAction : IItemTreeNodeAction<HiveJob> {
|
---|
| 8 | private ItemCollection<HiveJob> hiveJobs;
|
---|
| 9 |
|
---|
| 10 | public DeleteJobTreeNodeAction(ItemCollection<HiveJob> hiveJobs) {
|
---|
| 11 | this.hiveJobs = hiveJobs;
|
---|
| 12 | }
|
---|
| 13 |
|
---|
| 14 | public string Name {
|
---|
| 15 | get { return "Delete Job"; }
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | public Image Image {
|
---|
| 19 | get { return null; }
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | public void Execute(HiveJob item, HiveJob parentItem) {
|
---|
| 23 | if (parentItem == null) {
|
---|
| 24 | hiveJobs.Remove(item);
|
---|
| 25 | } else {
|
---|
[6178] | 26 | var experiment = parentItem.ItemJob.Item as Experiment;
|
---|
[6033] | 27 | if (experiment != null) {
|
---|
[6178] | 28 | experiment.Optimizers.Remove(((OptimizerJob)item.ItemJob).Item);
|
---|
[6033] | 29 | }
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.