示例#1
0
 public void AddEventSource(LOSEventSource source)
 {
     if (!_sources.Contains(source))
     {
         _sources.Add(source);
     }
 }
 public void RemoveEventSource(LOSEventSource source)
 {
     foreach (LOSEventTrigger trigger in _triggers) {
         trigger.NotTriggeredBySource(source);
     }
     _sources.Remove(source);
 }
示例#3
0
 public void RemoveEventSource(LOSEventSource source)
 {
     foreach (LOSEventTrigger trigger in _triggers)
     {
         trigger.NotTriggeredBySource(source);
     }
     _sources.Remove(source);
 }
		public void NotTriggeredBySource (LOSEventSource source) {
			if (_triggerSources.Contains(source)) {
				_triggerSources.Remove(source);

				if (OnNotTriggeredBySource != null) {
					OnNotTriggeredBySource(source);
				}
				if (_triggerSources.Count == 0 && OnNotTriggered != null) {
					OnNotTriggered();
				}
			}
		}
		public void TriggeredBySource (LOSEventSource source) {
			if (!_triggerSources.Contains(source)) {
				_triggerSources.Add(source);

				if (OnTriggeredBySource != null) {
					OnTriggeredBySource(source);
				}
				if (_triggerSources.Count == 1 && OnTriggered != null) {
					OnTriggered();
				}
			}
		}
        public void NotTriggeredBySource(LOSEventSource source)
        {
            if (_triggerSources.Contains(source))
            {
                _triggerSources.Remove(source);

                if (OnNotTriggeredBySource != null)
                {
                    OnNotTriggeredBySource(source);
                }
                if (_triggerSources.Count == 0 && OnNotTriggered != null)
                {
                    OnNotTriggered();
                }
            }
        }
        public void TriggeredBySource(LOSEventSource source)
        {
            if (!_triggerSources.Contains(source))
            {
                _triggerSources.Add(source);

                if (OnTriggeredBySource != null)
                {
                    OnTriggeredBySource(source);
                }
                if (_triggerSources.Count == 1 && OnTriggered != null)
                {
                    OnTriggered();
                }
            }
        }
 public void AddEventSource(LOSEventSource source)
 {
     if (!_sources.Contains(source)) {
         _sources.Add(source);
     }
 }