示例#1
0
 /// <summary>
 /// Method for call the delagetes
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnButtonRepeatState(LBButtonEventArgs e)
 {
     if (this.ButtonRepeatState != null)
     {
         this.ButtonRepeatState(this, e);
     }
 }
示例#2
0
        /// <summary>
        /// Timer event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Timer_Tick(object sender, EventArgs e)
        {
            this.tmrRepeat.Enabled = false;

            // Update the interval
            if (tmrRepeat.Interval == this.startRepeatInterval)
            {
                this.tmrRepeat.Interval = this.repeatInterval;
            }

            // Call the delagate
            LBButtonEventArgs ev = new LBButtonEventArgs();

            ev.State = this.State;
            this.OnButtonRepeatState(ev);

            this.tmrRepeat.Enabled = true;
        }
示例#3
0
        /// <summary>
        /// Mouse up event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnMuoseUp(object sender, MouseEventArgs e)
        {
            // Change the state
            if (this.State == ButtonState.Normal)
            {
                this.State = ButtonState.Pressed;
            }
            else
            {
                this.State = ButtonState.Normal;
            }
            this.Invalidate();

            // Call the delagates
            LBButtonEventArgs ev = new LBButtonEventArgs();

            ev.State = this.State;
            this.OnButtonChangeState(ev);

            // Disable the timer
            this.tmrRepeat.Enabled = false;
        }
示例#4
0
        /// <summary>
        /// Mouse down event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnMouseDown(object sender, MouseEventArgs e)
        {
            // Change the state
            if (bAutoRebound)
            {
                this.State = ButtonState.Pressed;
                this.Invalidate();
            }

            // Call the delagates
            LBButtonEventArgs ev = new LBButtonEventArgs();

            ev.State = this.State;
            this.OnButtonChangeState(ev);

            // Enable the repeat timer
            if (this.RepeatState != false)
            {
                this.tmrRepeat.Interval = this.StartRepeatInterval;
                this.tmrRepeat.Enabled  = true;
            }
        }
示例#5
0
        /// <summary>
        /// Timer event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Timer_Tick(object sender, EventArgs e)
        {
            this.tmrRepeat.Enabled = false;

            // Update the interval
            if (tmrRepeat.Interval == this.startRepeatInterval)
                this.tmrRepeat.Interval = this.repeatInterval;

            // Call the delagate
            LBButtonEventArgs ev = new LBButtonEventArgs();
            ev.State = this.State;
            this.OnButtonRepeatState(ev);

            this.tmrRepeat.Enabled = true;
        }
示例#6
0
        /// <summary>
        /// Mouse up event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnMuoseUp(object sender, MouseEventArgs e)
        {
            // Change the state
            if (this.State == ButtonState.Normal)
            {
                this.State = ButtonState.Pressed;
            }
            else
            {
                this.State = ButtonState.Normal;
            }
            this.Invalidate();

            // Call the delagates
            LBButtonEventArgs ev = new LBButtonEventArgs();
            ev.State = this.State;
            this.OnButtonChangeState(ev);

            // Disable the timer
            this.tmrRepeat.Enabled = false;
        }
示例#7
0
        /// <summary>
        /// Mouse down event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnMouseDown(object sender, MouseEventArgs e)
        {
            // Change the state
            if (bAutoRebound)
            {
                this.State = ButtonState.Pressed;
                this.Invalidate();
            }

            // Call the delagates
            LBButtonEventArgs ev = new LBButtonEventArgs();
            ev.State = this.State;
            this.OnButtonChangeState(ev);

            // Enable the repeat timer
            if (this.RepeatState != false)
            {
                this.tmrRepeat.Interval = this.StartRepeatInterval;
                this.tmrRepeat.Enabled = true;
            }
        }
示例#8
0
 /// <summary>
 /// Method for call the delagetes
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnButtonRepeatState(LBButtonEventArgs e)
 {
     if (this.ButtonRepeatState != null)
         this.ButtonRepeatState(this, e);
 }