예제 #1
0
파일: Main.cs 프로젝트: SfeirLoic/VacumUI
        private void btn_scanAllMangas_Click(object sender, EventArgs e)
        {
            LelScan      lel      = new LelScan();
            List <Manga> mangaLst = Manga.getAllManga(lel);

            addMangaToScannedList(mangaLst);
        }
예제 #2
0
파일: Manga.cs 프로젝트: SfeirLoic/VacumUI
        internal static void infDlZip(List <Manga> mangaLst)
        {
            LelScan lel = new LelScan();

            Manga.getInfosMangas(mangaLst, lel);
            Outils.dlMangaWebClient(mangaLst);
            Outils.zipAndDel(mangaLst);
        }
예제 #3
0
파일: Main.cs 프로젝트: SfeirLoic/VacumUI
        /***************    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);
        }
예제 #4
0
파일: Main.cs 프로젝트: SfeirLoic/VacumUI
 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";
     }
 }
예제 #5
0
파일: Outils.cs 프로젝트: SfeirLoic/VacumUI
        internal static String searchSite(string site)
        {
            switch (site)
            {
            case "a":
                LelScan lel = new LelScan();
                return(lel.LelScanUrlMangaRoot.ToString());

            default:
                throw new Exception();
            }
        }
예제 #6
0
파일: Manga.cs 프로젝트: SfeirLoic/VacumUI
        /// <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);
        }
예제 #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);
        }
예제 #8
0
파일: Main.cs 프로젝트: SfeirLoic/VacumUI
        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();
        }
예제 #9
0
파일: Manga.cs 프로젝트: SfeirLoic/VacumUI
        /// <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));
        }
예제 #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);
        }