Пример #1
0
        private static string GetHideMethod(HideMethod t)
        {
            string Tipo = "";

            switch (t)
            {
            case HideMethod.FadeOut:
                Tipo = "fadeOut";
                break;
            }
            return(Tipo);
        }
Пример #2
0
        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);
        }