コード例 #1
1
ファイル: ControllerExtentions.cs プロジェクト: rabbal/Mvc5
 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);
 }
コード例 #2
0
        private static void AddNotyAlert(this ControllerBase controller, NotyMessage message)
        {
            var noty = controller.TempData.ContainsKey(Noty.Noty.TempDataKey)
                 ? (Noty.Noty)controller.TempData[Noty.Noty.TempDataKey]
                 : new Noty.Noty();

            noty.AddNotyMessage(message);

            controller.TempData[Noty.Noty.TempDataKey] = noty;
        }
コード例 #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
        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);
        }
コード例 #5
0
        public static void NotySuccessModal(this ControllerBase controller, string message, bool isSticky = false, MessageLocation location = MessageLocation.center)
        {
            var notyMessage = new NotyMessage
            {
                Type           = AlertType.success,
                IsSticky       = isSticky,
                Message        = message,
                Location       = location,
                CloseAnimation = AnimationTypes.bounceIn,
                OpenAnimation  = AnimationTypes.bounceOut,
                IsModal        = true,
                CloseWith      = MessageCloseType.click
            };

            controller.AddNotyAlert(notyMessage);
        }
コード例 #6
0
ファイル: Noty.cs プロジェクト: rabbal/Mvc5
 public NotyMessage AddNotyMessage(NotyMessage message)
 {
     NotyMessages.Add(message);
     return message;
 }
コード例 #7
0
ファイル: ControllerExtentions.cs プロジェクト: rabbal/Mvc5
 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);
 }
コード例 #8
0
ファイル: ControllerExtentions.cs プロジェクト: rabbal/Mvc5
        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;
        }