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


C# ContentPost.GetImgMedium方法代码示例

本文整理汇总了C#中ContentPost.GetImgMedium方法的典型用法代码示例。如果您正苦于以下问题:C# ContentPost.GetImgMedium方法的具体用法?C# ContentPost.GetImgMedium怎么用?C# ContentPost.GetImgMedium使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ContentPost的用法示例。


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

示例1: bindDetail

        private void bindDetail( int id, ContentPost post )
        {
            String content;

            String pageSeparator = getPageSeparator( post.Content );
            if (pageSeparator == null) {
                content = post.Content;
            }
            else {
                content = getPagedContent( post, pageSeparator );
            }

            if (post.HasImg()) {
                content = string.Format( "<div style=\"text-align:center;\"><img src=\"{0}\" />", post.GetImgMedium() ) + "</div>" + content;
            }

            set( "post.Content", content );
        }
开发者ID:ningboliuwei,项目名称:wojilu,代码行数:18,代码来源:ListController.cs

示例2: bindDetail

        private void bindDetail( int id, ContentPost post )
        {
            String content;

            String pageSeparator = getPageSeparator( post.Content );
            if (pageSeparator == null) {
                content = post.Content;
            }
            else {
                content = getPagedContent( post, pageSeparator );
            }

            if (post.HasImg()) {

                String imgUrl = post.GetImgMedium();
                if (content.IndexOf( imgUrl ) < 0) {

                    content = string.Format( "<div class=\"post-detail-content-pic\"><img src=\"{0}\" /></div>", imgUrl )
                        + content;
                }
            }

            set( "post.Content", content );
        }
开发者ID:NOTHEN,项目名称:wojilu,代码行数:24,代码来源:ListController.cs

示例3: bindDetail

        private void bindDetail( int id, ContentPost post )
        {
            set( "post.Title", post.GetTitle() );
            set( "post.Author", post.Author );
            set( "post.Created", post.Created );

            String tag = post.Tag.List.Count > 0 ? tag = "tag: " + post.Tag.HtmlString : "";
            String src = getSrc( post );
            String replies = getReplies( post );

            set( "post.Tag", tag );
            set( "post.Replies", replies );
            set( "post.Hits", post.Hits );
            set( "post.Source", src );

            if (post.Creator != null) {
                set( "post.Submitter", string.Format( "<a href=\"{0}\" target=\"_blank\">{1}</a>", Link.ToMember( post.Creator ), post.Creator.Name ) );
            }
            else {
                set( "post.Submitter", "ÎÞ" );
            }

            bindSummary( post );

            String content;

            String pageSeparator = getPageSeparator( post.Content );
            if (pageSeparator == null) {
                content = post.Content;
            }
            else {
                content = getPagedContent( post, pageSeparator );
            }

            if (post.HasImg()) {
                content = string.Format( "<div style=\"text-align:center;\"><img src=\"{0}\" />", post.GetImgMedium() ) + "</div>" + content;
            }

            if (post.IsAttachmentLogin == 1 && ctx.viewer.IsLogin == false) {
                content += "<div class=\"downloadWarning\"><div>" + alang( "downloadNeedLogin" ) + "</div></div>";
            }
            else {
                content = addAttachment( post, content );
            }

            set( "post.Content", content );
        }
开发者ID:robin88,项目名称:wojilu,代码行数:47,代码来源:ListController.cs


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