?? itemphotoimage.cs
字號(hào):
namespace ASPNET.StarterKit.Communities {
using System;
using ASPNET.StarterKit.Communities.PhotoGallery;
//*********************************************************************
//
// ItemPhotoImage Class
//
// Represents a photogallery image
//
//*********************************************************************
public class ItemPhotoImage : ItemImage {
public ItemPhotoImage() : base() {
CssClass = "itemPhotoImage";
EnableViewState = false;
}
//*********************************************************************
//
// OnDataBinding Method
//
// When databound, get the image information
//
//*********************************************************************
override protected void OnDataBinding(EventArgs e) {
ContentItem item;
if (NamingContainer is ContentItem)
item = (ContentItem)NamingContainer;
else
item = (ContentItem)NamingContainer.NamingContainer;
SectionInfo objSectionInfo = (SectionInfo)Context.Items["SectionInfo"];
PhotoInfo objPhotoInfo = (PhotoInfo)item.DataItem;
if (objPhotoInfo.ImageID != -1) {
if (objSectionInfo.ID == objPhotoInfo.SectionID) {
ImageUrl = ImageUtility.BuildImagePath(objPhotoInfo.ImageID, objPhotoInfo.ImageName);
NavigateUrl = CommunityGlobals.CalculatePath(String.Format("{0}.aspx", objPhotoInfo.ContentPageID));
} else {
ImageUrl = ImageUtility.BuildFullImagePath(objPhotoInfo.SectionID, objPhotoInfo.ImageID, objPhotoInfo.ImageName);
NavigateUrl = ContentPageUtility.CalculateContentPath(objPhotoInfo.SectionID, objPhotoInfo.ContentPageID);
}
}
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -