示例#1
0
文件: Noty.cs 项目: raminmjj/Decision
 public NotyMessage AddNotyMessage(NotyMessage message)
 {
     NotyMessages.Add(message);
     return message;
 }
示例#2
0
 public static void NotySuccess(this ControllerBase controller, string message, bool isSticky = false)
 {
     var notyMessage = new NotyMessage
     {
         Type = AlertType.success,
         IsSticky = isSticky,
         Message = message,
         CloseWith = MessageCloseType.click,
         Location = MessageLocation.topLeft,
         CloseAnimation = AnimationTypes.bounceOut,
         OpenAnimation = AnimationTypes.bounce,
         IsModal = true
     };
     controller.AddNotyAlert(notyMessage);
 }
示例#3
0
 public static void NotyAlert(this ControllerBase controller,string message, bool isSticky = false)
 {
     var notyMessage = new NotyMessage
     {
         Type = AlertType.alert,
         IsSticky = isSticky,
         Message = message
     };
     controller.AddNotyAlert(notyMessage);
 }
示例#4
0
        private static void AddNotyAlert(this ControllerBase controller, NotyMessage message)
        {
            var noty = controller.TempData.ContainsKey(Noty.TempDataKey)
                 ? (Noty)controller.TempData[Noty.TempDataKey]
                 : new Noty();

            noty.AddNotyMessage(message);

            controller.TempData[Noty.TempDataKey] = noty;
        }