Esempio n. 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);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Mouse up event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void OnMuoseUp(object sender, MouseEventArgs e)
        {
            // Change the state
            this.State = ButtonState.Normal;
            this.Invalidate();

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

            ev.State = this.State;
            this.OnButtonChangeState(ev);
        }
Esempio n. 3
0
        /// <summary>
        /// Mouse up event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void OnMuoseUp(object sender, MouseEventArgs e)
        {
            // Change the state
            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;
        }
Esempio n. 4
0
        /// <summary>
        /// Timer event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        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;
        }
Esempio n. 5
0
        /// <summary>
        /// Mouse down event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void OnMouseDown(object sender, MouseEventArgs e)
        {
            // Change the state
            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;
            }
        }
Esempio n. 6
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);
	    }		
Esempio n. 7
0
		/// <summary>
		/// Mouse up event
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		void OnMuoseUp(object sender, MouseEventArgs e)
		{
			// Change the state
			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;
		}
Esempio n. 8
0
		/// <summary>
		/// Mouse down event
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		void OnMouseDown(object sender, MouseEventArgs e)
		{
			// Change the state
			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;
            }
		}
Esempio n. 9
0
        /// <summary>
        /// Timer event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        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;
        }
Esempio n. 10
0
        /// <summary>
        /// Mouse up event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void OnMuoseUp(object sender, MouseEventArgs e)
        {
            // Change the state
            this.State = ButtonState.Normal;
            this.Invalidate();

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