public string beginLoop() { try { this.CurrentBook = null; this.CurrentBook = wb.BookList[index]; Console.WriteLine("\r\n(" + DateTime.Now + ") " + "Advancing to next Book " + this.CurrentBook.BookName + ": ChapterAddress: " + this.CurrentBook.BookLastChapterAddress + "..."); ProgramStatics.ChapterAddress = this.CurrentBook.BookLastChapterAddress; Uri u = new Uri(CurrentBook.BookLastChapterAddress); //u = new Uri("https://www.google.com"); this.NextChapter = string.Empty; //LoadCompleted(CurrentBook.BookLastChapterAddress); return(CurrentBook.BookLastChapterAddress); }catch (ArgumentOutOfRangeException aoore) { this.Loop = false; return(null); } catch (NullReferenceException nre) { return(null); } }
public Models.Book SvcBooktoBook(ReaderService.Book b) { Models.Book val = new Models.Book(); val.BookID = b.BookID; val.BookIndexAddress = b.BookIndexAddress; val.BookName = b.BookName; val.Chapters = ConvertChapters(b.Chapters); val.NextChapterAddress = b.NextChapterAddress; val.PreviousChapterAddress = b.PreviousChapterAddress; val.SourceID = b.SourceID; return(val); }
public WebsiteList() { //Models.Book bk = new Models.Book() { BookID = 120, BookIndexAddress = "http://moonbunnycafe.com/purple-river/", BookLastChapterAddress = "http://moonbunnycafe.com/purple-river/purple-river-chapter-01-part-01/", BookName = "Purple River", SourceID = 5 }; //Models.Book bk = new Models.Book() { BookID = 114, BookIndexAddress = "http://moonbunnycafe.com/my-disciple-died-yet-again/", BookLastChapterAddress = "http://moonbunnycafe.com/my-disciple-died-yet-again/disciple-chapter-149/", BookName = "My Disciple Died Yet Again", SourceID = 5 }; //Models.Book bk = new Models.Book() { BookID = 70, BookIndexAddress = "http://www.translationnations.com/translations/swallowed-star/", BookLastChapterAddress = "http://www.translationnations.com/?p=2867/", BookName = "SWALLOWED STAR", SourceID = 4 }; //Models.Book bk = new Models.Book() { BookID = 96, BookIndexAddress = "http://moonbunnycafe.com/happy-peach/", BookLastChapterAddress = "http://moonbunnycafe.com/happy-peach/hp-ch1/", BookName = "Happy Peach (18+)", SourceID = 5 }; //Models.Book bk = new Models.Book() { BookID = 140, BookIndexAddress = "http://www.novelsaga.com/martial-god-space-index/", BookLastChapterAddress = "http://www.novelsaga.com/319-2/", BookName = "Martial God Space", SourceID = 8 }; //Models.Book bk = new Models.Book() { BookID = 89, BookIndexAddress = "http://moonbunnycafe.com/dragons-bloodline/", BookLastChapterAddress = "http://moonbunnycafe.com/dragons-bloodline/db-ch78/", BookName = "Dragon’s Bloodline", SourceID = 5 }; //Models.Book bk = new Models.Book() { BookID = 93, BookIndexAddress = "http://moonbunnycafe.com/genius-doctor-black-belly-miss/", BookLastChapterAddress = "http://moonbunnycafe.com/genius-doctor-black-belly-miss/gdbbm-chapter-469/", BookName = "Genius Doctor : Black Belly Miss", SourceID = 5 }; //Models.Book bk = new Models.Book() { BookID = 47, BookIndexAddress = "http://gravitytales.com/novel/true-martial-world", BookLastChapterAddress = "http://gravitytales.com/novel/true-martial-world/tmw-chapter-748", BookName = "True Martial World ", SourceID = 3 }; //Models.Book bk = new Models.Book() { BookID = 54, BookIndexAddress = "http://gravitytales.com/novel/martial-world", BookLastChapterAddress = "http://gravitytales.com/novel/martial-world/mw-chapter-538", BookName = "Martial World ", SourceID = 3 }; //Models.Book bk = new Models.Book() { BookID = 46, BookIndexAddress = "http://gravitytales.com/novel/the-nine-cauldrons", BookLastChapterAddress = "http://gravitytales.com/novel/the-nine-cauldrons/tnc-chapter-284", BookName = "The Nine Cauldrons", SourceID = 3 }; //Models.Book bk = new Models.Book() { BookID = 62, BookIndexAddress = "http://gravitytales.com/novel/blue-phoenix", BookLastChapterAddress = "http://gravitytales.com/novel/blue-phoenix/bp-chapter-448", BookName = "Blue Phoenix", SourceID = 3 }; //Models.Book bk = new Models.Book() { BookID = 139, BookIndexAddress = "https://walkthejianghu.com/ttnh-index/", BookLastChapterAddress = "https://walkthejianghu.com/chapter-220/", BookName = "Transcending The Nine Heavens", SourceID = 6 }; //Models.Book bk = new Models.Book() { BookID = 20, BookIndexAddress = "http://www.wuxiaworld.com/usaw-index/", BookLastChapterAddress = "http://www.wuxiaworld.com/usaw-index/usaw-book-2-chapter-132/", BookName = "Upgrade Specialist In Another World", SourceID = 1 }; //Models.Book bk = new Models.Book() { BookID = 151, BookIndexAddress = "https://bluesilvertranslations.wordpress.com/chapter-list/", BookLastChapterAddress = "https://bluesilvertranslations.wordpress.com/2014/12/10/001-douluo-continent-otherworldly-tang-san/", BookName = "Douluo Dalu", SourceID = 9 }; //Models.Book bk = new Models.Book() { BookID = 152, BookIndexAddress = "http://volaretranslations.com/age-of-lazurite-tower-of-glass/", BookLastChapterAddress = "http://volaretranslations.com/age-of-lazurite-tower-of-glass/altg-prologue/", BookName = "Age of Lazurite, Tower of Glass", SourceID = 10 }; //Models.Book bk = new Models.Book() { BookID = 153, BookIndexAddress = "http://www.radianttranslations.com/battle-frenzy/", BookLastChapterAddress = "http://www.radianttranslations.com/battle-frenzy/bf-chapter-5/", BookName = "Battle Frenzy", SourceID = 11 }; //Models.Book bk = new Models.Book() { BookID = 71, BookIndexAddress = "http://www.translationnations.com/translations/limitless-sword-god/", BookLastChapterAddress = "http://www.translationnations.com/translations/limitless-sword-god/lsg-chapter-0090/", BookName = "Limitless Sword God", SourceID = 4 }; Models.Book bk = new Models.Book() { BookID = 3, BookIndexAddress = "http://www.wuxiaworld.com/issth-index/", BookLastChapterAddress = "http://www.wuxiaworld.com/issth-index/issth-book-10-chapter-1600/", BookName = "I Shall Seal The Heavens", SourceID = 1 }; BookList = new List <Models.Book>(); BookList.Add(bk); return; BookList = new List <Models.Book>(); Books = new List <Models.Book>(); Sources = GenerateIndex(); List <Models.Book> val = new List <Models.Book>(); foreach (Models.Book b in this.Books) { if (b.SourceID >= 1 && b.SourceID <= 8 || b.SourceID > 9 && b.SourceID <= 11 /*b.SourceID == 5*/) { val.Add(b); } } //BookList = this.Books; BookList = val; }
public void loadPages(Models.Book s) { bool val = sf.isSafePull(); if (!val) { while (!val) { val = sf.isSafePull(); } //break; } if (s.BookLastChapterAddress != null) { this.CurrentBook = s; } }
private List <Models.Chapter> GetChapters(Models.Book book) { List <Models.Chapter> s = new List <Models.Chapter>(); List <ReaderService.Chapter> tmp = new List <ReaderService.Chapter>(); using (ReaderServiceSoapClient svc = new ReaderServiceSoapClient()) { tmp.AddRange(svc.getChapterslstByBook(ProgramStatics.Token, BooktoSvcBook(book))); } //svcClosed(); foreach (ReaderService.Chapter b in tmp) { if (b.BookID == book.BookID) { s.Add(SvcChaptertoChapter(b)); } } return(s); }