コード例 #1
0
 public static string ToLogColor(this MessageColor color)
 {
     return(color.ToString().ToLower());
 }
コード例 #2
0
        public MvcHtmlString Render()
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendFormat("<div class=\"ui-message{0}\">", color != MessageColor.Default ? " ui-message-" + color.ToString().ToLower() : "");
            builder.AppendFormat("<span class=\"ui-micon ui-micon-{0}\"></span>", icon.ToString().ToLower());
            builder.Append("<div class=\"ui-message-text\">");
            if (!String.IsNullOrEmpty(title))
            {
                builder.AppendFormat("<em>{0}</em>", title);
            }
            if (!String.IsNullOrEmpty(detail))
            {
                builder.AppendFormat("<p>{0}</p>", detail);
            }
            builder.Append("</div></div>");
            return(MvcHtmlString.Create(builder.ToString()));
        }