static public int GetPageCount(IPicElement pe) { WebClient wc = new WebClient(); wc.Encoding = Encoding.UTF8; wc.DownloadStringCompleted += wc_dasil; return(HitomiGalleryInfo.GetImageLink(wc.DownloadString(new Uri(HitomiDef.HitomiGalleryAddress + pe.Article.Magic + ".js"))).Count); }
public frmGalleryInfo(Form closed, IPicElement pic) { InitializeComponent(); this.pic = pic; closed_form = closed; id = pic.Article.Magic; CloseOnRBtn = new RightClickCloser(this); }
static public void DownloadAndSetImageLink(IPicElement pe, CallBack callback) { WebClient wc = new WebClient(); wc.Encoding = Encoding.UTF8; wc.DownloadStringCompleted += wc_dasil; wc.DownloadStringAsync(new Uri(HitomiDef.HitomiGalleryAddress + pe.Article.Magic + ".js"), new Tuple <IPicElement, CallBack>(pe, callback)); }
private void ImageLinkCallback(IPicElement pe) { download_queue = new HitomiQueue(Notify, Notify_Size, Notify_Status, Notify_Retry); PBMaxSize(pe.Article.ImagesLink.Count); for (int i = 0; i < pe.Article.ImagesLink.Count; i++) { string temp = Path.GetTempFileName(); download_queue.Add(HitomiDef.GetDownloadImageAddress(pe.Article.Magic, pe.Article.ImagesLink[i]), temp, i); } }
private void ImageLinkCallback(IPicElement pe) { download_queue = new HitomiQueue(Notify, Notify_Size, Notify_Status, Notify_Retry); int max = pe.Article.ImagesLink.Count; if (HitomiSetting.Instance.GetModel().LoadPreviewMaximum < max) { max = HitomiSetting.Instance.GetModel().LoadPreviewMaximum; } PBMaxSize(max); for (int i = 0; i < max; i++) { string temp = Path.GetTempFileName(); download_queue.Add(HitomiDef.GetDownloadImageAddress(pe.Article.Magic, pe.Article.ImagesLink[i]), temp, i); } }