Пример #1
0
        private void GetWebImageThread(object o)
        {
            if ((baseURL == null) || (extent == null))
            {
                return;
            }

            System.Drawing.Image tmpImage;
            string imgURL = baseURL + (string)o + "." + extent;

            try {
                tmpImage = System.Drawing.Image.FromStream(webClient.OpenRead(imgURL));
            }
            catch {
                parent.LoggerWriteInvoke("Exception while opening image url: " + imgURL);
                return;
            }
            //put the new image in the SlideDeck.
            int newIndex = Convert.ToInt32((string)o);

            slideDeck.SetSlide(newIndex, new Slide(new Bitmap(tmpImage), "Slide " + (string)o));

            // display the newly loaded slide.
            DisplaySlideIndex(Convert.ToInt32(o));  // the latter two params are not relevant here.
        }