示例#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);
 }