Ejemplo n.º 1
0
 public SweetAlert Icon(SweetAlertIcon icon)
 {
     if (icon != SweetAlertIcon.None)
     {
         Attributes["icon"] = string.Format("'{0}'", icon.ToString().ToLower());
     }
     SetScript();
     return(this);
 }
Ejemplo n.º 2
0
        public SweetAlertBs Type(SweetAlertIcon type)
        {
            if (type != SweetAlertIcon.None)
            {
                Attributes["type"] = string.Format("'{0}'", type.ToString().ToLower());
            }

            SetScript();
            return(this);
        }
Ejemplo n.º 3
0
 public static SweetAlertBs SweetAlertBs(this IHtmlHelper helper, string message, string title = "پیام", SweetAlertIcon type = SweetAlertIcon.None)
 {
     return(new SweetAlertBs(helper).Text(message).Title(title).Type(type));
 }
Ejemplo n.º 4
0
 public static SweetAlertBs SweetAlertBs(string message, string title = "پیام", SweetAlertIcon type = SweetAlertIcon.None)
 {
     return(new SweetAlertBs().Text(message).Title(title).Type(type));
 }
Ejemplo n.º 5
0
 private async ValueTask ShowMessage(string titulo, string mensaje, SweetAlertIcon tipo)
 {
     await js.InvokeVoidAsync("Swal.fire", titulo, mensaje, Enum.GetName(typeof(SweetAlertIcon), tipo));
 }