Beispiel #1
0
        private void LoadSectionImages(string section)
        {
            string   url   = "http://browse.deviantart.com/" + section;
            WebProxy proxy = Proxy.GetConfig();

            string[] images = UrlExtractor.GetImages(url, proxy);
            Gtk.Application.Invoke(delegate {
                ImageViewer imageViewer = new ImageViewer();
                notebookViewer.AppendCustom(imageViewer, section,
                                            new Gtk.Image("DeviantART", IconSize.Menu));

                foreach (string imgUrl in images)
                {
                    byte[] imgData    = UrlUtils.FetchPage(imgUrl, proxy);
                    Gdk.Pixbuf pixbuf = new Gdk.Pixbuf(imgData);
                    imageViewer.Add(imgUrl, imgUrl, pixbuf);
                }
            });
        }