Пример #1
0
        private void AnimateProgressBar(CmdExecutorProgress o)
        {
            var             duration        = DurationFactory.FromMilliseconds(250);
            DoubleAnimation doubleAnimation = new DoubleAnimation(o.Percentage, duration);

            ConsoleProgressBar.BeginAnimation(RangeBase.ValueProperty, doubleAnimation);
            ConsoleProgressBar.Value = o.Percentage;
        }
Пример #2
0
        private void ResetProgressBar()
        {
            //Avoids animating the progressbar when its value is reset to zero.
            ConsoleProgressBar.BeginAnimation(RangeBase.ValueProperty, null);
            ConsoleProgressBar.Value = 0.0;
            //06b025

            ConsoleProgressBar.Foreground = ResourceUtils.DefaultProgressBarColor;
        }