Example #1
0
        /// <summary>
        /// Populate the databases
        /// </summary>
        private void Populate()
        {
            foreach (DirectoryInfo dir in FileHelper.GetDirs(FileHelper.APP_ROOT))
            {
                switch (Title.GetType(dir))
                {
                case TitleType.MANGA:
                    switch (Manga.GetSource(dir))
                    {
                    case MangaType.MANGADEX:
                        mangaDB.Add(new MangaDex(dir));
                        break;

                    case MangaType.KISSMANGA:
                        mangaDB.Add(new KissManga(dir));
                        break;

                    case MangaType.NULL:
                    default:
                        break;
                    }
                    break;

                case TitleType.HENTAI:
                    switch (Hentai.GetSource(dir))
                    {
                    case HentaiType.NHENTAI:
                        hentaiDB.Add(new Nhentai(dir));
                        break;

                    case HentaiType.NULL:
                    default:
                        break;
                    }
                    break;

                case TitleType.NULL:
                default:
                    break;
                }
            }
        }
Example #2
0
        /// <summary>
        /// Populate the databases
        /// </summary>
        private void Populate()
        {
            foreach (DirectoryInfo dir in FileHelper.GetDirs(FileHelper.APP_ROOT))
            {
                switch (Title.GetType(dir))
                {
                case TitleType.MANGA:
                    mangaDB.Add(new Manga(dir));
                    break;

                case TitleType.HENTAI:
                    hentaiDB.Add(new Hentai(dir));
                    break;

                case TitleType.NULL:
                default:
                    break;
                }
            }
        }