private void toolStripButtonCopyAnimation_Click(object sender, EventArgs e) { int selCnt = listViewAnimations.SelectedIndices.Count; int[] selIndices = new int[selCnt]; listViewAnimations.SelectedIndices.CopyTo(selIndices, 0); for (int i = 0; i < selCnt; i++) { AnimationInfo selAnim = this.AnimatedSprite.Animations[selIndices[i]]; string newAnimName = GetNewAnimationName(selAnim.Name + "_"); AnimationInfo newAnim = new AnimationInfo(newAnimName); selAnim.CopyValuesTo(newAnim, this.AnimatedSprite); newAnim.Name = newAnimName; this.AnimatedSprite.AddAnimation(newAnim); listViewAnimations.Items.Add(newAnim.Name); if (i == 0) { listViewAnimations.SelectedIndices.Clear(); } listViewAnimations.SelectedIndices.Add(this.AnimatedSprite.Animations.Count - 1); } }