Beispiel #1
0
 /// <summary>
 /// Gestionnaire d'événement
 /// </summary>
 /// <param name="targetedPhotoBox">Boite de photo ciblée</param>
 public void OnSelectedChanged(PhotoBox targetedPhotoBox)
 {
     if (SelectedChanged != null)
     {
         SelectedChanged(this, new ImageLayoutEventArgs(targetedPhotoBox));
     }
 }
Beispiel #2
0
        /// <summary>
        /// Ajout d'une photo
        /// </summary>
        /// <param name="photo"></param>
        public void AddPhoto(Photo photo)
        {
            PhotoBox photoBox = new PhotoBox(photo);

            photoBox.SetClickListener(ImagesLayout_Click);
            Controls.Add(photoBox);
        }
Beispiel #3
0
 /// <summary>
 /// Constructeur
 /// </summary>
 public ImagesLayout() : base()
 {
     _SelectedPhotoBox = null;
     WrapContents      = false;
     AutoScroll        = true;
     FlowDirection     = FlowDirection.TopDown;
 }
Beispiel #4
0
 /// <summary>
 /// Retirer la boite de photo sélectionnée
 /// </summary>
 public void RemoveSelected()
 {
     foreach (PhotoBox photoBox in Controls)
     {
         if (photoBox.Selected)
         {
             Controls.Remove(photoBox);
             SelectedPhotoBox = null;
             break;
         }
     }
 }
Beispiel #5
0
 /// <summary>
 /// Vider le regroupement de boites de photo
 /// </summary>
 public void Clear()
 {
     Controls.Clear();
     SelectedPhotoBox = null;
 }
Beispiel #6
0
 /// <summary>
 /// Constructeur
 /// </summary>
 /// <param name="targetPhotoBox"></param>
 public ImageLayoutEventArgs(PhotoBox targetPhotoBox) : base()
 {
     TargetPhotoBox = targetPhotoBox;
 }