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