Exemplo n.º 1
0
        private void appendMyThreadTypeLink(StringBuilder sb, MyThreadType myThreadType, string name, string linkStyle, string currentLinkStyle, string separator)
        {
            if (string.IsNullOrEmpty(linkStyle))
            {
                linkStyle = "<a href=\"{0}\">{1}</a>";
            }

            if (string.IsNullOrEmpty(currentLinkStyle))
            {
                currentLinkStyle = "<a href=\"{0}\" class=\"current\">{1}</a>";
            }

            //if (string.IsNullOrEmpty(separator))
            //    separator = " | ";

            string url;
            string myThreadTypeString = myThreadType.ToString().ToLower();

            if (type == myThreadTypeString)
            {
                url = currentLinkStyle;
            }
            else
            {
                url = linkStyle;
            }
            sb.Append(string.Format(url, UrlHelper.GetMyThreadsUrl(myThreadTypeString), name) + separator);
        }
Exemplo n.º 2
0
 protected new string GetThreadLink(BasicThread thread, int subjectLength, string linkStyle, bool addStyle)
 {
     if (myThreadType == MyThreadType.MyUnapprovedPostThread || myThreadType == MyThreadType.MyUnapprovedThread)
     {
         return(GetThreadLink(thread, subjectLength, 1, myThreadType.ToString(), linkStyle, addStyle));
     }
     else
     {
         return(base.GetThreadLink(thread, subjectLength, linkStyle, addStyle));
     }
 }
Exemplo n.º 3
0
        private void appendMyThreadTypeLink(StringBuilder sb, MyThreadType myThreadType, string name, string linkStyle, string currentLinkStyle, string separator)
        {
            if (string.IsNullOrEmpty(linkStyle))
                linkStyle = "<a href=\"{0}\">{1}</a>";

            if (string.IsNullOrEmpty(currentLinkStyle))
                currentLinkStyle = "<a href=\"{0}\" class=\"current\">{1}</a>";

            //if (string.IsNullOrEmpty(separator))
            //    separator = " | ";

            string url;
            string myThreadTypeString = myThreadType.ToString().ToLower();
            if (type == myThreadTypeString)
                url = currentLinkStyle;
            else
            {
                url = linkStyle;
            }
            sb.Append(string.Format(url, UrlHelper.GetMyThreadsUrl(myThreadTypeString), name) + separator);
        }
Exemplo n.º 4
0
 public static string GetMyThreadsUrlForPager(MyThreadType myThreadType)
 {
     return(BbsRouter.GetUrl("my/mythreads", "type=" + myThreadType.ToString() + "&page={0}"));
 }
Exemplo n.º 5
0
 public static string GetMyThreadsUrl(MyThreadType myThreadType)
 {
     return(GetMyThreadsUrl(myThreadType.ToString()));
 }
Exemplo n.º 6
0
 public static string GetMyThreadsUrlForPager(MyThreadType myThreadType)
 {
     return BbsRouter.GetUrl("my/mythreads", "type=" + myThreadType.ToString() + "&page={0}");
 }
Exemplo n.º 7
0
 public static string GetMyThreadsUrl(MyThreadType myThreadType)
 {
     return GetMyThreadsUrl(myThreadType.ToString());
 }