当前位置: 首页>>代码示例>>C#>>正文


C# IHtmlNode类代码示例

本文整理汇总了C#中IHtmlNode的典型用法代码示例。如果您正苦于以下问题:C# IHtmlNode类的具体用法?C# IHtmlNode怎么用?C# IHtmlNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IHtmlNode类属于命名空间,在下文中一共展示了IHtmlNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HtmlRange

        public HtmlRange( IHtmlNode node1, IHtmlNode node2, bool inclusiveNode1, bool inclusiveNode2 )
        {
            if ( node1 == null )
            throw new ArgumentNullException( "node1" );

              if ( node2 == null )
            throw new ArgumentNullException( "node2" );

              container = node1.Container;

              if ( container == null || !container.Equals( node2.Container ) || node1.Equals( node2 ) )
            throw new InvalidOperationException();

              if ( node1.NodesIndexOfSelf() <= node2.NodesIndexOfSelf() )
              {
            beginNode = node1;
            endNode = node2;
            inclusiveBegin = inclusiveNode1;
            inclusiveEnd = inclusiveNode2;
              }
              else
              {
            beginNode = node2;
            endNode = node1;
            inclusiveBegin = inclusiveNode2;
            inclusiveEnd = inclusiveNode1;
              }
        }
开发者ID:neo2018,项目名称:Jumony,代码行数:28,代码来源:HtmlRange.cs

示例2: ApplyDecorators

 private void ApplyDecorators(IHtmlNode table)
 {
     foreach (var decorator in Decorators)
     {
         decorator.Decorate(table);
     }
 }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:7,代码来源:GridTableBuilder.cs

示例3: GetData

        protected object GetData( IHtmlNode node, bool asContainer )
        {
            if ( node == null )
            return null;

              lock ( _dataItems.SyncRoot )
              {

            if ( asContainer )
            {
              var _container = node as IHtmlContainer;

              if ( _container != null && _dataItems.Contains( _container ) )
            return _dataItems[_container];
            }

            var container = node.Container;

            if ( _dataItems.Contains( container ) )
              return _dataItems[container];

            else
              return GetData( container as IHtmlNode, false );
              }
        }
开发者ID:neo2018,项目名称:Jumony,代码行数:25,代码来源:DataContext.cs

示例4: AppendPageInput

        private void AppendPageInput(IHtmlNode container, GridPagerStyles style, GridPagerData section)
        {
            if ((style & GridPagerStyles.PageInput) != GridPagerStyles.PageInput)
                return;

            inputSectionBuilder.Create(section).AppendTo(container);
        }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:7,代码来源:GridPagerPagingSectionsBuilder.cs

示例5: if

    bool IHtmlRenderAdapter.Render( IHtmlNode node, IHtmlRenderContext context )
    {
      var element = node as IHtmlElement;

      if ( element == null )
        return false;

      if ( element.Name.EqualsIgnoreCase( "content" ) )
      {
        GetContentBody( element ).RenderChilds( context.Writer, RenderAdapters );
        return true;
      }
      else if ( element.Name.EqualsIgnoreCase( "head" ) )
      {

        View.ViewContext.HttpContext.Trace.Write( "ContentView", "Begin Merge Head" );
        var head = MergeHead( element, Document.FindSingle( "head" ) );
        View.ViewContext.HttpContext.Trace.Write( "ContentView", "End Merge Head" );

        head.Render( context.Writer, RenderAdapters );

        return true;
      }
      else
        return false;
    }
开发者ID:ajayumi,项目名称:Jumony,代码行数:26,代码来源:ContentAdapter.cs

示例6: ApplyTo

        public void ApplyTo(IHtmlNode target)
        {
            var hierarchyCell = new HtmlTag("th")
                .AddClass(UIPrimitives.Header, UIPrimitives.Grid.HierarchyCell);

            target.Children.Insert(0, hierarchyCell);
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:7,代码来源:GridHeaderHierarchyAdorner.cs

示例7: AsString

 private static string AsString(IHtmlNode node)
 {
     var sb = new StringBuilder();
     using (var writer = new HtmlTextWriter(new StringWriter(sb)))
         node.Write(writer);
     return sb.ToString();
 }
开发者ID:surgeforward,项目名称:LightBDD,代码行数:7,代码来源:HtmlStepNameDecorator.cs

示例8: ApplyTo

        public void ApplyTo(IHtmlNode target)
        {
            var filtered = column.Grid.DataProcessor.FilterDescriptors.SelectRecursive(filter =>
            {
                CompositeFilterDescriptor compositeDescriptor = filter as CompositeFilterDescriptor;

                if (compositeDescriptor != null)
                {
                    return compositeDescriptor.FilterDescriptors;
                }

                return null;
            })
            .Where(filter => filter is FilterDescriptor)
            .OfType<FilterDescriptor>()
            .Any(filter => filter.Member.IsCaseInsensitiveEqual(column.Member));

            var wrapper = new HtmlTag("div")
                .AddClass("t-grid-filter", "t-state-default")
                .ToggleClass("t-active-filter", filtered);

            wrapper.AppendTo(target);

            var icon = new HtmlTag("span").AddClass("t-icon", "t-filter");
            icon.AppendTo(wrapper);
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:26,代码来源:GridFilterAdorner.cs

示例9: AppendPageSizeDropDown

        private void AppendPageSizeDropDown(IHtmlNode container, GridPagerStyles style, GridPagerData section)
        {
            if ((style & GridPagerStyles.PageSizeDropDown) != GridPagerStyles.PageSizeDropDown)
                return;

            gridPagerPageSizeSection.Create(section).AppendTo(container);
        }
开发者ID:akhuang,项目名称:Asp.net-MVC-3,代码行数:7,代码来源:GridPagerPagingSectionsBuilder.cs

示例10: AppendCellContent

 protected override void AppendCellContent(IHtmlNode td, object dataItem)
 {
     foreach (var builder in builders)
     {
         builder(dataItem).AppendTo(td);
     }
 }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:7,代码来源:GridActionCellBuilder.cs

示例11: Decorate

 protected void Decorate(IHtmlNode td)
 {
     foreach (var decorator in Decorators)
     {
         decorator.Decorate(td);
     }
 }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:7,代码来源:GridFooterCellBuilder.cs

示例12: AppendNumericSection

 private void AppendNumericSection(IHtmlNode container, GridPagerStyles style, IGridUrlBuilder urlBuilder, int currentPage, int pageCount)
 {
     if ((style & GridPagerStyles.Numeric) == GridPagerStyles.Numeric)
     {
         numericSectionBuilder.Create(urlBuilder, currentPage, pageCount).AppendTo(container);
     }
 }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:7,代码来源:GridPagerPagingSectionsBuilder.cs

示例13: AppendPageInput

 private void AppendPageInput(IHtmlNode container, GridPagerData section)
 {
     if (section.Input)
     {
         inputSectionBuilder.Create(section).AppendTo(container);
     }
 }
开发者ID:jstevenson81,项目名称:wodgeaux,代码行数:7,代码来源:GridPagerPagingSectionsBuilder.cs

示例14: AppendPrevButtonsLink

 private void AppendPrevButtonsLink(int numericStart, IHtmlNode numericDiv, IGridUrlBuilder urlBuilder)
 {
     if (numericStart > 1)
     {
         buttonFactory.CreateButton(GridPagerButtonType.NumericLink, "...", true,
                                    GetUrl(urlBuilder, numericStart - 1)).AppendTo(numericDiv);
     }
 }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:8,代码来源:GridPagerNumericSectionBuilder.cs

示例15: Apply

        public void Apply(IHtmlNode parent)
        {
            var span = new HtmlElement("span");

            span.Attributes(button.ImageHtmlAttributes).AddClass(UIPrimitives.Icon, button.SpriteCssClass);

            span.AppendTo(parent);
        }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:8,代码来源:GridButtonImageDecorator.cs


注:本文中的IHtmlNode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。