Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/30/10 13:56:28 (14 years ago)
Author:
cneumuel
Message:

Stabilization of Hive, Improvement HiveExperiment GUI (#1115)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItem.cs

    r4120 r4121  
    77using HeuristicLab.Hive.Contracts.BusinessObjects;
    88using HeuristicLab.Hive.Contracts;
     9using System.Drawing;
    910
    1011namespace HeuristicLab.Hive.Experiment {
    1112  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
    1223    [Storable]
    1324    private JobDto jobDto;
     
    1728        if (jobDto != value) {
    1829          jobDto = value;
     30          OnJobDtoChanged();
    1931          OnToStringChanged();
     32          OnItemImageChanged();
    2033        }
    2134      }
     
    4154    }
    4255
     56    [Storable]
     57    private ILog log;
     58    public ILog Log {
     59      get { return log; }
     60    }
     61
    4362    public JobItem() {
     63      log = new Log();
    4464    }
    4565
     
    5777      if (handler != null) handler(this, EventArgs.Empty);
    5878    }
     79
     80    public event EventHandler JobDtoChanged;
     81    private void OnJobDtoChanged() {
     82      EventHandler handler = JobDtoChanged;
     83      if (handler != null) handler(this, EventArgs.Empty);
     84    }
    5985  }
    6086}
Note: See TracChangeset for help on using the changeset viewer.