public NotificationMessage(string message, bool showActionButton, NotificationButtonType buttonType, bool requiresInteraction, int displayDuration)
 {
     Message             = message;
     ShowActionButton    = showActionButton;
     ButtonType          = buttonType;
     RequiresInteraction = requiresInteraction;
     if (displayDuration <= 20 && displayDuration >= 5)
     {
         DisplayDuration = displayDuration;
     }
     else if (displayDuration < 5)
     {
         DisplayDuration = 5;
     }
     else
     {
         DisplayDuration = 20;
     }
 }
Ejemplo n.º 2
0
 public NotificationMessage(string message, bool showActionButton, NotificationButtonType buttonType, bool requiresInteraction, int displayDuration)
 {
     Message = message;
     ShowActionButton = showActionButton;
     ButtonType = buttonType;
     RequiresInteraction = requiresInteraction;
     if (displayDuration <= 20 && displayDuration >= 5)
     {
         DisplayDuration = displayDuration;
     }
     else if (displayDuration < 5)
     {
         DisplayDuration = 5;
     }
     else
     {
         DisplayDuration = 20;
     }
 }
Ejemplo n.º 3
0
 private void SendNotificationMessage(string message, bool showButtons, NotificationButtonType buttonType, bool requiresInteraction, int duration)
 {
     NotificationMessage msg = new NotificationMessage(message, showButtons, buttonType, requiresInteraction, duration);
     panelNotification.AddMessage(msg);
 }