using System.ComponentModel;
using System.Windows.Forms;
using FastReport.Utils;

namespace FastReport.Dialog
{
    partial class PictureBoxControl
    {
        #region Properties
        /// <summary>
        /// This property is not relevant to this class.
        /// </summary>
        [Browsable(false)]
        public new string Text
        {
            get { return base.Text; }
            set { base.Text = value; }
        }
        #endregion

        #region Private Methods
        private bool ShouldSerializeImage()
        {
            return Image != null;
        }
        #endregion

        #region Protected Methods
        /// <inheritdoc/>
        protected override SelectionPoint[] GetSelectionPoints()
        {
            if (PictureBox.SizeMode == PictureBoxSizeMode.AutoSize)
                return new SelectionPoint[] { new SelectionPoint(AbsLeft - 2, AbsTop - 2, SizingPoint.None) };
            return base.GetSelectionPoints();
        }
        #endregion

    }
}
