Exemplo n.º 1
0
        /// <summary>
        /// Loads the given range of Flickr photos asynchronously
        /// </summary>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <param name="photos"></param>
        /// <param name="notificationDispatcher"></param>
        /// <param name="notificationEvent"></param>
        public static void AsynchLoadPhotoRange(int start, int end, FlickrPhotos photos,
                                                Dispatcher notificationDispatcher,
                                                FlickrWorkCompleteDelegate notificationEvent)
        {
            DateTime requestTime = DateTime.Now;

            AddToWorkQueue(delegate()
                           {
                               if (photos.LoadRange(start, end, requestTime))
                               {
                                   if (notificationDispatcher != null && notificationEvent != null)
                                   {
                                       notificationDispatcher.BeginInvoke(DispatcherPriority.SystemIdle,
                                                                          notificationEvent,
                                                                          photos);
                                   }
                               }
                           }
                           );
        }