Пример #1
0
 /// <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");
 }
Пример #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;
 }
Пример #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));
        }
Пример #4
0
 protected HTMLItem(HTMLElementType htmlStandard)
 {
     _htmlStandard = htmlStandard;
     RegisterAttributes();
 }
Пример #5
0
 public HTMLDocument(HTMLElementType standard)
 {
     _documentStandard = standard;
     _htmlRoot = new HTML(standard);
 }
Пример #6
0
 public CodeText(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #7
0
 public ListItem(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #8
0
 public Applet(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #9
0
 public Input(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #10
0
 public Frameset(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #11
0
 public TextArea(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #12
0
 public Teletext(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #13
0
 public BiDirectionalOverride(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #14
0
 public Definition(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #15
0
 public TableHeaderCell(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #16
0
 public ShortQuote(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #17
0
 public Area(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #18
0
 public Track(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #19
0
 public Frameset(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #20
0
 public Summary(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #21
0
 public SimpleHTML5Text(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #22
0
 public TableFooter(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #23
0
 public DefinitionList(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #24
0
 protected TextBasedElement(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #25
0
 public Canvas(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #26
0
 public EmptyLine(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #27
0
 public Anchor(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #28
0
 public Underlined(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #29
0
 public Track(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #30
0
 public InlineFrame(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #31
0
 public Abbreviation(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #32
0
 public BiDirectionalOverride(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #33
0
 public BoldText(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #34
0
 public MenuItem(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #35
0
 public BlockQuoteElement(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #36
0
 public Select(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #37
0
 public HorizontalRuler(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #38
0
 public Style(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #39
0
 public Address(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #40
0
 public Label(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #41
0
 public Title(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
     TextContent = new SimpleHTML5Text(htmlStandard);
 }
Пример #42
0
 public InsertedText(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #43
0
 public Acronym(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #44
0
 public Map(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #45
0
 public Abbreviation(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #46
0
 public Source(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #47
0
 public DirectoryList(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #48
0
 public Dialog(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #49
0
 public Paragraph(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #50
0
 public Form(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #51
0
 public TableHead(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #52
0
 public EmphasisedText(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #53
0
 public OptionGroup(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #54
0
 public Progress(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #55
0
 public TableCaption(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #56
0
 public ObjectElm(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #57
0
 public Center(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #58
0
 public ListItem(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }
Пример #59
0
 public Base(HTMLElementType htmlStandard)
     : base(htmlStandard)
 {
 }
Пример #60
0
 public OptionGroup(HTMLElementType htmlStandard) : base(htmlStandard)
 {
 }