/// <summary> /// Initializes a new image by cloning data from the old image. If the /// provided image is null, this constructor behaves identically to the /// default constructor. /// </summary> public MenuOptionImage( MenuOptionImage copyFrom ) { if( copyFrom != null ) { m_dropShadow = (DropShadowOptions)copyFrom.m_dropShadow.Clone(); m_image = (Bitmap)copyFrom.m_image.Clone(); m_transparency = copyFrom.m_transparency; m_transparencyKey = copyFrom.m_transparencyKey; m_useDropShadow = copyFrom.m_useDropShadow; } }
/// <summary> /// Creates a new, independent copy of the provided settings object. /// </summary> /// <param name="copyFrom"> /// The object to copy settings from. If null, all settings will be /// initialized to their defaults. /// </param> public DropShadowOptions( DropShadowOptions copyFrom ) { if( copyFrom != null ) { m_color = copyFrom.m_color; m_blurRadius = copyFrom.m_blurRadius; m_opacityStep = copyFrom.m_opacityStep; m_maximumOpacity = copyFrom.m_maximumOpacity; m_xOffset = copyFrom.m_xOffset; m_yOffset = copyFrom.m_yOffset; } }
/// <summary> /// Initializes a new editor and assigns it to edit the provided set of /// options, which cannot be null. /// </summary> /// <exception cref="ArgumentNullException"> /// Thrown if the provided options set is null. /// </exception> public DropShadowOptionsEditorUi( DropShadowOptions options ) : this() { Options = options; }