Esempio n. 1
0
 public static StageVmStyle ChangeAnimationSpeed(
     this StageVmStyle stageVmStyle,
     TicsPerStep animationSpeed)
 {
     return(new StageVmStyle
     {
         AnimationSpeed = animationSpeed,
         KeyLineBrush = stageVmStyle.KeyLineBrush,
         SwitchBrushNotUsed = stageVmStyle.SwitchBrushNotUsed,
         SwitchBrushInUse = stageVmStyle.SwitchBrushInUse,
         SwitchBrushWasUsed = stageVmStyle.SwitchBrushWasUsed,
         SwitchLineWidth = stageVmStyle.SwitchLineWidth,
         SwitchHSpacing = stageVmStyle.SwitchHSpacing,
         StageRightMargin = stageVmStyle.StageRightMargin,
         KeyLineThickness = stageVmStyle.KeyLineThickness,
         KeyLineHeight = stageVmStyle.KeyLineHeight,
         VPadding = stageVmStyle.VPadding,
         BackgroundBrush = stageVmStyle.BackgroundBrush
     });
 }
Esempio n. 2
0
        public static double ToUpdateSteps(this TicsPerStep animationSpeed)
        {
            switch (animationSpeed)
            {
            case TicsPerStep.Stopped:
                return(-1.0);

            case TicsPerStep.Slow:
                return(125.0);

            case TicsPerStep.Medium:
                return(25.0);

            case TicsPerStep.Fast:
                return(5.0);

            default:
                return(-1.0);
            }
        }
Esempio n. 3
0
        public static int ToTicsPerStep(this TicsPerStep animationSpeed)
        {
            switch (animationSpeed)
            {
            case TicsPerStep.Stopped:
                return(-1);

            case TicsPerStep.Slow:
                return(40);

            case TicsPerStep.Medium:
                return(10);

            case TicsPerStep.Fast:
                return(3);

            default:
                return(-1);
            }
        }
Esempio n. 4
0
 public static StageVmStyle Standard(
     Brush backgroundBrush,
     TicsPerStep animationSpeed,
     SwitchUseWrap maxSwitchUse)
 {
     return(new StageVmStyle
     {
         AnimationSpeed = animationSpeed,
         KeyLineBrush = Brushes.Blue,
         SwitchBrushNotUsed = Brushes.Black,
         SwitchBrushInUse = Brushes.Orange,
         SwitchBrushWasUsed = maxSwitchUse.ToSwitchBrushFunc(),
         SwitchLineWidth = 1.0,
         SwitchHSpacing = 3.25,
         StageRightMargin = 3.25,
         KeyLineThickness = 1.0,
         KeyLineHeight = 4.0,
         VPadding = 1.0,
         BackgroundBrush = backgroundBrush
     });
 }