Exemplo n.º 1
0
        protected virtual void OnImageLoaded(FileOpenedEventArgs args)
        {
            ImageLoadedEventHandler handler = ImageLoaded;

            if (handler != null)
            {
                ISynchronizeInvoke target = handler.Target as ISynchronizeInvoke;

                if (target != null && target.InvokeRequired)
                {
                    target.Invoke(handler, new object[] { this, args });
                }
                else
                {
                    handler(this, args);
                }
            }
        }
 public void Load(string URL, ImageLoadedEventHandler imageLoadedEventHandler)
 {
     queue.Enqueue(new TaskInfo(URL,imageLoadedEventHandler));
       LoadTask();
 }