Пример #1
0
        private void EnableSingleRepeat()
        {
            if (Config.Animate == true)
            {
                single_Circle.Opacity    = 0;
                single_Circle.Opacity    = 0;
                single_Circle.Visibility = Visibility.Visible;
                single_Text.Visibility   = Visibility.Visible;

                ClearUC.Utils.AnimationHelper.Brush ba = new ClearUC.Utils.AnimationHelper.Brush();
                PropertyPath pp = new PropertyPath("(0).(1)", Shape.FillProperty, SolidColorBrush.ColorProperty);
                ba.Animate(repeat.Fill, Config.Enabled, Config.AnimationDuration, repeat, pp);

                ClearUC.Utils.AnimationHelper.Double di = new ClearUC.Utils.AnimationHelper.Double();
                di.Animate(single_Circle.Opacity, 1, Config.AnimationDuration, null, OpacityProperty, single_Circle);

                ClearUC.Utils.AnimationHelper.Double dt = new ClearUC.Utils.AnimationHelper.Double();
                dt.Animate(single_Text.Opacity, 1, Config.AnimationDuration, null, OpacityProperty, single_Text);
            }
            else
            {
                repeat.Fill = Config.Enabled;
                single_Circle.Visibility = Visibility.Visible;
                single_Text.Visibility   = Visibility.Visible;
            }
        }
Пример #2
0
        public void Animate(Brush Before, Brush After, double Duration, Shape Shape)
        {
            if (Before == null | After == null)
            {
                return;
            }

            ClearUC.Utils.AnimationHelper.Brush ba = new ClearUC.Utils.AnimationHelper.Brush();
            ba.Animate(Before, After, Duration, Shape, new PropertyPath("(0).(1)", Shape.FillProperty, SolidColorBrush.ColorProperty));
        }
Пример #3
0
        private void drain_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (downf == true)
            {
                if (Click != null)
                {
                    Click(this, e);
                }
                downf = false;
                if (ToggleOnClick == true)
                {
                    return;
                }

                ClearUC.Utils.AnimationHelper.Brush ba = new ClearUC.Utils.AnimationHelper.Brush();
                PropertyPath pp = new PropertyPath("(0).(1)", Shape.FillProperty, SolidColorBrush.ColorProperty);
                switch (ToggleState)
                {
                case true:
                    if (Config.Animate == true)
                    {
                        ba.Animate(shuffle.Fill, Config.Enabled, Config.AnimationDuration, shuffle, pp);
                    }
                    else
                    {
                        shuffle.Fill = Config.Enabled;
                    }
                    break;

                case false:
                    if (Config.Animate == true)
                    {
                        ba.Animate(shuffle.Fill, Config.Disabled, Config.AnimationDuration, shuffle, pp);
                    }
                    else
                    {
                        shuffle.Fill = Config.Disabled;
                    }
                    break;
                }
            }
        }
Пример #4
0
 private void Disable()
 {
     ToggleState = false;
     if (Config.Animate == true)
     {
         ClearUC.Utils.AnimationHelper.Brush ba = new ClearUC.Utils.AnimationHelper.Brush();
         PropertyPath pp = new PropertyPath("(0).(1)", Shape.FillProperty, SolidColorBrush.ColorProperty);
         ba.Animate(shuffle.Fill, Config.Disabled, Config.AnimationDuration, shuffle, pp);
     }
     else
     {
         shuffle.Fill = Config.Disabled;
     }
 }
Пример #5
0
        private void Disable()
        {
            if (Config.Animate == true)
            {
                ClearUC.Utils.AnimationHelper.Brush ba = new ClearUC.Utils.AnimationHelper.Brush();
                PropertyPath pp = new PropertyPath("(0).(1)", Shape.FillProperty, SolidColorBrush.ColorProperty);
                ba.Animate(repeat.Fill, Config.Disabled, Config.AnimationDuration, repeat, pp);

                ClearUC.Utils.AnimationHelper.Double di = new ClearUC.Utils.AnimationHelper.Double();
                di.AnimationCompleted += Di_AnimationCompleted;
                di.Animate(single_Circle.Opacity, 0, Config.AnimationDuration, null, OpacityProperty, single_Circle);

                ClearUC.Utils.AnimationHelper.Double dt = new ClearUC.Utils.AnimationHelper.Double();
                dt.AnimationCompleted += Di_AnimationCompleted;
                dt.Animate(single_Text.Opacity, 0, Config.AnimationDuration, null, OpacityProperty, single_Text);
            }
            else
            {
                repeat.Fill = Config.Disabled;
                single_Circle.Visibility = Visibility.Hidden;
                single_Text.Visibility   = Visibility.Hidden;
            }
        }