本文整理汇总了C#中System.Web.UI.WebControls.Image.ApplyStyleSheetSkin方法的典型用法代码示例。如果您正苦于以下问题:C# Image.ApplyStyleSheetSkin方法的具体用法?C# Image.ApplyStyleSheetSkin怎么用?C# Image.ApplyStyleSheetSkin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.WebControls.Image
的用法示例。
在下文中一共展示了Image.ApplyStyleSheetSkin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetRecentTopicIcon
private Image GetRecentTopicIcon(Enumerators.PostStatus tStatus, int tReplies)
{
var image = new Image { ID = "postIcon" };
switch (tStatus)
{
case Enumerators.PostStatus.Closed:
image.SkinID = "FolderNewLocked";
break;
default:
image.SkinID = "FolderNew";
if (tReplies > Config.HotTopicNum)
image.SkinID = "FolderNewHot";
break;
}
image.GenerateEmptyAlternateText = true;
image.ApplyStyleSheetSkin(Page);
return image;
}
示例2: GetRecentTopicIcon
private Image GetRecentTopicIcon(TopicInfo topic, int tReplies)
{
var image = new Image { ID = "postIcon", EnableViewState = false };
string _new = "";
string hot = "";
string locked = "";
string sticky = "";
if (topic.ReplyCount >= Config.HotTopicNum)
hot = "Hot";
switch ((Enumerators.PostStatus)topic.Status)
{
case Enumerators.PostStatus.Open:
locked = "";
image.ToolTip = webResources.lblOldPosts;
break;
case Enumerators.PostStatus.UnModerated:
image.AlternateText = webResources.Unmoderatedpost;
image.ToolTip = webResources.Unmoderatedpost;
break;
case Enumerators.PostStatus.OnHold:
image.AlternateText = webResources.OnHold;
image.ToolTip = webResources.OnHold;
break;
default:
locked = "Locked";
hot = "";
image.AlternateText = webResources.lblLockedTopic;
image.ToolTip = webResources.lblTopicLocked;
break;
}
if (topic.IsSticky)
{
sticky = "Sticky";
image.AlternateText = webResources.lblStickyTopic;
image.ToolTip = locked == "" ? webResources.lblStickyTopic : webResources.lblStickyTopic + ", " + webResources.lblTopicLocked;
}
if (topic.LastPostDate > LastVisitDateTime)
{
image.AlternateText = webResources.lblNewPosts;
image.ToolTip = webResources.lblNewPosts;
_new = "New";
}
image.SkinID = "Folder" + _new + hot + sticky + locked;
if (topic.Status == (int)Enumerators.PostStatus.UnModerated)
{
image.ToolTip = webResources.Unmoderatedpost;
image.SkinID = "UnModerated";
}
if (topic.Status == (int)Enumerators.PostStatus.OnHold)
{
image.ToolTip = webResources.TopicOnHold;
image.SkinID = "OnHold";
}
if (topic.UnModeratedReplies > 0)
{
image.ToolTip = webResources.UnmoderatedPosts;
image.SkinID = "UnmoderatedPosts";
}
if (topic.PollId > 0)
{
image.ToolTip = Polls.lblPoll;
image.SkinID = "Poll";
}
image.GenerateEmptyAlternateText = true;
image.ApplyStyleSheetSkin(Page);
if(Config.TopicAvatar)
image.CssClass = image.CssClass + " icon-overlay";
return image;
}