Example #1
0
        public MainWindow()
        {
            InitializeComponent();
            sf = new SafeToPull();
            dynamic activeX = this.wbBrowser.GetType().InvokeMember("ActiveXInstance",
                                                                    BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                                                    null, this.wbBrowser, new object[] { });

            activeX.Silent = true;

            wb    = new WebsiteList();
            index = 0;
            //ProgramStatics.NextBookEvent += ProgramStatics_NextBookEvent;

            //this.Ready += MainWindow_Ready;

            //helper = new MainHelper();
            //helper.Navigate += Helper_Navigate;
            //helper.loadPages();

            //tr = new Thread(helper.loadPages);
            //tr.Start();

            //this.CurrentBook = new Books();
            this.Document = new HtmlDocument();



            //Document = new HtmlDocument();
            //Document.Load(@"C:\Users\jd\Desktop\WuxiaHome.html");
            //WebScraper.StartScrape scrape = new WebScraper.StartScrape(WebScraper.PageTypes.WuxiaIndex,this.Document);

            //Document = new HtmlDocument();
            //Document.Load(@"C:\Users\jd\Desktop\CoilingDragon2.html");
            //Document.Load(@"C:\Users\jd\Desktop\CoilingDragon.html");
            //Document.Load(@"C:\Users\jd\Desktop\MGA245.html");
            //WebScraper.StartScrape scrape1 = new WebScraper.StartScrape(WebScraper.PageTypes.WuxiaBook, this.Document);

            //loadPages();
        }
Example #2
0
        public void loadPages()
        {
            WebsiteList lst = new WebsiteList();

            foreach (Books s in lst.BookList)
            {
                bool val = sf.isSafePull();
                if (!val)
                {
                    while (!val)
                    {
                        val = sf.isSafePull();
                    }
                    //break;
                }
                if (s.BookAddress != null)
                {
                    this.CurrentBook = s;

                    manageDownload();
                    //tStart();
                }
            }
        }