/// <summary> /// Moves a slide to another part (can be undone). /// </summary> /// <param name="slide">The slide to move.</param> /// <param name="target">The target part.</param> public void MoveSlide(SongSlide slide, SongPart target) { var part = FindPartWithSlide(slide); using (Undo.ChangeFactory.Batch(this, "MoveSlide")) { part.RemoveSlide(slide); target.AddSlide(slide); } }
/// <summary> /// Copies the specified slide into a given part. /// The copy will be appended to the part's slide list /// (can be undone). /// </summary> /// <param name="slide">The slide to copy.</param> /// <param name="target">The part where the copy will be inserted.</param> /// <returns>The copy.</returns> public SongSlide CopySlide(SongSlide slide, SongPart target) { SongSlide s; var part = FindPartWithSlide(slide); using (Undo.ChangeFactory.Batch(this, "CopySlide")) { s = slide.Copy(); target.AddSlide(s); } return(s); }
private void AddSlide(SongPart part) { this.StructureTree.SelectItem(part.AddSlide()); }
/// <summary> /// Copies the specified slide into a given part. /// The copy will be appended to the part's slide list /// (can be undone). /// </summary> /// <param name="slide">The slide to copy.</param> /// <param name="target">The part where the copy will be inserted.</param> /// <returns>The copy.</returns> public SongSlide CopySlide(SongSlide slide, SongPart target) { SongSlide s; var part = FindPartWithSlide(slide); using (Undo.ChangeFactory.Batch(this, "CopySlide")) { s = slide.Copy(); target.AddSlide(s); } return s; }