Пример #1
0
 public Mangastream()
 {
     name = "Mangastream";
     mangas = new HashSet<Manga>();
     wc = new WebClient();
     url = "http://mangastream.com/manga";
     readURL = "http://readms.com/r/";
     mdb = new MangaDatabase(this);
 }
Пример #2
0
 public MangaLife()
 {
     name = "Mangalife";
     mangas = new HashSet<Manga>();
     wc = new WebClient();
     url = "http://manga.life/directory/";
     readURL = "http://manga.life/read-online/";
     mdb = new MangaDatabase(this);
 }
Пример #3
0
 public MangaJoy()
 {
     name = "Mangajoy";
     mangas = new HashSet<Manga>();
     wc = new WebClient();
     url = "http://manga-joy.com/manga-list-all/";
     readURL = "http://manga-joy.com/";
     mdb = new MangaDatabase(this);
 }
Пример #4
0
        static void Main(string[] args)
        {
            Site mangaStream = new Mangastream();
            MangaDatabase mdb = new MangaDatabase(mangaStream);
            mdb.addMangas(mangaStream.parseMangas());
            //Manga m = new Manga("Hajime no Ippo", "hajime_no_ippo");
            //Manga m2 = new Manga("One Shot", "one_shot");
            //List<Chapter> chapters = mangaStream.GetAvailableChapters(m);
            /*foreach (var c in chapters)
            {
                Console.WriteLine(c.url + "\t" + c.title + "\t" + c.releaseDate);
            }*/

            /*Console.WriteLine("Chapter Length: " + mangaStream.getChapterLength(m, chapters[4]));
            List<string> images = mangaStream.getChapterImages(m, chapters[4]);
            foreach (var v in images)
            {
                Console.WriteLine(v);
            }*/

            //mangaStream.downloadChapter(m, mangas[3]);
            /*foreach (var v in chapters)
            {
                Console.WriteLine(mangaStream.getChapterLength(m, v));
            }*/
            //Console.WriteLine(mangaStream.getImgURL("http://readms.com/r/rock_lee/Special/1693/3"));

            /*if(!File.Exists("Mangastream.sqlite"))
                SQLiteConnection.CreateFile("Mangastream.sqlite");
            SQLiteConnection m_dbConnection;

            m_dbConnection = new SQLiteConnection("Data Source=Mangastream.sqlite;Version=3;");
            m_dbConnection.Open();

            string sql = "CREATE TABLE IF NOT EXISTS Mangas (Name VARCHAR(30), URLName VARCHAR(30))";
            SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
            command.ExecuteNonQuery();

            sql = "INSERT INTO Mangas (Name, URLName) VALUES ('Test', 'Test123')";
            command = new SQLiteCommand(sql, m_dbConnection);
            //command.ExecuteNonQuery();

            sql = "INSERT INTO Mangas (Name, URLName) VALUES ('One Shot', 'one_shot')";
            command = new SQLiteCommand(sql, m_dbConnection);
            //command.ExecuteNonQuery();

            sql = "select * from Mangas";
            command = new SQLiteCommand(sql, m_dbConnection);
            SQLiteDataReader reader = command.ExecuteReader();
            while (reader.Read())
                Console.WriteLine("Name: " + reader["Name"] + "\tURLName: " + reader["URLName"]);

            m_dbConnection.Close();*/

            Console.ReadKey();
        }