public static SelectChildImgAndBackgroundImageElements ( |
||
element | ||
return |
/// <summary> /// We mirror several metadata tags in the html for quick access by the UI. /// This method makes sure they are all up to date. /// </summary> /// <param name="progress"> </param> public static void UpdateAllHtmlDataAttributesForAllImgElements(string folderPath, HtmlDom dom, IProgress progress) { //Update the html attributes which echo some of it, and is used by javascript to overlay displays related to //whether the info is there or missing or whatever. var imgElements = HtmlDom.SelectChildImgAndBackgroundImageElements(dom.RawDom.DocumentElement); int completed = 0; foreach (XmlElement img in imgElements) { progress.ProgressIndicator.PercentCompleted = (int)(100.0 * (float)completed / (float)imgElements.Count); UpdateImgMetdataAttributesToMatchImage(folderPath, img, progress); completed++; } }