/// <summary> /// 恢复原始原来状态 /// </summary> public virtual void Restore() { try { if (selectorElement != null) { selectorElement.RestoreOriginalAttribute(); } selectorElement = null; } catch (Exception) { } }
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); } }
public virtual void BeforeHighlight(CssElement element) { }
public override void BeforeHighlight(CssElement element) { element.OutlineColor = "#0082ff"; }