示例#1
0
        public override void DownButton()
        {
            UpDownEventArgs e = new UpDownEventArgs(false);

            UpDown?.Invoke(this, e);
            if (!e.Handled)
            {
                base.DownButton();
            }
        }
示例#2
0
        public override void UpButton()
        {
            UpDownEventArgs e = new UpDownEventArgs(true);

            UpDown?.Invoke(this, e);
            if (!e.Handled)
            {
                base.UpButton();
            }
        }
示例#3
0
        /// <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));
        }
示例#4
0
        public void Ctor_Int(int buttonPushed)
        {
            var e = new UpDownEventArgs(buttonPushed);

            Assert.Equal(buttonPushed, e.ButtonID);
        }