/// <summary> /// Initializes the default animation. /// </summary> /// <param name="animationType">Type of the animation.</param> private void InitDefaultAnimation(Zeroit.Framework.Transitions.AnimatorWithEditor.AnimationType animationType) { switch (animationType) { case AnimationType.Custom: break; case AnimationType.Rotate: DefaultAnimation = ZeroitAnimate_Animation.Rotate; break; case AnimationType.HorizSlide: DefaultAnimation = ZeroitAnimate_Animation.HorizSlide; break; case AnimationType.VertSlide: DefaultAnimation = ZeroitAnimate_Animation.VertSlide; break; case AnimationType.Scale: DefaultAnimation = ZeroitAnimate_Animation.Scale; break; case AnimationType.ScaleAndRotate: DefaultAnimation = ZeroitAnimate_Animation.ScaleAndRotate; break; case AnimationType.HorizSlideAndRotate: DefaultAnimation = ZeroitAnimate_Animation.HorizSlideAndRotate; break; case AnimationType.ScaleAndHorizSlide: DefaultAnimation = ZeroitAnimate_Animation.ScaleAndHorizSlide; break; case AnimationType.Transparent: DefaultAnimation = ZeroitAnimate_Animation.Transparent; break; case AnimationType.Leaf: DefaultAnimation = ZeroitAnimate_Animation.Leaf; break; case AnimationType.Mosaic: DefaultAnimation = ZeroitAnimate_Animation.Mosaic; break; case AnimationType.Particles: DefaultAnimation = ZeroitAnimate_Animation.Particles; break; case AnimationType.VertBlind: DefaultAnimation = ZeroitAnimate_Animation.VertBlind; break; case AnimationType.HorizBlind: DefaultAnimation = ZeroitAnimate_Animation.HorizBlind; break; } }
/// <summary> /// Paint a representation of the simple filler (usually in designer). /// </summary> /// <param name="e">A <c>PaintValueEventArgs</c> that indicates what to paint and where to paint it.</param> public override void PaintValue(PaintValueEventArgs e) { //e.Graphics.FillRectangle(new SolidBrush(Color.Blue), e.Bounds /*r*/); ////if (e.Value is Filler) ////{ //// Brush br = ((Filler)e.Value).GetUITypeEditorBrush(e.Bounds); //// if (br != null) //// { //// e.Graphics.FillRectangle(br, e.Bounds /*r*/); //// } ////} e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; if (e.Value is AnimateInput) { Zeroit.Framework.Transitions.AnimatorWithEditor.AnimationType animationType = ((AnimateInput)e.Value).AnimationType; switch (animationType) { case AnimatorWithEditor.AnimationType.Custom: e.Graphics.DrawString("CU", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; case AnimatorWithEditor.AnimationType.Rotate: e.Graphics.DrawString("RT", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; case AnimatorWithEditor.AnimationType.HorizSlide: e.Graphics.DrawString("HS", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; case AnimatorWithEditor.AnimationType.VertSlide: e.Graphics.DrawString("VS", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; case AnimatorWithEditor.AnimationType.Scale: e.Graphics.DrawString("SC", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; case AnimatorWithEditor.AnimationType.ScaleAndRotate: e.Graphics.DrawString("SCR", new Font("Microsoft Sans Serif", 6), new SolidBrush(Color.Cyan), new Point(2, 5)); break; case AnimatorWithEditor.AnimationType.HorizSlideAndRotate: e.Graphics.DrawString("HSR", new Font("Microsoft Sans Serif", 6), new SolidBrush(Color.Cyan), new Point(2, 5)); break; case AnimatorWithEditor.AnimationType.ScaleAndHorizSlide: e.Graphics.DrawString("SHS", new Font("Microsoft Sans Serif", 6), new SolidBrush(Color.Cyan), new Point(2, 5)); break; case AnimatorWithEditor.AnimationType.Transparent: e.Graphics.DrawString("TT", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; case AnimatorWithEditor.AnimationType.Leaf: e.Graphics.DrawString("LF", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; case AnimatorWithEditor.AnimationType.Mosaic: e.Graphics.DrawString("MS", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; case AnimatorWithEditor.AnimationType.Particles: e.Graphics.DrawString("PTC", new Font("Microsoft Sans Serif", 6), new SolidBrush(Color.Cyan), new Point(2, 5)); break; case AnimatorWithEditor.AnimationType.VertBlind: e.Graphics.DrawString("VB", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; case AnimatorWithEditor.AnimationType.HorizBlind: e.Graphics.DrawString("HB", new Font("Microsoft Sans Serif", 9), new SolidBrush(Color.Cyan), new Point(1, 1)); break; } } }