/// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// updowneventhandler.BeginInvoke(source, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this UpDownEventHandler updowneventhandler, Object source, UpDownEventArgs e, AsyncCallback callback)
        {
            if(updowneventhandler == null) throw new ArgumentNullException("updowneventhandler");

            return updowneventhandler.BeginInvoke(source, e, callback, null);
        }
Ejemplo n.º 2
0
	private void upDownButtons_UpDown(Object source, UpDownEventArgs e)
	{
		if (e.ButtonID == (int)(ButtonID.Up))
		{
			UpButton();
		}
		else
		{
			if (e.ButtonID == (int)(ButtonID.Down))
			{
				DownButton();
			}
		}
	}
Ejemplo n.º 3
0
		protected virtual void OnUpDown(UpDownEventArgs e)
		{
			if (UpDown != null)
			{
				UpDown(this, e);
			}
		}
 private void OnUpDown(object source, UpDownEventArgs e)
 {
     if (e.ButtonID == 1)
     {
         this.UpButton();
     }
     else if (e.ButtonID == 2)
     {
         this.DownButton();
     }
 }
 protected virtual void OnUpDown(UpDownEventArgs upevent)
 {
     if (this.upDownEventHandler != null)
     {
         this.upDownEventHandler(this, upevent);
     }
 }
Ejemplo n.º 6
0
 /// <include file='doc\UpDownBase.uex' path='docs/doc[@for="UpDownBase.OnUpDown"]/*' />
 /// <devdoc>
 ///
 ///     Handles UpDown events, which are generated by clicking on
 ///     the updown buttons in the child updown control.
 ///
 /// </devdoc>
 private void OnUpDown(object source, UpDownEventArgs e) {
     // Modify the value
     if (e.ButtonID == (int)ButtonID.Up)
         UpButton();
     else if (e.ButtonID == (int)ButtonID.Down)
         DownButton();
 }