public ImgCtrl(LibLabo.Ctrls.PhotoControl.InfoVignette _infoPhoto, int numElement, bool _showImage)
 {
     this.initCtrl(_infoPhoto, numElement, _showImage);
 }
 /// <summary>
 /// Constructeur du UserControl
 /// </summary>
 /// <param name="_infoPhoto"></param>
 /// <param name="numElement"></param>
 public ImgCtrl(LibLabo.Ctrls.PhotoControl.InfoVignette _infoPhoto, int numElement)
 {
     this.initCtrl(_infoPhoto, numElement, true);
 }
        private void initCtrl(LibLabo.Ctrls.PhotoControl.InfoVignette _infoPhoto, int numElement, bool _showImage)
        {
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);

            InitializeComponent();
            toolTip = new ToolTip();
            p_infoVignette = _infoPhoto;
            numPhoto.Text = _infoPhoto.numPhoto.ToString();
            p_fileName = _infoPhoto.namePhoto;
            if (_showImage) { this.loadPhoto(); }
            p_isSelected = false;
            this.selectPhotoItem.Text = "Sélectionner cette photo";
            p_numElement = numElement;
            this.Anchor = AnchorStyles.Bottom;
            this.AutoSize = true;
            this.Dock = DockStyle.Fill;
            this.ResumeLayout(false);
        }