本文整理汇总了C#中ContentPost.GetImgUrl方法的典型用法代码示例。如果您正苦于以下问题:C# ContentPost.GetImgUrl方法的具体用法?C# ContentPost.GetImgUrl怎么用?C# ContentPost.GetImgUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContentPost
的用法示例。
在下文中一共展示了ContentPost.GetImgUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bindSectionShow
private void bindSectionShow( int sectionId, List<ContentPost> posts, ContentPost first )
{
set( "sectionId", sectionId );
IBlock block = getBlock( "nav" );
int i = 1;
foreach (ContentPost photo in posts) {
block.Set( "photo.Number", i );
block.Set( "photo.ImgUrl", photo.GetImgUrl() );
block.Set( "photo.ThumbUrl", photo.GetImgThumb() );
block.Set( "photo.Link", alink.ToAppData( photo ) );
if (strUtil.HasText( photo.TitleHome ))
block.Set( "photo.Title", photo.TitleHome );
else
block.Set( "photo.Title", photo.Title );
block.Bind( "photo", photo );
block.Next();
i++;
}
IBlock fblock = getBlock( "first" );
if (first != null) {
if (strUtil.HasText( first.TitleHome ))
fblock.Set( "first.Title", first.TitleHome );
else
fblock.Set( "first.Title", first.Title );
fblock.Set( "first.ImgUrl", first.GetImgUrl() );
fblock.Set( "first.Link", alink.ToAppData( first ) );
fblock.Set( "first.Width", first.Width );
fblock.Set( "first.Height", first.Height );
fblock.Bind( "first", first );
fblock.Next();
}
}
示例2: bindSectionShow
private void bindSectionShow( int sectionId, int imgcat, List<ContentPost> posts, ContentPost first )
{
set( "sectionId", sectionId );
set( "addUrl", Link.To( new PostController().Add, sectionId ) + "?categoryId=" + imgcat );
set( "listUrl", Link.To( new ListController().AdminList, sectionId ) + "?categoryId=" + imgcat );
IBlock block = getBlock( "nav" );
int i = 1;
foreach (ContentPost photo in posts) {
block.Set( "photo.Number", i );
if (strUtil.HasText( photo.TitleHome ))
block.Set( "photo.Title", photo.TitleHome );
else
block.Set( "photo.Title", photo.Title );
block.Set( "photo.ImgUrl", photo.GetImgUrl() );
block.Set( "photo.ThumbUrl", photo.GetImgThumb() );
block.Set( "photo.Link", Link.To( new PostController().EditImg, photo.Id ) );
block.Next();
i++;
}
IBlock fblock = getBlock( "first" );
if (first != null) {
fblock.Set( "first.Title", strUtil.SubString( first.Title, 20 ) );
fblock.Set( "first.ImgUrl", first.GetImgUrl() );
fblock.Set( "first.Link", Link.To( new PostController().EditImg, first.Id ) );
fblock.Set( "first.Width", first.Width );
fblock.Set( "first.Height", first.Height );
fblock.Next();
}
}
示例3: bindEditInfo
private void bindEditInfo( ContentPost post )
{
if (post.PageSection == null) return;
set( "post.DeleteUrl", to( Delete, post.Id ) );
set( "post.Author", post.Author );
set( "post.Title", post.Title );
set( "post.TitleHome", strUtil.EncodeTextarea( post.TitleHome ) );
set( "post.Width", post.Width );
set( "post.Height", post.Height );
editor( "Content", strUtil.Edit( post.Content ), "250px" );
set( "post.Created", post.Created );
set( "post.Hits", post.Hits );
set( "post.OrderId", post.OrderId );
set( "post.RedirectUrl", post.RedirectUrl );
set( "post.MetaKeywords", post.MetaKeywords );
set( "post.MetaDescription", post.MetaDescription );
set( "post.Summary", post.Summary );
set( "post.SourceLink", post.SourceLink );
set( "post.Style", post.Style );
set( "post.ImgLink", post.GetImgUrl() );
set( "post.ImgThumbLink", post.GetImgThumb() );
set( "post.ImgDeleteLink", to( DeletePostPic, post.Id ) );
set( "post.TagList", post.Tag.TextString );
String val = AccessStatusUtil.GetRadioList( post.AccessStatus );
set( "post.AccessStatus", val );
set( "post.IsCloseComment", Html.CheckBox( "IsCloseComment", lang( "closeComment" ), "1", cvt.ToBool( post.CommentCondition ) ) );
radioList( "PickStatus", PickStatus.GetPickStatus(), post.PickStatus.ToString() );
set( "attachmentAdminLink", to( new AttachmentController().AdminList, post.Id ) );
}