Changeset 4121 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItem.cs
- Timestamp:
- 07/30/10 13:56:28 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItem.cs
r4120 r4121 7 7 using HeuristicLab.Hive.Contracts.BusinessObjects; 8 8 using HeuristicLab.Hive.Contracts; 9 using System.Drawing; 9 10 10 11 namespace HeuristicLab.Hive.Experiment { 11 12 public class JobItem : Item { 13 public override Image ItemImage { 14 get { 15 if (jobDto.State == State.Offline) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped; 16 else if (jobDto.State == State.Idle) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped; 17 else if (jobDto.State == State.Calculating) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStarted; 18 else if (jobDto.State == State.Offline) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped; 19 else return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event; 20 } 21 } 22 12 23 [Storable] 13 24 private JobDto jobDto; … … 17 28 if (jobDto != value) { 18 29 jobDto = value; 30 OnJobDtoChanged(); 19 31 OnToStringChanged(); 32 OnItemImageChanged(); 20 33 } 21 34 } … … 41 54 } 42 55 56 [Storable] 57 private ILog log; 58 public ILog Log { 59 get { return log; } 60 } 61 43 62 public JobItem() { 63 log = new Log(); 44 64 } 45 65 … … 57 77 if (handler != null) handler(this, EventArgs.Empty); 58 78 } 79 80 public event EventHandler JobDtoChanged; 81 private void OnJobDtoChanged() { 82 EventHandler handler = JobDtoChanged; 83 if (handler != null) handler(this, EventArgs.Empty); 84 } 59 85 } 60 86 }
Note: See TracChangeset
for help on using the changeset viewer.