Ejemplo n.º 1
0
        private void AddStarAnimation(Animation animation, int start, float opacity)
        {
            Sprite sprite = new ImageSprite(Resource1.star32);

            sprite.Opacity = opacity;
            sprite.Add(0, 4000, Effects.Walk(Locators.AnimationBounds(), WalkDirection.Anticlockwise));
            sprite.Add(0, 4000, Effects.Rotate(0, 1480));
            animation.Add(start, sprite);
        }
Ejemplo n.º 2
0
        private void buttonCellAnimation_Click(object sender, EventArgs e)
        {
            object modelObject = this.olvSimple.GetModelObject(Math.Min(5, this.olvSimple.GetItemCount()));

            if (modelObject == null || this.olvSimple.Columns.Count < 2)
            {
                Coordinator.ShowMessage("There aren't any cells to be animated");
                return;
            }

            AnimatedDecoration animatedDecoration = new AnimatedDecoration(this.olvSimple, modelObject, this.olvSimple.GetColumn(1));
            Animation          animation          = animatedDecoration.Animation;

            ShapeSprite sprite = ShapeSprite.RoundedRectangle(5.0f, Color.Firebrick, Color.FromArgb(48, Color.Firebrick));

            sprite.Opacity        = 0.0f;
            sprite.CornerRounding = 14;
            sprite.FixedBounds    = Locators.AnimationBounds(3, 3);
            sprite.Add(0, 4500, Effects.Blink(3));
            animation.Add(0, sprite);

            animation.Start();
        }