Пример #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);
                }
            });
        }
Пример #2
0
        public static TalkFrame AddTalkFrame(UserInfo userInfo)
        {
            TalkFrame talkFrame = LookupTalkFrame(userInfo);

            if (talkFrame != null)
            {
                return(talkFrame);
            }

            // Initialize Talk Frame
            talkFrame          = new TalkFrame(userInfo);
            talkFrame.Message += new StringEventHandler(OnSendMessage);
            talkFrames.Add(userInfo, talkFrame);

            notebookViewer.AppendCustom(talkFrame, userInfo.Name,
                                        new Gtk.Image("TalkBubble", IconSize.Menu));

            return(talkFrame);
        }