Пример #1
0
        /// <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);
            }
        }
Пример #2
0
        /// <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);
        }
Пример #3
0
 private void AddSlide(SongPart part)
 {
     this.StructureTree.SelectItem(part.AddSlide());
 }
Пример #4
0
		/// <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;
		}
Пример #5
0
		/// <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);
			}
		}