private void GalleryDownloader_GalleryDownloadCompleted(object sender, GalleryDownloadCompletedEventArgs e) { if (string.IsNullOrEmpty(WebBrowser.DocumentText)) { return; } DocumentTemplate <Metadata> documentTemplate; if (DetailsModel.Target == DetailsTarget.Download) { documentTemplate = DownloadTemplate; } else { documentTemplate = DetailsTemplate; } WebBrowser.Tag = e.Metadata.Id; WebBrowser.DocumentText = documentTemplate.GetFormattedText(e.Metadata); SearchResultCache.CacheRuntimeMetadata(e.Metadata); WebBrowser.Document?.InvokeScript("__onGalleryDownloadCompleted", e.ToObjectArray()); }
private void Job_GalleryDownloadCompleted(object sender, GalleryDownloadCompletedEventArgs e) { GalleryDownloadCompleted.Invoke(sender, e); }
protected virtual void OnGalleryDownloadCompleted(GalleryDownloadCompletedEventArgs e) { GalleryDownloadCompleted.Invoke(this, e); }