本文整理汇总了C#中ImageButton.ApplyStyleSheetSkin方法的典型用法代码示例。如果您正苦于以下问题:C# ImageButton.ApplyStyleSheetSkin方法的具体用法?C# ImageButton.ApplyStyleSheetSkin怎么用?C# ImageButton.ApplyStyleSheetSkin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageButton
的用法示例。
在下文中一共展示了ImageButton.ApplyStyleSheetSkin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ActiveTableRowDataBound
protected void ActiveTableRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
var markRead = new ImageButton
{
SkinID = "MarkRead",
ToolTip = webResources.lblMarkAllRead
};
markRead.ApplyStyleSheetSkin(Page);
markRead.Click += MarkReadClick;
e.Row.Cells[0].Controls.Add(markRead);
if (_currentUser == "")
{
e.Row.Cells.RemoveAt(5);
}
}
else if (e.Row.RowType == DataControlRowType.Pager)
{
_replyPager = (GridPager)e.Row.FindControl("pager");
_replyPager.PageCount = Common.CalculateNumberOfPages(RowCount, Config.TopicPageSize);
_replyPager.CurrentIndex = CurrentPage;
}
else if (e.Row.RowType == DataControlRowType.DataRow)
{
var topic = (TopicInfo)e.Row.DataItem;
var lockIcon = e.Row.Cells[3].FindControl("TopicLock") as ImageButton;
var unlockIcon = e.Row.Cells[3].FindControl("TopicUnLock") as ImageButton;
var delIcon = e.Row.Cells[3].FindControl("TopicDelete") as ImageButton;
var subscribe = e.Row.Cells[3].FindControl("TopicSub") as ImageButton;
var unsubscribe = e.Row.Cells[3].FindControl("TopicUnSub") as ImageButton;
var approve = e.Row.Cells[3].FindControl("TopicApprove") as ImageButton;
var editIcon = e.Row.Cells[3].FindControl("hypEditTopic") as HyperLink;
var replyIcon = e.Row.Cells[3].FindControl("hypReplyTopic") as HyperLink;
var newIcon = e.Row.Cells[3].FindControl("hypNewTopic") as HyperLink;
var popuplink = e.Row.Cells[1].FindControl("popuplink") as Literal;
var lastpost = e.Row.Cells[1].FindControl("lpLnk") as HyperLink;
var postdate = e.Row.Cells[1].FindControl("postdate") as Literal;
if (popuplink != null)
{
string title = String.Format(webResources.lblViewProfile, "$1");
popuplink.Text = topic.LastPostAuthorId != null ? Regex.Replace(topic.LastPostAuthorPopup, @"\[!(.*)!]", title) : "";
}
if (postdate != null)
{
postdate.Text = SnitzTime.TimeAgoTag(((TopicInfo)e.Row.DataItem).Date, IsAuthenticated, Member);
}
if (lastpost != null)
{
lastpost.Text = SnitzTime.TimeAgoTag(((TopicInfo)e.Row.DataItem).LastPostDate, IsAuthenticated, Member, webResources.lblLastPostJump);
}
int replyCount = topic.ReplyCount;
int topicId = topic.Id;
int forumId = topic.ForumId;
int catId = topic.CatId;
string authorName = topic.AuthorName;
bool inModeratedList = Moderators.IsUserForumModerator(_currentUser, forumId);
if (lockIcon != null)
{
lockIcon.Visible = (IsAdministrator || inModeratedList);
lockIcon.OnClientClick =
"confirmPostBack('Do you want to lock the Topic?','LockTopic'," + topicId + ");return false;";
}
if (delIcon != null)
{
delIcon.Visible = false;
delIcon.OnClientClick =
"confirmPostBack('Do you want to delete the Topic?','DeleteTopic'," + topicId + ");return false;";
}
if (editIcon != null) editIcon.Visible = false;
if (approve != null)
{
approve.Visible = false;
if (topic.Status == (int)Enumerators.PostStatus.UnModerated || topic.Status == (int)Enumerators.PostStatus.OnHold)
approve.Visible = (inModeratedList || IsAdministrator);
approve.OnClientClick = string.Format("mainScreen.LoadServerControlHtml('Moderation',{{'pageID':7,'data':'{0},{1}'}}, 'methodHandlers.BeginRecieve');return false;",
true, topic.Id);
}
if (subscribe != null)
{
subscribe.Visible = IsAuthenticated;
if (IsAuthenticated)
{
topic.Forum = Forums.GetForum(topic.ForumId);
}
subscribe.Visible = subscribe.Visible && topic.AllowSubscriptions;
subscribe.OnClientClick =
"confirmTopicSubscribe('Do you want to be notified when someone posts a reply?'," + topicId + ",false);return false;";
}
if (unsubscribe != null)
{
unsubscribe.Visible = false;
if (subscribe != null && subscribe.Visible)
{
if (Members.IsSubscribedToTopic(topic.Id, Member == null ? 0 : Member.Id))
//.........这里部分代码省略.........