Esempio n. 1
0
        public static EmphasisStyle Modify(this EmphasisStyle style)
        {
            switch (style)
            {
            case EmphasisStyle.Asterisk:
                return(EmphasisStyle.Underscore);

            case EmphasisStyle.Underscore:
                return(EmphasisStyle.Asterisk);

            default:
                throw new ArgumentException(style.ToString(), nameof(style));
            }
        }
Esempio n. 2
0
        public static System.Web.WebPages.HelperResult BeginMessage(EmphasisStyle messageType, IHtmlString heading)
        {
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 131 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"


#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "      <div class=\"panel ");



#line 132 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, string.Format("panel-{0}", messageType.ToString().ToLower()));

#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\">\r\n");



#line 133 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                if (!string.IsNullOrEmpty(heading.ToHtmlString()))
                {
#line default
#line hidden

                    WebViewPage.WriteLiteralTo(@__razor_helper_writer, "          <div class=\"panel-heading\"><h4 class=\"panel-title\">");



#line 135 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                    WebViewPage.WriteTo(@__razor_helper_writer, heading);

#line default
#line hidden

                    WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</h4></div>\r\n");



#line 136 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                }

#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "          <div class=\"panel-body\">\r\n");



#line 138 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"

#line default
#line hidden
            }));
        }
public static System.Web.WebPages.HelperResult BeginMessage(EmphasisStyle messageType, IHtmlString heading) {
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 131 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                      

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "      <div class=\"panel ");



#line 132 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, string.Format("panel-{0}", messageType.ToString().ToLower()));

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\">\r\n");



#line 133 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
            if (!string.IsNullOrEmpty(heading.ToHtmlString()))
            {

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "          <div class=\"panel-heading\"><h4 class=\"panel-title\">");



#line 135 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                    WebViewPage.WriteTo(@__razor_helper_writer, heading);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</h4></div>\r\n");



#line 136 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
            }

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "          <div class=\"panel-body\">\r\n");



#line 138 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"

#line default
#line hidden

});

}
Esempio n. 4
0
 /// <summary>
 /// Adds the given emphasis to the button.
 /// </summary>
 /// <example>
 /// @n.Submit("Submit").WithStyle(EmphasisStyle.Warning)
 /// </example>
 /// <param name="attrs">The Html Attributes from a navigation button</param>
 /// <param name="style">The style of button</param>
 /// <returns>The Html Attribute object so other methods can be chained off of it</returns>
 public static ButtonHtmlAttributes WithStyle(this ButtonHtmlAttributes attrs, EmphasisStyle style)
 {
     attrs.AddClass($"btn-{style.ToString().ToLower()}");
     return(attrs);
 }
 /// <summary>
 /// Adds the given emphasis to the button.
 /// </summary>
 /// <example>
 /// @n.Submit("Submit").WithStyle(EmphasisStyle.Warning)
 /// </example>
 /// <param name="attrs">The Html Attributes from a navigation button</param>
 /// <param name="style">The style of button</param>
 /// <returns>The Html Attribute object so other methods can be chained off of it</returns>
 public static ButtonHtmlAttributes WithStyle(this ButtonHtmlAttributes attrs, EmphasisStyle style)
 {
     attrs.AddClass(string.Format("btn-{0}", style.ToString().ToLower()));
     return(attrs);
 }
 /// <summary>
 /// Adds the given emphasis to the button.
 /// </summary>
 /// <example>
 /// @n.Submit("Submit").WithStyle(EmphasisStyle.Warning)
 /// </example>
 /// <param name="attrs">The Html Attributes from a navigation button</param>
 /// <param name="style">The style of button</param>
 /// <returns>The Html Attribute object so other methods can be chained off of it</returns>
 public static ButtonHtmlAttributes WithStyle(this ButtonHtmlAttributes attrs, EmphasisStyle style)
 {
     attrs.AddClass(string.Format("btn-{0}", style.ToString().ToLower()));
     return attrs;
 }