Eventhandler

You will need an eventhandler in order to be able to subscribe to events in classes, something like this:

 

    public class UmbracoImagesDelete:UmbracoImages 
    {
        public event EventHandler ImagesDeletedCompleted;
    }

This event has to be fired somewhere in the class. In this case when all selected images are deleted the event ImagesDeletedCompleted is fired:

public class UmbracoImagesDelete:UmbracoImages 
    {
        public event EventHandler ImagesDeletedCompleted;

        public void DeleteSelectedImages(string[] selectedImages)
        {
             selectedImages.foreach(deleteImage);
             ImagesDeletedCompleted();
        }
    }

So in the subscribing class you can catch the completed event like this:

    var umbracoImagesDelete = new UmbracoImagesDelete();
    ubracoImagesDelete.ImagesDeletedCompleted+= new EventHandler(umbracoimagesdelete_imagesDeletedCompleted);

Then in the method you can handle the event:

void umbracoimagesdelete_imagesDeletedCompleted(object sender, EventArgs e)
        {
           // oh noooo, all images are deleted !!
        }

{{opmerking.Naam}}:

{{opmerking.OpmerkingText}}

            

Saving your comment....

Naam is verplicht!
Email is verplicht!
Opmerking is verplicht!