Exemple #1
0
        private void btn_scanAllMangas_Click(object sender, EventArgs e)
        {
            LelScan      lel      = new LelScan();
            List <Manga> mangaLst = Manga.getAllManga(lel);

            addMangaToScannedList(mangaLst);
        }
Exemple #2
0
        internal static void infDlZip(List <Manga> mangaLst)
        {
            LelScan lel = new LelScan();

            Manga.getInfosMangas(mangaLst, lel);
            Outils.dlMangaWebClient(mangaLst);
            Outils.zipAndDel(mangaLst);
        }
Exemple #3
0
        /***************    BUTTONS    ***************/
        private void btn_scanPopularManga_Click(object sender, EventArgs e)
        {
            LelScan lel = new LelScan();
            //récupère la liste des mangas populaires
            List <Manga> mangaLst = Manga.getAllPopularMangaList(lel);

            addMangaToScannedList(mangaLst);
        }
Exemple #4
0
 private void btn_getAllChapterForSelectedManga_Click(object sender, EventArgs e)
 {
     lb_chap.DataSource = null;
     if (lb_mangaScanned.SelectedItems.Count > 0)
     {
         LelScan lel = new LelScan();
         Manga   m   = (Manga)lb_mangaScanned.SelectedItem;
         Chapitre.getChapsFromManga(m, lel);
         lb_chap.DataSource    = m.MangaChapCompleteLst;
         lb_chap.DisplayMember = "ChapTitleShow";
     }
 }
Exemple #5
0
        internal static String searchSite(string site)
        {
            switch (site)
            {
            case "a":
                LelScan lel = new LelScan();
                return(lel.LelScanUrlMangaRoot.ToString());

            default:
                throw new Exception();
            }
        }
Exemple #6
0
        /// <summary>
        /// Récupère tous les mangas dispo
        /// </summary>
        /// <param name="o"></param>
        /// <returns></returns>
        public static List <Manga> getAllManga(object o)
        {
            List <Manga> mLst = new List <Manga>();

            if (o is LelScan)
            {
                LelScan.getAllManga(mLst);
            }
            else
            {
                throw new Exception();
            }
            return(mLst);
        }
Exemple #7
0
        /// <summary>
        /// Complète l'objet Manga avec la liste des tous les chapitres trouvés
        /// </summary>
        /// <param name="manga"></param>
        /// <returns></returns>
        public static void getChapsFromManga(Manga m, object o)
        {
            HtmlWeb web = new HtmlWeb();
            IEnumerable <String> chapsLinks;

            HtmlAgilityPack.HtmlDocument mPag = web.Load(m.MangaUrl);
            if (o is LelScan)
            {
                chapsLinks = LelScan.getChapsLinksFromManga(m, mPag);
            }
            else
            {
                throw new Exception();
            }
            m.MangaChapCompleteLst = Chapitre.addChapToChapLst(m, chapsLinks);
        }
Exemple #8
0
        private void btn_downloadSelectedChapters_Click(object sender, EventArgs e)
        {
            allButtonDisable();
            LelScan         lel    = new LelScan();
            List <Chapitre> cDlLst = new List <Chapitre>();

            foreach (Chapitre c in lb_chap.SelectedItems)
            {
                cDlLst.Add(c);
            }
            Chapitre.getInfoChapitres(cDlLst, lel);
            Outils.dlChapWebClient(cDlLst);
            Outils.zipAndDel(cDlLst);
            MessageBox.Show("Les téléchargements des chapitres selectionnés sont terminés", "Cool", MessageBoxButtons.OK, MessageBoxIcon.Information);
            allButtonEnable();
        }
Exemple #9
0
        /// <summary>
        /// Récupère la liste de tous les manga populaires de lelscan
        /// </summary>
        /// <returns></returns>
        public static List <Manga> getAllPopularMangaList(object o)
        {
            HtmlWeb web = new HtmlWeb();
            IEnumerable <String> mangaUrl;

            if (o is LelScan)
            {
                LelScan lel = (LelScan)o;
                HtmlAgilityPack.HtmlDocument LelScanHtmlPage = web.Load(lel.LelScanUrlRoot);
                mangaUrl = LelScan.getAllPopularMangaLinks(LelScanHtmlPage);
            }
            else
            {
                throw new Exception();
            }
            return(Manga.addMangaToMangaLst(mangaUrl));
        }
Exemple #10
0
        public static void getChapPages(Chapitre chap, object o)
        {
            HtmlWeb web = new HtmlWeb();

            HtmlAgilityPack.HtmlDocument chapterPage = web.Load(chap.ChapUrl);
            IEnumerable <string>         picsUrl;

            if (o is LelScan)
            {
                picsUrl = LelScan.getChapPages(chapterPage);
            }
            else
            {
                throw new Exception();
            }
            addPicToChapPicLst(chap, picsUrl);
        }