/// <summary>
 /// Create one IHTMLItem element, according to HTML element name passed
 /// </summary>
 /// <param name="elementName">name of the element to create</param>
 /// <param name="standardType"></param>
 /// <returns>IHTMLItem element</returns>
 public IHTMLItem CreateHTMLItem(string elementName, HTMLElementType standardType)
 {
     if (_elementsMap.ContainsKey(elementName))
     {
         Object theObj = Activator.CreateInstance(_elementsMap[elementName],standardType);
         var item = theObj as IHTMLItem;
         return item;
     }
     throw new ArgumentException(string.Format("Invalid element name {0} passed",elementName), "elementName");
 }
Exemple #2
0
 /// <summary>
 /// Checks if passed standard  is valid 
 /// we need this as HTMLElementType is enumeration of [Flags] type and here we need only single value, not bitmask
 /// </summary>
 /// <param name="standardType">standard to create element according to</param>
 /// <returns>if this is valid standard</returns>
 public static bool CheckIfValidStandardArgument(HTMLElementType standardType)
 {
     if (standardType == HTMLElementType.FrameSet ||
         standardType == HTMLElementType.HTML5  ||
         standardType == HTMLElementType.Strict ||
         standardType == HTMLElementType.Transitional ||
         standardType == HTMLElementType.XHTML11 ||
         standardType == HTMLElementType.XHTML5 )
     {
         return true;
     }
     return false;
 }
Exemple #3
0
        private XDocumentType GetDocumentType(HTMLElementType documentStandard)
        {
            switch (documentStandard)
            {
                case HTMLElementType.FrameSet:
                    return new XDocumentType("html", @"-//W3C//DTD XHTML 1.0 Frameset//EN",
                                             @"DTD/xhtml1-frameset.dtd", null);
                case HTMLElementType.Strict:
                    return new XDocumentType("html", @"-//W3C//DTD XHTML 1.0 Strict//EN",
                                             @"DTD/xhtml1-strict.dtd", null);
                case HTMLElementType.Transitional:
                    return new XDocumentType("html", @"-//W3C//DTD XHTML 1.0 Transitional//EN",
                                             @"DTD/xhtml1-transitional.dtd", null);
                case HTMLElementType.XHTML11:
                case HTMLElementType.XHTML5:
                    return new XDocumentType("html", @"-//W3C//DTD XHTML 1.1//EN",
                                            @"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd", null);
                case HTMLElementType.HTML5:
                    return new XDocumentType("html", null, null, null);

            }
            throw new NotImplementedException(string.Format("The case of {0} not implemented yet", documentStandard));
        }
Exemple #4
0
 protected HTMLItem(HTMLElementType htmlStandard)
 {
     _htmlStandard = htmlStandard;
     RegisterAttributes();
 }
Exemple #5
0
 public HTMLDocument(HTMLElementType standard)
 {
     _documentStandard = standard;
     _htmlRoot = new HTML(standard);
 }
Exemple #6
0
 public CodeText(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #7
0
 public ListItem(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #8
0
 public Applet(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #9
0
 public Input(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #10
0
 public Frameset(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #11
0
 public TextArea(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #12
0
 public Teletext(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
 public BiDirectionalOverride(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #14
0
 public Definition(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #15
0
 public TableHeaderCell(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #16
0
 public ShortQuote(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #17
0
 public Area(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #18
0
 public Track(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #19
0
 public Frameset(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #20
0
 public Summary(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #21
0
 public SimpleHTML5Text(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #22
0
 public TableFooter(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #23
0
 public DefinitionList(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #24
0
 protected TextBasedElement(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #25
0
 public Canvas(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #26
0
 public EmptyLine(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #27
0
 public Anchor(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #28
0
 public Underlined(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #29
0
 public Track(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
 public InlineFrame(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #31
0
 public Abbreviation(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
 public BiDirectionalOverride(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #33
0
 public BoldText(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #34
0
 public MenuItem(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
 public BlockQuoteElement(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #36
0
 public Select(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
 public HorizontalRuler(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #38
0
 public Style(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #39
0
 public Address(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #40
0
 public Label(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #41
0
 public Title(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
     TextContent = new SimpleHTML5Text(htmlStandard);
 }
Exemple #42
0
 public InsertedText(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #43
0
 public Acronym(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #44
0
 public Map(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #45
0
 public Abbreviation(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #46
0
 public Source(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
 public DirectoryList(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #48
0
 public Dialog(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #49
0
 public Paragraph(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #50
0
 public Form(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #51
0
 public TableHead(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #52
0
 public EmphasisedText(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #53
0
 public OptionGroup(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #54
0
 public Progress(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
 public TableCaption(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #56
0
 public ObjectElm(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #57
0
 public Center(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #58
0
 public ListItem(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Exemple #59
0
 public Base(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Exemple #60
0
 public OptionGroup(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }