Ejemplo n.º 1
0
 private void olvElementIdentifiers_CellClick(object sender, BrightIdeasSoftware.CellClickEventArgs e)
 {
     if (e.ClickCount == 2)
     {
         ElementIdentifier  elementIdentifier = (ElementIdentifier)e.Model;
         WebBrowserHelper   wb       = new WebBrowserHelper(webBrowser1, TimeSpan.FromSeconds(15));
         List <HtmlElement> elements = wb.FindElements(elementIdentifier);
         foreach (HtmlElement element in elements)
         {
             if (!m_Selector.SelectedElements.Contains(element))
             {
                 m_Selector.SelectElement(element);
             }
         }
     }
 }
Ejemplo n.º 2
0
        private void zShowPatternElement(HtmlElement patternElement, bool isPattern)
        {
            if (patternElement != null)
            {
                if (!m_PreviewSelector.SelectedElements.Contains(patternElement))
                {
                    m_PreviewSelector.SelectElement(patternElement,
                                                    System.Web.UI.WebControls.BorderStyle.Dashed,
                                                    isPattern ? Color.Green : Color.Blue);
                }

                if (!m_Scrolled)
                {
                    patternElement.ScrollIntoView(true);
                    m_Scrolled = true;
                }
            }
        }