Пример #1
0
        /// <summary>
        /// Cloning constructor.
        /// </summary>
        /// <param name="source">The source object from which to clone.</param>
        /// <param name="context">The cloning context object.</param>
        protected GeometricShuttersGraphic(GeometricShuttersGraphic source, ICloningContext context)
            : this(source._imageRectangle.Height, source._imageRectangle.Width)
        {
            context.CloneFields(source, this);

            foreach (GeometricShutter shutter in source._customShutters)
            {
                _customShutters.Add(shutter.Clone());
            }

            foreach (GeometricShutter shutter in source._dicomShutters)
            {
                _dicomShutters.Add(shutter.Clone());
            }
        }
Пример #2
0
 /// <summary>
 /// Constructs a new <see cref="RemoveGeometricShutterUndoableCommand"/>.
 /// </summary>
 /// <param name="parent">The parent <see cref="GeometricShuttersGraphic"/>.</param>
 /// <param name="shutter">The <see cref="GeometricShutter"/> to add to <paramref name="parent"/>.</param>
 public RemoveGeometricShutterUndoableCommand(GeometricShuttersGraphic parent, GeometricShutter shutter)
 {
     _parent  = parent;
     _shutter = shutter;
 }