Ejemplo n.º 1
0
        public bool GetUnhandledChildEvent(Control parent, string eventName, out Control source)
        {
            var index = FindChildEvent(PreviousUnhandledEvents, parent, eventName, out source);

            if (index >= 0)
            {
                PreviousUnhandledEvents.RemoveAt(index);
                return(true);
            }

            index = FindChildEvent(UnhandledEvents, parent, eventName, out source);
            if (index >= 0)
            {
                UnhandledEvents.RemoveAt(index);
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        public bool GetUnhandledEvent(Control source, string eventName)
        {
            var key = new UnhandledEvent {
                Source = source, Name = eventName
            };
            var index = FindEvent(PreviousUnhandledEvents, ref key);

            if (index >= 0)
            {
                PreviousUnhandledEvents.RemoveAt(index);
                return(true);
            }

            index = FindEvent(UnhandledEvents, ref key);
            if (index >= 0)
            {
                UnhandledEvents.RemoveAt(index);
                return(true);
            }

            return(false);
        }