DispatchTo() public method

Raises the appropriate event on the given node.
public DispatchTo ( object sender ) : void
sender object The node for which the event will be raised.
return void
Ejemplo n.º 1
0
		//****************************************************************
		// Process Events - Methods for handling events dispatched to the
		// pick path.
		//****************************************************************

		/// <summary>
		/// Gives each node in the pick path, starting with the bottom-most one, a chance to
		/// handle the event.
		/// </summary>
		/// <param name="e">A PInputEventArgs that contains the event data.</param>
		public virtual void ProcessEvent(PInputEventArgs e) {
			e.Path = this;
		
			object[] pushedNodes = nodeStack.ToArray();
			for (int i = 0; i < pushedNodes.Length; i++) {
				PNode each = (PNode) pushedNodes[i];
				EventHandlerList handlers = each.HandlerList;

				if (handlers != null) e.DispatchTo(each);
			}	
		}