Changeset 13656 for branches/WebJobManager/HeuristicLab.Clients.Hive/3.3
- Timestamp:
- 03/07/16 10:18:05 (9 years ago)
- Location:
- branches/WebJobManager
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive/3.3/HiveTasks/HiveTask.cs
r12621 r13656 41 41 protected ReaderWriterLockSlim itemTaskLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); 42 42 43 public static new Image StaticItemImage { 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }45 }46 public override Image ItemImage {47 get{43 44 public override Image ItemImage 45 { 46 get 47 { 48 48 if (task.Id == Guid.Empty) { // not yet uploaded 49 49 return HeuristicLab.Common.Resources.VSImageLibrary.Event; … … 63 63 [Storable] 64 64 protected Task task; 65 public Task Task { 65 public Task Task 66 { 66 67 get { return task; } 67 set { 68 set 69 { 68 70 if (task != value) { 69 71 DeregisterTaskEvents(); … … 80 82 [Storable] 81 83 protected ItemTask itemTask; 82 public ItemTask ItemTask { 84 public ItemTask ItemTask 85 { 83 86 get { return itemTask; } 84 set { 87 set 88 { 85 89 if (itemTask != null && syncTasksWithOptimizers) { 86 90 childHiveTasksLock.EnterWriteLock(); … … 108 112 [Storable] 109 113 private bool isFinishedTaskDownloaded = false; 110 public bool IsFinishedTaskDownloaded { 114 public bool IsFinishedTaskDownloaded 115 { 111 116 get { return isFinishedTaskDownloaded; } 112 set { 117 set 118 { 113 119 if (value != isFinishedTaskDownloaded) { 114 120 this.isFinishedTaskDownloaded = value; … … 122 128 // if true, all control buttons should be enabled. otherwise disabled 123 129 private bool isControllable = true; 124 public bool IsControllable { 130 public bool IsControllable 131 { 125 132 get { return isControllable; } 126 set { 133 set 134 { 127 135 if (value != isControllable) { 128 136 isControllable = value; … … 143 151 [Storable] 144 152 protected ItemList<HiveTask> childHiveTasks; 145 public virtual ReadOnlyItemList<HiveTask> ChildHiveTasks { 146 get { 153 public virtual ReadOnlyItemList<HiveTask> ChildHiveTasks 154 { 155 get 156 { 147 157 childHiveTasksLock.EnterReadLock(); 148 158 try { … … 156 166 protected bool syncTasksWithOptimizers = true; 157 167 158 public StateLogList StateLog { 159 get { 168 public StateLogList StateLog 169 { 170 get 171 { 160 172 var list = new StateLogList(this.task.StateLog); 161 173 list.ForEach(s => { s.TaskName = itemTask.Name; }); … … 164 176 } 165 177 166 public StateLogListList ChildStateLogList { 178 public StateLogListList ChildStateLogList 179 { 167 180 get { return new StateLogListList(this.childHiveTasks.Select(x => x.StateLog)); } 168 181 } … … 515 528 } 516 529 517 public ICollection<IItemTreeNodeAction<HiveTask>> Actions { 518 get { 530 public ICollection<IItemTreeNodeAction<HiveTask>> Actions 531 { 532 get 533 { 519 534 return new List<IItemTreeNodeAction<HiveTask>>(); 520 535 } … … 544 559 public class HiveTask<T> : HiveTask where T : ItemTask { 545 560 546 public new T ItemTask { 561 public new T ItemTask 562 { 547 563 get { return (T)base.ItemTask; } 548 564 set { base.ItemTask = value; } -
branches/WebJobManager/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveItem.cs
r12012 r13656 29 29 namespace HeuristicLab.Clients.Hive { 30 30 public partial class HiveItem : IHiveItem { 31 public string ItemName { 31 public string ItemName 32 { 32 33 get { return ItemAttribute.GetName(this.GetType()); } 33 34 } 34 public string ItemDescription { 35 public string ItemDescription 36 { 35 37 get { return ItemAttribute.GetDescription(this.GetType()); } 36 38 } 37 public Version ItemVersion { 39 public Version ItemVersion 40 { 38 41 get { return ItemAttribute.GetVersion(this.GetType()); } 39 42 } 40 public static Image StaticItemImage { 41 get { return HeuristicLab.Common.Resources.VSImageLibrary.Database; } 43 public static Image StaticItemImage 44 { 45 get { return new Bitmap(25, 25); } 42 46 } 43 public virtual Image ItemImage { 44 get { 47 public virtual Image ItemImage 48 { 49 get 50 { 45 51 if (Modified) 46 52 return HeuristicLab.Common.Resources.VSImageLibrary.DatabaseModified; … … 51 57 52 58 private bool modified; 53 public bool Modified { 59 public bool Modified 60 { 54 61 get { return modified; } 55 internal set { 62 internal set 63 { 56 64 if (value != modified) { 57 65 modified = value; -
branches/WebJobManager/HeuristicLab.Clients.Hive/3.3/Tasks/EngineTask.cs
r12012 r13656 21 21 22 22 using System; 23 using System.Drawing;24 23 using HeuristicLab.Common; 25 24 using HeuristicLab.Core; … … 36 35 [Storable] 37 36 protected IOperation initialOperation; 38 public IOperation InitialOperation { 37 public IOperation InitialOperation 38 { 39 39 get { return initialOperation; } 40 40 set { initialOperation = value; } 41 41 } 42 42 43 public new IEngine Item { 43 public new IEngine Item 44 { 44 45 get { return (IEngine)base.Item; } 45 46 set { base.Item = value; } 46 47 } 47 48 48 public override TimeSpan ExecutionTime { 49 public override TimeSpan ExecutionTime 50 { 49 51 get { return Item.ExecutionTime; } 50 52 } 51 53 52 public override ExecutionState ExecutionState { 54 public override ExecutionState ExecutionState 55 { 53 56 get { return Item.ExecutionState; } 54 57 } … … 73 76 #endregion 74 77 75 public override bool IsParallelizable { 78 public override bool IsParallelizable 79 { 76 80 get { return false; } 77 81 } … … 136 140 } 137 141 138 public override bool CanChangeDescription { 142 public override bool CanChangeDescription 143 { 139 144 get { return false; } 140 145 } 141 146 142 public override bool CanChangeName { 147 public override bool CanChangeName 148 { 143 149 get { return false; } 144 150 } 145 151 146 public override string Description { 152 public override string Description 153 { 147 154 get { return string.Empty; } 148 155 set { throw new NotSupportedException(); } 149 156 } 150 157 151 public override string Name { 158 public override string Name 159 { 152 160 get { return Item != null ? Item.ToString() : "Engine Task"; } 153 161 set { throw new NotSupportedException(); } 154 162 } 155 163 156 public static new Image StaticItemImage {157 get { return HeuristicLab.Common.Resources.VSImageLibrary.Operator; }158 }159 164 160 public override string ItemName { 165 166 public override string ItemName 167 { 161 168 get { return "Engine Task"; } 162 169 }
Note: See TracChangeset
for help on using the changeset viewer.