Пример #1
0
        /// <summary>
        /// Creates a deep copy of the <see cref="IPresentationImage"/>.
        /// </summary>
        /// <remarks>
        /// <see cref="IPresentationImage"/>s should never return null from this method.
        /// </remarks>
        public IPresentationImage Clone()
        {
            try
            {
                PresentationImage clone = CloneBuilder.Clone(this) as PresentationImage;
                if (clone != null)
                {
                    clone.SceneGraph.SetParentPresentationImage(clone);
                    if (ImageViewer != null)
                    {
                        ImageViewer.EventBroker.OnCloneCreated(new CloneCreatedEventArgs(this, clone));
                    }
                }

                return(clone);
            }
            catch (Exception e)
            {
                throw new PresentationImageCloningException(this, e);
            }
        }
Пример #2
0
		/// <summary>
		/// Called when a <see cref="PresentationImage"/> has been removed from the display set.
		/// </summary>
		/// <param name="image">The image that was removed from the display set.</param>
		protected virtual void OnPresentationImageRemoved(PresentationImage image)
		{
			image.ParentDisplaySet = null;
			image.ImageViewer = null;
		}
Пример #3
0
 /// <summary>
 /// Called when a <see cref="PresentationImage"/> has been removed from the display set.
 /// </summary>
 /// <param name="image">The image that was removed from the display set.</param>
 protected virtual void OnPresentationImageRemoved(PresentationImage image)
 {
     image.ParentDisplaySet = null;
     image.ImageViewer      = null;
 }
Пример #4
0
		/// <summary>
		/// Called when a <see cref="PresentationImage"/> has been added to the display set.
		/// </summary>
		/// <param name="image">The image that was added to the display set.</param>
		protected virtual void OnPresentationImageAdded(PresentationImage image)
		{
			image.ParentDisplaySet = this;
			image.ImageViewer = this.ImageViewer;
		}
Пример #5
0
 /// <summary>
 /// Called when a <see cref="PresentationImage"/> has been added to the display set.
 /// </summary>
 /// <param name="image">The image that was added to the display set.</param>
 protected virtual void OnPresentationImageAdded(PresentationImage image)
 {
     image.ParentDisplaySet = this;
     image.ImageViewer      = this.ImageViewer;
 }