I have a list of consecutive images that need to be loaded in order when the user clicks "Next". The next page is determined by adding one to the number at the end of the URL, for example: http://twoimages.com/image_1to http://twoimages.com/image_2. I want to be able to detect when there are no more images to upload. I could use the event, but it only fires after it has failed and finished working with the rest of the code.
http://twoimages.com/image_1
http://twoimages.com/image_2
public void LoadImage(string ImageUrl) { BitmapImage bmpImage; if (this.SilverlightImage.Source is BitmapImage) { bmpImage = this.SilverlightImage.Source as BitmapImage; } else { bmpImage = new BitmapImage(); bmpImage.DownloadProgress += new EventHandler<DownloadProgressEventArgs>(bitmapImage_DownloadProgress); } bmpImage.UriSource = new Uri(ImageUrl, UriKind.RelativeOrAbsolute); if (this.SilverlightImage.Source == null) { this.SilverlightImage.Source = bmpImage; } }
I would like to be able to detect when there are no more images to upload, and not even try to upload an image that does not exist.
Thank,
Aaron
, ... , BitmapSource, , , Hack
, - , , , URI , , , , , (, , , ), , . ( Silverlight), , .
, , - : , , /, , 'd be running.
, , - , - , , , , . , , , , , , , , . , , , , ( WCF , ). .
- " ". XML ashx, xml. - , WCF.
URL- XML, LoadImage, "", ( ".", ).
, , , , , , , .
, , ClientHTTP HttpWebRequest, "HEAD" . , cookie.
ClientHTTP
HttpWebRequest
Source: https://habr.com/ru/post/1781511/More articles:C ++, data model, templates - c ++Getting list of strings with deleted character in permutation - pythonC ++ + typedef template - c ++Passing a template class with an unknown type to an unoccupied class constructor - c ++Is there a GitX equivalent for Mercurial that allows command line execution? - command-lineUpdating a media wiki article using Python? - pythonmySQL multiple INNER JOIN - inner-joinhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1781514/need-repository-layout-references&usg=ALkJrhgF21I94DesxWD5rW4YygdO4l1j5AProblems with COM Interop and .NET 3.5 - different behaviors in debug and release mode - c #Submission mechanisms - pythonAll Articles