Exemple #1
0
        /// <summary>
        /// Decrements the slider to the specified position
        /// </summary>
        /// <param name="to">New position</param>
        /// <exception cref="ArgumentOutOfRangeException">When <paramref name="to"/> is less than the minimum value supported</exception>
        /// <exception cref="InvalidOperationException">When <paramref name="to"/> is greater than the current value</exception>
        public virtual void Decrement(double to)
        {
            if (to < Minimum)
            {
                throw new ArgumentOutOfRangeException("to");
            }

            if (to > Value)
            {
                throw new InvalidOperationException("Can't decrement to the specified value. New value should be less than current value");
            }

            while (to < Value)
            {
                int distance = (int)(Value - to);
                if (distance > LargeChangeAmount)
                {
                    LargeDecrementButton.Click();
                }
                else
                {
                    for (int i = 0; i < distance; i++)
                    {
                        Decrement();
                    }
                }
            }
        }
 /// <summary>
 /// Scrolls up by a large amount.
 /// </summary>
 public void ScrollUpLarge()
 {
     LargeDecrementButton.Invoke();
 }
Exemple #3
0
 public virtual void ScrollLeftLarge()
 {
     LargeDecrementButton.Click();
 }
Exemple #4
0
 /// <summary>
 /// Scrolls left by a large amount.
 /// </summary>
 public virtual void ScrollLeftLarge()
 {
     LargeDecrementButton.Click(Enums.MouseAction.LeftClick);
 }