Beispiel #1
0
 public HtmlElementCollection(Interface.IHtmlContainerControl container, bool isReadOnly)
 {
     if (container == null)
     {
         throw new ArgumentNullException("htmlElement", "Must set a container for the collection");
     }
     this.Container = container;
     this.ReadOnly  = isReadOnly;
     this.elements  = new List <Interface.IHtmlElement>();
 }
Beispiel #2
0
 private bool CheckLoop(Interface.IHtmlContainerControl container, Interface.IHtmlElement element)
 {
     if (container == null)
     {
         return(true);
     }
     if (object.ReferenceEquals(container, element))
     {
         return(false);
     }
     if (container.Parent == null)
     {
         return(true);
     }
     if (container.Parent is Interface.IHtmlContainerControl)
     {
         return(this.CheckLoop(container.Parent as Interface.IHtmlContainerControl, element));
     }
     return(true);
 }
Beispiel #3
0
 public HtmlElementCollection(Interface.IHtmlContainerControl container) : this(container, false)
 {
 }