public BaseDownloadImagesText(string indexUri, string saveToRoot, string novelTitle,
                                      bool UpdateMode, int MaxPages, string httpMainHost, string httpImageHost)
        {
            novelTitle = FileDownloadUtil.GetInvalidPath(novelTitle);
            saveToRoot = FileDownloadUtil.GetInvalidPath(saveToRoot);

            mUpdateMode = UpdateMode;
            mNovelTitle = novelTitle;

            mIndexUri = FileDownloadUtil.GetCorrectCurrentUrl(indexUri);

            mSaveToRoot      = string.Format("{0}\\{1}", saveToRoot, novelTitle);
            mSaveToImageRoot = string.Format("{0}\\Images", mSaveToRoot);

            mNovelRoot = mSaveToRoot;
            mMaxPages  = MaxPages;

            htmlIndexTemplate = string.Format("{0}\\HTTPTemplateIndex.html", AppDomain.CurrentDomain.BaseDirectory);
            htmlPageTemplate  = string.Format("{0}\\HTMLTemplatePages.html", AppDomain.CurrentDomain.BaseDirectory);
            novelJS           = string.Format("{0}\\novel.js", AppDomain.CurrentDomain.BaseDirectory);

            HttpMainHost = httpMainHost;

            HttpImageHost = httpImageHost;

            CurrentUrl = FileDownloadUtil.GetCorrectCurrentUrl(FileDownloadUtil.CombindCorrectUrl(HttpMainHost, indexUri));
        }
예제 #2
0
 private void ApplyUrl()
 {
     this.LinkLabelToNovel.Text = DownloadConfig.Protocol + "://" + FileDownloadUtil.CombindCorrectUrl(this.CBHost.Text, tbUrl.Text);
 }