Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            PluginInterface pl = null;

            plugins.TryGetValue(comboBox1.SelectedItem.ToString(), out pl);

            List <string> links            = null;
            List <string> chaptersList     = null;
            List <string> selectedChapters = null;

            if (pl != null)
            {
                chaptersList = pl.getChapterList(textBox1.Text);
                ChapterList fen = new ChapterList(chaptersList);
            }

            if (!System.IO.Directory.Exists("Manga"))
            {
                System.IO.Directory.CreateDirectory("Manga");
            }

            foreach (string c in selectedChapters)
            {
                links = pl.getChapterLink(c);

                int i = 1;

                foreach (string link in links)
                {
                    WebClient w = new WebClient();
                    w.DownloadFile(link, ("Manga/" + c + i + ".jpg"));
                    i++;
                }
            }
        }