Esempio n. 1
0
        /// <summary>
        /// Handles changes to the AlphaTicksPercentage property.
        /// </summary>
        private static void OnAlphaTicksPercentageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom waiting = (WaitingControlCom)d;
            double            oldAlphaTicksPercentage = (double)e.OldValue;
            double            newAlphaTicksPercentage = waiting.AlphaTicksPercentage;

            waiting.OnAlphaTicksPercentageChanged(oldAlphaTicksPercentage, newAlphaTicksPercentage);
        }
Esempio n. 2
0
        /// <summary>
        /// Handles changes to the LowestAlpha property.
        /// </summary>
        private static void OnLowestAlphaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom waiting        = (WaitingControlCom)d;
            Int32             oldLowestAlpha = (Int32)e.OldValue;
            Int32             newLowestAlpha = waiting.LowestAlpha;

            waiting.OnLowestAlphaChanged(oldLowestAlpha, newLowestAlpha);
        }
Esempio n. 3
0
        /// <summary>
        /// Handles changes to the TickStyle property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnTickStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom waiting      = (WaitingControlCom)d;
            PenLineCap        oldTickStyle = (PenLineCap)e.OldValue;
            PenLineCap        newTickStyle = waiting.TickStyle;

            waiting.OnTickStyleChanged(oldTickStyle, newTickStyle);
        }
Esempio n. 4
0
        /// <summary>
        /// Handles changes to the TickWidth property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnTickWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom target       = (WaitingControlCom)d;
            double            oldTickWidth = (double)e.OldValue;
            double            newTickWidth = target.TickWidth;

            target.OnTickWidthChanged(oldTickWidth, newTickWidth);
        }
Esempio n. 5
0
        /// <summary>
        /// Handles changes to the TickColor property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnTickColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom waiting      = (WaitingControlCom)d;
            Color             oldTickColor = (Color)e.OldValue;
            Color             newTickColor = waiting.TickColor;

            waiting.OnTickColorChanged(oldTickColor, newTickColor);
        }
Esempio n. 6
0
        /// <summary>
        /// Handles changes to the TickCount property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnTickCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom waiting = (WaitingControlCom)d;
            int oldTickCount          = (int)e.OldValue;
            int newTickCount          = waiting.TickCount;

            waiting.OnTickCountChanged(oldTickCount, newTickCount);
        }
Esempio n. 7
0
        /// <summary>
        /// Handles changes to the StartAngle property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnStartAngleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom waiting       = (WaitingControlCom)d;
            double            oldStartAngle = (double)e.OldValue;
            double            newStartAngle = waiting.StartAngle;

            waiting.OnStartAngleChanged(oldStartAngle, newStartAngle);
        }
Esempio n. 8
0
        /// <summary>
        /// Handles changes to the Rotation property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnRotationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom waiting     = (WaitingControlCom)d;
            Direction         oldRotation = (Direction)e.OldValue;
            Direction         newRotation = waiting.Rotation;

            waiting.OnRotationChanged(oldRotation, newRotation);
        }
Esempio n. 9
0
        /// <summary>
        /// Handles changes to the Progress property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom waiting     = (WaitingControlCom)d;
            double            oldProgress = (double)e.OldValue;
            double            newProgress = waiting.Progress;

            waiting.OnProgressChanged(oldProgress, newProgress);
        }
Esempio n. 10
0
        /// <summary>
        /// Handles changes to the IsIndeterminate property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnIsIndeterminateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom target = (WaitingControlCom)d;
            bool oldIsIndeterminate  = (bool)e.OldValue;
            bool newIsIndeterminate  = target.IsIndeterminate;

            target.OnIsIndeterminateChanged(oldIsIndeterminate, newIsIndeterminate);
        }
Esempio n. 11
0
        /// <summary>
        /// Handles changes to the Interval property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnIntervalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            WaitingControlCom waiting     = (WaitingControlCom)d;
            double            oldInterval = (double)e.OldValue;
            double            newInterval = waiting.Interval;

            waiting.OnIntervalChanged(oldInterval, newInterval);
        }
Esempio n. 12
0
        /// <summary>
        /// Coerces the AlphaTicksPercentage value.
        /// </summary>
        private static object CoerceAlphaTicksPercentage(DependencyObject d, object value)
        {
            WaitingControlCom target = (WaitingControlCom)d;
            double            desiredAlphaTicksPercentage = (double)value;

            if (desiredAlphaTicksPercentage > 100.0)
            {
                return(100.0);
            }
            if (desiredAlphaTicksPercentage < ALPHA_TICK_PERCENTAGE_LOWER_LIMIT)
            {
                return(ALPHA_TICK_PERCENTAGE_LOWER_LIMIT);
            }

            return(desiredAlphaTicksPercentage);
        }
Esempio n. 13
0
        /// <summary>
        /// Coerces the LowestAlpha value.
        /// </summary>
        private static object CoerceLowestAlpha(DependencyObject d, object value)
        {
            WaitingControlCom waiting            = (WaitingControlCom)d;
            Int32             desiredLowestAlpha = (Int32)value;

            if (desiredLowestAlpha < ALPHA_LOWER_LIMIT)
            {
                return(ALPHA_LOWER_LIMIT);
            }
            else if (desiredLowestAlpha > ALPHA_UPPER_LIMIT)
            {
                return(ALPHA_UPPER_LIMIT);
            }

            return(desiredLowestAlpha);
        }