public Download(BookInfo book, string path) { _book = book; ThreadCount = 5; _lockthis = new object(); DownloadPath = path; _imagepath = Path.Combine(DownloadPath, book.Title); Directory.CreateDirectory(_imagepath); MaxTryingTimesWhenFailed = 10; PDFFilePath = Path.Combine(DownloadPath, _book.Title + PDFType); _bodypagesinfo = new BodyPagesInfo[ThreadCount - 1]; for (int i = 0; i < ThreadCount - 1; i++) { _bodypagesinfo[i] = new BodyPagesInfo(); } _frontpagesinfo = new FrontPagesInfo(); Status = TaskStatus.Preparing; }
public Download(BookInfo book, string path) { _book = book; ThreadCount = 5; _lockthis = new object(); DownloadPath = path; _imagepath = Path.Combine(DownloadPath, book.Title); Directory.CreateDirectory(_imagepath); MaxTryingTimesWhenFailed = 10; PDFFilePath = Path.Combine(DownloadPath, _book.Title + PDFType); _bodypagesinfo = new BodyPagesInfo[ThreadCount - 1]; for (int i = 0; i < ThreadCount - 1; i++) _bodypagesinfo[i] = new BodyPagesInfo(); _frontpagesinfo = new FrontPagesInfo(); Status = TaskStatus.Preparing; }