private void Initialize() { components = new Container(); _alphaAnimator = new ExtendedPictureBoxAlphaAnimator(components); _backColorAnimator = new ControlBackColorAnimator(components); _backColor2Animator = new ExtendedPictureBoxBackColor2Animator(components); _backColorGradientRotationAngleAnimator = new ExtendedPictureBoxBackColorGradientRotationAngleAnimator(components); _rotationAngleAnimator = new ExtendedPictureBoxRotationAngleAnimator(components); _extraImageRotationAngleAnimator = new ExtendedPictureBoxExtraImageRotationAngleAnimator(components); _zoomAnimator = new ExtendedPictureBoxZoomAnimator(components); _foreColorAnimator = new ControlForeColorAnimator(components); _textHaloColorAnimator = new ExtendedPictureBoxTextHaloColorAnimator(components); _textRotationAngleAnimator = new ExtendedPictureBoxTextRotationAngleAnimator(components); _textHaloWidthAnimator = new ExtendedPictureBoxTextHaloWidthAnimator(components); _textZoomAnimator = new ExtendedPictureBoxTextZoomAnimator(components); _shadowOffsetAnimator = new ExtendedPictureBoxShadowOffsetAnimator(components); _imageOffsetAnimator = new ExtendedPictureBoxImageOffsetAnimator(components); _textOffsetAnimator = new ExtendedPictureBoxTextOffsetAnimator(components); }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="animateExtraImageRotationAngle"> /// Indicates whether the the extra image should be rotated. /// </param> /// <param name="animateColor">Indicates whether the colors should be animated.</param> /// <param name="color1">First color of the animation.</param> /// <param name="color2">Second color of the animation.</param> /// <param name="pictureBox">AnimatedPictureBox.</param> internal StepAnimators(bool animateExtraImageRotationAngle, bool animateColor, Color color1, Color color2, AnimatedPictureBox pictureBox) { _pictureBox = pictureBox; _extraImageRotationAngleAnimator = new ExtendedPictureBoxExtraImageRotationAngleAnimator(); _extraImageRotationAngleAnimator.ExtendedPictureBox = (ExtendedPictureBox)pictureBox; _extraImageRotationAngleAnimator.StartRotationAngle = 0f; _extraImageRotationAngleAnimator.EndRotationAngle = 360f; _extraImageRotationAngleAnimator.LoopMode = LoopMode.Repeat; _backColorAnimator = new ControlBackColorAnimator(); _backColorAnimator.Control = (Control)pictureBox; _backColorAnimator.StartColor = color1; _backColorAnimator.EndColor = color2; _backColorAnimator.LoopMode = LoopMode.Bidirectional; _backColor2Animator = new ExtendedPictureBoxBackColor2Animator(); _backColor2Animator.ExtendedPictureBox = (ExtendedPictureBox)pictureBox; _backColor2Animator.StartColor = color2; _backColor2Animator.EndColor = color1; _backColor2Animator.ParentAnimator = _backColorAnimator; }