Esempio n. 1
0
        private void MainWindow_Ready()
        {
            if (ProgramStatics.NextBook)
            {
                ProgramStatics.NextBook = false;
                index++;
                helper.Navigate += Helper_Navigate;

                Logging.Logging.LogMessage("", Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\Logs", "BookScraper_NextBook",
                                           " BookID" + this.helper.CurrentBook.BookID + "\r\n\r\n Book Next Chapter Address" + this.helper.CurrentBook.NextChapterAddress + "\r\n\r\n Book Previous Chapter Address: " +
                                           this.helper.CurrentBook.PreviousChapterAddress + "\r\n\r\n Book LastChapterAddress: " + this.helper.CurrentBook.BookLastChapterAddress + "\r\n\r\n Book SourceID: " + this.helper.CurrentBook.SourceID +
                                           "\r\n\r\n Chapter: " + this.helper.Chapter);

                helper.loadPages(wb.BookList[index]);
                //ProgramStatics.NextBook = false;
            }
            else
            {
                string s = helper.Chapter;
                Uri    u = new Uri(s);
                helper.wbURL = helper.Chapter.Clone() as string;
                //ProgramStatics.ChapterAddress = u;

                Logging.Logging.LogMessage("", Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\Logs", "BookScraper_NextChapter",
                                           " BookID" + this.helper.CurrentBook.BookID + "\r\n\r\n Book Next Chapter Address" + this.helper.CurrentBook.NextChapterAddress + "\r\n\r\n Book Previous Chapter Address: " +
                                           this.helper.CurrentBook.PreviousChapterAddress + "\r\n\r\n Book LastChapterAddress: " + this.helper.CurrentBook.BookLastChapterAddress + "\r\n\r\n Book SourceID: " + this.helper.CurrentBook.SourceID +
                                           "\r\n\r\n Chapter: " + this.helper.Chapter);

                this.wbBrowser.Navigate(u);
                this.IsReady = false;
            }
        }
Esempio n. 2
0
        private void btnStart_Click(object sender, RoutedEventArgs e)
        {
            this.Ready += MainWindow_Ready;

            helper           = new MainHelper();
            helper.Navigate += Helper_Navigate;
            helper.loadPages(wb.BookList[index]);
            ProgramStatics.ChapterAddress = wb.BookList[index].BookAddress;
        }
Esempio n. 3
0
        private void btnStart_Click(object sender, RoutedEventArgs e)
        {
            this.Ready += MainWindow_Ready;

            helper           = new MainHelper();
            helper.Navigate += Helper_Navigate;
            helper.loadPages(wb.BookList[index]);

            Logging.Logging.LogMessage("", Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\Logs", "BookScraper_LoopStart",
                                       " BookID" + this.helper.CurrentBook.BookID + "\r\n\r\n Book Next Chapter Address" + this.helper.CurrentBook.NextChapterAddress + "\r\n\r\n Book Previous Chapter Address: " +
                                       this.helper.CurrentBook.PreviousChapterAddress + "\r\n\r\n Book LastChapterAddress: " + this.helper.CurrentBook.BookLastChapterAddress + "\r\n\r\n Book SourceID: " + this.helper.CurrentBook.SourceID +
                                       "\r\n\r\n Chapter: " + this.helper.Chapter);
        }
Esempio n. 4
0
 private void MainWindow_Ready()
 {
     if (ProgramStatics.NextBook)
     {
         Thread.Sleep(10000);
         ProgramStatics.NextBook = false;
         index++;
         helper.Navigate += Helper_Navigate;
         helper.loadPages(wb.BookList[index]);
         //ProgramStatics.NextBook = false;
     }
     else
     {
         string s = helper.Chapter;
         Uri    u = new Uri(s);
         helper.wbURL = helper.Chapter.Clone() as string;
         this.wbBrowser.Navigate(u);
         this.IsReady = false;
     }
 }