private void buttonListAnimation_Click(object sender, EventArgs e) { AnimatedDecoration listAnimation = new AnimatedDecoration(this.olvSimple); Animation animation = listAnimation.Animation; //Sprite image = new ImageSprite(Resource1.largestar); //image.FixedLocation = Locators.SpriteAligned(Corner.MiddleCenter); //image.Add(0, 2000, Effects.Rotate(0, 360 * 2f)); //image.Add(1000, 1000, Effects.Fade(1.0f, 0.0f)); //animation.Add(0, image); Sprite image = new ImageSprite(Resource1.largestar); image.Add(0, 500, Effects.Move(Corner.BottomCenter, Corner.MiddleCenter)); image.Add(0, 500, Effects.Rotate(0, 180)); image.Add(500, 1500, Effects.Rotate(180, 360 * 2.5f)); image.Add(500, 1000, Effects.Scale(1.0f, 3.0f)); image.Add(500, 1000, Effects.Goto(Corner.MiddleCenter)); image.Add(1000, 900, Effects.Fade(1.0f, 0.0f)); animation.Add(0, image); Sprite text = new TextSprite("Animations!", new Font("Tahoma", 32), Color.Blue, Color.AliceBlue, Color.Red, 3.0f); text.Opacity = 0.0f; text.FixedLocation = Locators.SpriteAligned(Corner.MiddleCenter); text.Add(900, 900, Effects.Fade(0.0f, 1.0f)); text.Add(1000, 800, Effects.Rotate(180, 1440)); text.Add(2000, 500, Effects.Scale(1.0f, 0.5f)); text.Add(3500, 1000, Effects.Scale(0.5f, 3.0f)); text.Add(3500, 1000, Effects.Fade(1.0f, 0.0f)); animation.Add(0, text); animation.Start(); }
private void buttonRowAnimation_Click(object sender, EventArgs e) { object modelObject = this.olvSimple.GetModelObject(Math.Min(5, this.olvSimple.GetItemCount())); if (modelObject == null) { Coordinator.ShowMessage("There aren't any rows to be animated"); return; } AnimatedDecoration animatedDecoration = new AnimatedDecoration(this.olvSimple, modelObject); Animation animation = animatedDecoration.Animation; // Animate the same star several times to make ghosting this.AddStarAnimation(animation, 250, 0.4f); this.AddStarAnimation(animation, 200, 0.5f); this.AddStarAnimation(animation, 150, 0.6f); this.AddStarAnimation(animation, 100, 0.7f); this.AddStarAnimation(animation, 50, 0.8f); this.AddStarAnimation(animation, 0, 1.0f); animation.Start(); }
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(); }