Beispiel #1
0
        public DownloadBrowserView(DetailsModel detailsModel, DocumentTemplate <Metadata> downloadTemplate, PageDownloader pageDownloader, Configuration.ConfigDetailsBrowserView downloadBrowserSettings)
        {
            InitializeComponent();

            DetailsModel            = detailsModel;
            DownloadTemplate        = downloadTemplate;
            PageDownloader          = pageDownloader;
            DownloadBrowserSettings = downloadBrowserSettings;

            webBrowser = new WebBrowserEx();

            SuspendLayout();

            webBrowser.AllowWebBrowserDrop = false;
            webBrowser.Dock = DockStyle.Fill;
            webBrowser.Name = "downloadWwebBrowser";
            webBrowser.BeforeDocumentCompleted += WebBrowser_BeforeDocumentCompleted;

            PageDownloader.PageDownloadReportProgress += PageDownloader_PageDownloadReportProgress;
            PageDownloader.PagesDownloadStarted       += PageDownloader_PagesDownloadStarted;
            PageDownloader.PagesDownloadCancelled     += PageDownloader_PagesDownloadCancelled;
            PageDownloader.PagesDownloadCompleted     += PageDownloader_PagesDownloadCompleted;

            DetailsModel.MetadataChanged += DetailsModel_MetadataChanged;

            Controls.Add(webBrowser);

            ResumeLayout(false);
        }
Beispiel #2
0
        public DetailsBrowserView(DetailsBrowserFilter detailsBrowserFilter, DetailsModel detailsModel, DocumentTemplate <Metadata> detailsTemplate, DocumentTemplate <Metadata> downloadTemplate, DocumentTemplate <Metadata> detailsPreloadTemplate
                                  , GalleryDownloader galleryDownloader
                                  , PageDownloader pageDownloader
                                  , CoverDownloader coverDownloader
                                  , MetadataKeywordLists metadataKeywordLists
                                  , Configuration.ConfigDetailsBrowserView detailsBrowserSettings
                                  , ISearchResultCache searchResultCache
                                  , ICacheFileSystem cacheFileSystem)
        {
            InitializeComponent();

            DetailsBrowserFilter   = detailsBrowserFilter;
            DetailsModel           = detailsModel;
            DetailsTemplate        = detailsTemplate;
            DownloadTemplate       = downloadTemplate;
            DetailsPreloadTemplate = detailsPreloadTemplate;
            GalleryDownloader      = galleryDownloader;
            PageDownloader         = pageDownloader;
            CoverDownloader        = coverDownloader;
            MetadataKeywordLists   = metadataKeywordLists;
            DetailsBrowserSettings = detailsBrowserSettings;
            SearchResultCache      = searchResultCache;
            CacheFileSystem        = cacheFileSystem;

            webBrowser = new WebBrowserEx();

            SuspendLayout();

            webBrowser.AllowWebBrowserDrop = false;
            webBrowser.Dock = DockStyle.Fill;
            webBrowser.Name = "detailsWwebBrowser";
            webBrowser.BeforeDocumentCompleted += WebBrowser_BeforeDocumentCompleted;
            webBrowser.DocumentCompleted       += WebBrowser_DocumentCompleted;

            GalleryDownloader.GalleryDownloadReportProgress += GalleryDownloader_GalleryDownloadReportProgress;
            GalleryDownloader.GalleryDownloadStarted        += GalleryDownloader_GalleryDownloadStarted;
            GalleryDownloader.GalleryDownloadCancelled      += GalleryDownloader_GalleryDownloadCancelled;
            GalleryDownloader.GalleryDownloadCompleted      += GalleryDownloader_GalleryDownloadCompleted;

            PageDownloader.PageDownloadReportProgress += PageDownloader_PageDownloadReportProgress;
            PageDownloader.PagesDownloadStarted       += PageDownloader_PagesDownloadStarted;
            PageDownloader.PagesDownloadCancelled     += PageDownloader_PagesDownloadCancelled;
            PageDownloader.PagesDownloadCompleted     += PageDownloader_PagesDownloadCompleted;

            CoverDownloader.CoverDownloadReportProgress += CoverDownloader_CoverDownloadReportProgress;
            CoverDownloader.CoversDownloadStarted       += CoverDownloader_CoversDownloadStarted;
            CoverDownloader.CoversDownloadCancelled     += CoverDownloader_CoversDownloadCancelled;
            CoverDownloader.CoversDownloadCompleted     += CoverDownloader_CoversDownloadCompleted;

            MetadataKeywordLists.WhitelistChanged  += Form_WhiteListChanged;
            MetadataKeywordLists.BlacklistChanged  += Form_BlackListChanged;
            MetadataKeywordLists.IgnorelistChanged += Form_IgnoreListChanged;
            MetadataKeywordLists.HidelistChanged   += Form_HideListChanged;

            DetailsModel.MetadataChanged += DetailsModel_MetadataChanged;

            Controls.Add(webBrowser);

            ResumeLayout(false);
        }