Exemplo n.º 1
0
        public Reddit(string siteURL)
        {
            this.siteURL = siteURL;

            string     jsonText = w.DownloadString(siteURL);
            RedditJSON jimages  = JsonConvert.DeserializeObject <RedditJSON>(jsonText);

            entries = new BindingList <SiteEntry>();


            foreach (Child image in jimages.data.children)
            {
                Data2 data = image.data;

                if (data.is_self == false)
                {
                    RedditEntry entry = new RedditEntry(this, data);
                    entries.Add(entry);
                    entry.DownloadPreview();
                }
            }


            DataSource = entries;
        }
Exemplo n.º 2
0
 public RedditEntry(Reddit site, Data2 image)
 {
     this.site  = this.bsite = site;
     this.image = image;
 }