Esempio n. 1
0
        public static string GetOneCommentHtmlWithContainer(
            CommentInfo comment,
            bool isFirstLevel,
            Func <string, string> userProfileLink,
            bool simple,
            string jsObjName,
            string editCommentLink,
            string responseCommentLink,
            string removeCommentLink,
            string inactiveMessage,
            string confirmRemoveCommentMessage,
            string javaScriptRemoveCommentFunctionName,
            string PID,
            RenderInnerComments renderFunction,
            ref int commentIndex
            )
        {
            if (comment.Inactive && IsEmptyComments(comment.CommentList))
            {
                return(String.Empty);
            }

            var sb = new StringBuilder();

            sb.AppendFormat("<div style=\"{1}\" id=\"container_{0}\">",
                            comment.CommentID, (!isFirstLevel ? "margin-left: 35px;" : String.Empty));

            sb.Append(
                GetOneCommentHtml(
                    comment,
                    commentIndex % 2 == 1,
                    userProfileLink,
                    simple,
                    jsObjName,
                    editCommentLink,
                    responseCommentLink,
                    removeCommentLink,
                    inactiveMessage,
                    confirmRemoveCommentMessage,
                    javaScriptRemoveCommentFunctionName,
                    PID
                    )
                );

            commentIndex++;

            if (renderFunction != null && comment.CommentList != null && comment.CommentList.Count > 0)
            {
                sb.Append(renderFunction(comment.CommentList));
            }

            sb.Append("</div>");

            return(sb.ToString());
        }
 public static string GetOneCommentHtmlWithContainer(
     CommentsList control,
     CommentInfo comment,
     bool isFirstLevel,
     RenderInnerComments renderFunction,
     ref int commentIndex)
 {
     return(GetOneCommentHtmlWithContainer(
                comment,
                isFirstLevel,
                control.RealUserProfileLinkResolver,
                control.BehaviorID,
                control.EditCommentLink,
                control.ResponseCommentLink,
                control.RemoveCommentLink,
                control.InactiveMessage,
                control.ConfirmRemoveCommentMessage,
                control.JavaScriptRemoveCommentFunctionName,
                control.PID,
                renderFunction,
                ref commentIndex
                ));
 }
        public static string GetOneCommentHtmlWithContainer(
            CommentInfo comment,
            bool isFirstLevel,
            Func<string, string> userProfileLink,
            bool simple,
            string jsObjName,
            string editCommentLink,
            string responseCommentLink,
            string removeCommentLink,
            string inactiveMessage,
            string confirmRemoveCommentMessage,
            string javaScriptRemoveCommentFunctionName,
            string PID,
            RenderInnerComments renderFunction,
            ref int commentIndex
            )
        {
            if (comment.Inactive && IsEmptyComments(comment.CommentList))
                return String.Empty;

            var sb = new StringBuilder();

            sb.AppendFormat("<div style=\"{1}\" id=\"container_{0}\">",
                            comment.CommentID, (!isFirstLevel ? "margin-left: 35px;" : String.Empty));

            sb.Append(
                GetOneCommentHtml(
                    comment,
                    commentIndex%2 == 1,
                    userProfileLink,
                    simple,
                    jsObjName,
                    editCommentLink,
                    responseCommentLink,
                    removeCommentLink,
                    inactiveMessage,
                    confirmRemoveCommentMessage,
                    javaScriptRemoveCommentFunctionName,
                    PID
                    )
                );

            commentIndex++;

            if (renderFunction != null && comment.CommentList != null && comment.CommentList.Count > 0)
                sb.Append(renderFunction(comment.CommentList));

            sb.Append("</div>");

            return sb.ToString();
        }
 public static string GetOneCommentHtmlWithContainer(
     CommentsList control,
     CommentInfo comment,
     bool isFirstLevel,
     RenderInnerComments renderFunction,
     ref int commentIndex)
 {
     return GetOneCommentHtmlWithContainer(
         comment,
         isFirstLevel,
         control.RealUserProfileLinkResolver,
         control.Simple,
         control.BehaviorID,
         control.EditCommentLink,
         control.ResponseCommentLink,
         control.RemoveCommentLink,
         control.InactiveMessage,
         control.ConfirmRemoveCommentMessage,
         control.JavaScriptRemoveCommentFunctionName,
         control.PID,
         renderFunction,
         ref commentIndex
         );
 }