public override void DownButton() { UpDownEventArgs e = new UpDownEventArgs(false); UpDown?.Invoke(this, e); if (!e.Handled) { base.DownButton(); } }
public override void UpButton() { UpDownEventArgs e = new UpDownEventArgs(true); UpDown?.Invoke(this, e); if (!e.Handled) { base.UpButton(); } }
/// <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)); }
public void Ctor_Int(int buttonPushed) { var e = new UpDownEventArgs(buttonPushed); Assert.Equal(buttonPushed, e.ButtonID); }