Пример #1
0
        /////////////////////////////////////////////////////////////////////////
        //  EVENT BUBBLING
        /////////////////////////////////////////////////////////////////////////

        protected override bool OnBubbleEvent(Object source, EventArgs e)
        {
            if (e is CommandEventArgs)
            {
                ObjectListCommandEventArgs args = new ObjectListCommandEventArgs(this, source, (CommandEventArgs)e);
                RaiseBubbleEvent(this, args);
                return(true);
            }
            return(false);
        }
Пример #2
0
 /// <include file='doc\ObjectList.uex' path='docs/doc[@for="ObjectList.OnItemCommand"]/*' />
 protected virtual void OnItemCommand(ObjectListCommandEventArgs e) 
 {
     ObjectListCommandEventHandler onItemCommandHandler = (ObjectListCommandEventHandler)Events[EventItemCommand];
     if (onItemCommandHandler != null)
     {
         onItemCommandHandler(this, e);
     }
 }
Пример #3
0
        /////////////////////////////////////////////////////////////////////////
        //  EVENT BUBBLING
        /////////////////////////////////////////////////////////////////////////

        /// <include file='doc\ObjectListItem.uex' path='docs/doc[@for="ObjectListItem.OnBubbleEvent"]/*' />
        protected override bool OnBubbleEvent(Object source, EventArgs e) 
        {
            if (e is CommandEventArgs) 
            {
                ObjectListCommandEventArgs args = new ObjectListCommandEventArgs(this, source, (CommandEventArgs)e);
                RaiseBubbleEvent (this, args);
                return true;
            }
            return false;
        }