public CssElement(IHTMLElement element, CssStyle style) : this(element) { if (style != null) { if (!string.IsNullOrEmpty(style.OutlineStyle)) { OutlineStyle = style.OutlineStyle; } if (!string.IsNullOrEmpty(style.OutlineColor)) { OutlineColor = style.OutlineColor; } if (!string.IsNullOrEmpty(style.OutlineWidth)) { OutlineWidth = style.OutlineWidth; } if (!string.IsNullOrEmpty(style.BackgroundColor)) { BackgroundColor = style.BackgroundColor; } } }
public virtual void Highlight(IHTMLElement element, CssStyle style) { if (element == null) { return; } if (selectorElement != null && element == selectorElement.HTMLElement) { return; } try { selectorElement = new CssElement(element, style); BeforeHighlight(selectorElement); selectorElement.SaveOriginalAttribute(); selectorElement.ChangeElementAttribute(); } catch (Exception ex) { logger.Fatal(ex); } }