public static string Show(TipoMensaje Tipo, string msg, string title, ShowMethod sMethod, HideMethod hMethod, ShowEasing sEasing, HideEasing hEasing, ToastPosition tPosition, bool btnCerrar) { string shortCutFunction = GetTipo(Tipo); string showEasing = GetShowEasing(sEasing); string hideEasing = GetHideEasing(hEasing); string showMethod = GetShowMethod(sMethod); string hideMethod = GetHideMethod(hMethod); string position = GetPosition(tPosition); int toastIndex = 0; int showDuration = 1000; int hideDuration = 1000; int timeOut = 2000; int extendedTimeout = 1000; string ScriptError = @" $(document).ready( function() { MensajeError('" + shortCutFunction + "', '" + msg + "', '" + title + "', " + showDuration + ", " + hideDuration + ", " + timeOut + ", " + extendedTimeout + ", '" + showEasing + "', '" + hideEasing + "', '" + showMethod + "', '" + hideMethod + "', " + toastIndex + ", '" + btnCerrar.ToString().ToLower() + "', '" + position + @"');});"; return(ScriptError); }
private static string GetHideEasing(HideEasing t) { string Tipo = ""; switch (t) { case HideEasing.Swing: Tipo = "swing"; break; case HideEasing.Linear: Tipo = "linear"; break; } return(Tipo); }