예제 #1
0
        protected bool StatusMatchesEvent(Status status, PrecedenceEvent pe)
        {
            switch (pe)
            {
            case PrecedenceEvent.Start:
                return(status == Status.Running);

            case PrecedenceEvent.Error:
                return(status == Status.Error);

            case PrecedenceEvent.Success:
                return(status == Status.Success);

            case PrecedenceEvent.Completion:
                return(status == Status.Cancelled || status == Status.Error || status == Status.Success);

            default:
                return(false);
            }
        }
예제 #2
0
 public void SetEvent(Element element, PrecedenceEvent pe)
 {
     _precedenceEvent[element] = pe;
 }
예제 #3
0
 public void Add(Element element, PrecedenceEvent pe)
 {
     _monitorElements.Add(element);
     _precedenceEvent.Add(element, pe);
     element.StatusChange += new StatusChangeEventHandler(ElementStatusChange);
 }
예제 #4
0
 public void SetEvent(int index, PrecedenceEvent pe)
 {
     SetEvent(this[index], pe);
 }