private void défilement(object sender, ScrollEventArgs e)
        {
            switch (e.Type)
            {
            case ScrollEventType.EndScroll:
                _origine.X = -e.NewValue;
                break;

            case ScrollEventType.ThumbTrack:
                _origine.X = -e.NewValue;
                break;

            case ScrollEventType.SmallIncrement:
                Miniature m = trouverMiniature(new Point(_origine.X + 1, _origine.Y + 1));

                barreDéfilement.SmallChange = m.Rectangle.Width;
                barreDéfilement.LargeChange = m.Rectangle.Width;
                break;

            case ScrollEventType.LargeIncrement:

                Miniature m2 = trouverMiniature(new Point(_origine.X, _origine.Y));

                barreDéfilement.SmallChange = m2.Rectangle.Width;
                barreDéfilement.LargeChange = m2.Rectangle.Width;
                break;
            }
            Refresh();
        }
        public Selection(Miniature miniature)
        {
            int epaisseur = 2;

            _pinceau     = new Pen(Color.Red, epaisseur);
            _cheminImage = miniature.Chemmin;
            _rectangle   = miniature.Rectangle;
        }
        public Miniature créerMiniature(Point p)
        {
            if (_listeMiniatures.Count > 0)
            {
                if (trouverMiniature(p) != null)
                {
                    Miniature m = trouverMiniature(p);
                    _selection = new Selection(m);
                    if (selectionMiniature != null)
                    {
                        return(m);
                    }
                }
            }

            return(null);
        }
 public SelectionMiniature(Miniature m)
 {
     miniature = m;
 }