private void getImagesThreadMethod() { ThumbInfo li = null; lock (_logImagesToGrab) { if (_logImagesToGrab.Count > 0) { li = _logImagesToGrab[0]; _logImagesToGrab.RemoveAt(0); } } using (System.Net.WebClient wc = new System.Net.WebClient()) { string fnp = System.IO.Path.Combine(Core.PluginDataPath, "LogImageCache", "Thumbs"); while (li != null) { try { string fn = System.IO.Path.Combine(fnp, System.IO.Path.GetFileName(li.LogImage.Url)); if (!System.IO.File.Exists(fn)) { wc.DownloadFile(li.LogImage.Url.Replace("/log/", "/log/thumb/"), fn); } li.ImageFileLocation = fn; lock (_logImagesToGrabbed) { _logImagesToGrabbed.Add(li); } } catch { } li = null; lock (_logImagesToGrab) { if (_logImagesToGrab.Count > 0) { li = _logImagesToGrab[0]; _logImagesToGrab.RemoveAt(0); } } } } }
public ThumbInfoItem(ThumbInfo imgInfo, Framework.Interfaces.ICore core) { InitializeComponent(); _imgInfo = imgInfo; _core = core; }