Esempio n. 1
0
 protected override bool IsSelectableElement(Element element)
 {
     if (element == null)
     {
         return false;
     }
     if (((WebFormsEditor) base.Editor).EditorMode == WebFormsEditorMode.Template)
     {
         if (element is DivElement)
         {
             element = element.GetParent();
         }
         if ((element is SpanElement) && (element.GetParent() is BodyElement))
         {
             return false;
         }
     }
     return base.IsSelectableElement(element);
 }
Esempio n. 2
0
 public static Element GetWrapper(Interop.IHTMLElement element, HtmlControl owner)
 {
     Type type;
     Element element2;
     string str = element.GetTagName().ToLower();
     if (!str.Equals("input"))
     {
         type = (Type) wrapperTable[str];
     }
     else
     {
         object[] pvars = new object[1];
         element.GetAttribute("type", 1, pvars);
         string str2 = pvars[0].ToString().ToLower();
         if (str2.Equals("button"))
         {
             type = (Type) wrapperTable["inputbutton"];
         }
         else
         {
             type = (Type) wrapperTable[str2];
         }
     }
     if (type != null)
     {
         element2 = (Element) type.GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(Interop.IHTMLElement) }, null).Invoke(new object[] { element });
     }
     else
     {
         element2 = new Element(element);
     }
     element2.Owner = owner;
     return element2;
 }
Esempio n. 3
0
 protected internal virtual Element GetContentElement(Element bodyElement)
 {
     return bodyElement;
 }
Esempio n. 4
0
 protected internal override Element GetContentElement(Element bodyElement)
 {
     if (this.EditorMode == WebFormsEditorMode.Template)
     {
         Element child = bodyElement.GetChild(0);
         if ((child != null) && (child is SpanElement))
         {
             Element element2 = child.GetChild(0);
             if ((element2 != null) && (element2 is DivElement))
             {
                 return element2;
             }
         }
     }
     return base.GetContentElement(bodyElement);
 }
Esempio n. 5
0
 protected virtual bool IsSelectableElement(Element element)
 {
     if (!this._editor.IsFullDocumentMode)
     {
         return (element.TagName.ToLower() != "body");
     }
     return true;
 }