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


C# ImageButton.ApplyStyleSheetSkin方法代码示例

本文整理汇总了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))
//.........这里部分代码省略.........
开发者ID:huwred,项目名称:SnitzDotNet,代码行数:101,代码来源:active.aspx.cs


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