Ejemplo n.º 1
0
 public MainHelper()
 {
     this.Ready      += MainHelper_Ready;
     sf               = new SafeToPull();
     this.CurrentBook = new Models.Book();
     this.Document    = new HtmlDocument();
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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;

                manageDownload();
                //tStart();
            }
        }
Ejemplo n.º 5
0
        public void loadPages()
        {
            WebsiteList lst = new WebsiteList();

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

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