Commit 9b0f037f by Sebastián Katzer

Added silent option for windows

parent 7022f6af
...@@ -157,6 +157,7 @@ namespace LocalNotificationProxy.LocalNotification ...@@ -157,6 +157,7 @@ namespace LocalNotificationProxy.LocalNotification
notification.Id = this.Content.Id; notification.Id = this.Content.Id;
notification.Tag = this.Options.Id.ToString(); notification.Tag = this.Options.Id.ToString();
notification.SuppressPopup = this.Options.Silent;
if (this.Trigger.Occurrence > 1) if (this.Trigger.Occurrence > 1)
{ {
......
...@@ -61,6 +61,11 @@ namespace LocalNotificationProxy.LocalNotification ...@@ -61,6 +61,11 @@ namespace LocalNotificationProxy.LocalNotification
public string Image { get; set; } public string Image { get; set; }
/// <summary> /// <summary>
/// Gets or sets a value indicating whether the popup shall be visible.
/// </summary>
public bool Silent { get; set; } = false;
/// <summary>
/// Gets or sets the notification trigger. /// Gets or sets the notification trigger.
/// </summary> /// </summary>
public Trigger Trigger { get; set; } public Trigger Trigger { get; set; }
...@@ -126,6 +131,11 @@ namespace LocalNotificationProxy.LocalNotification ...@@ -126,6 +131,11 @@ namespace LocalNotificationProxy.LocalNotification
options.Attachments = node.GetAttribute("attachments").Split(','); options.Attachments = node.GetAttribute("attachments").Split(',');
} }
if (node.GetAttributeNode("silent") != null)
{
options.Silent = true;
}
if (node.GetAttributeNode("action") != null) if (node.GetAttributeNode("action") != null)
{ {
options.Action = node.GetAttribute("action"); options.Action = node.GetAttribute("action");
...@@ -185,6 +195,11 @@ namespace LocalNotificationProxy.LocalNotification ...@@ -185,6 +195,11 @@ namespace LocalNotificationProxy.LocalNotification
node.SetAttribute("attachments", string.Join(",", this.Attachments)); node.SetAttribute("attachments", string.Join(",", this.Attachments));
} }
if (this.Silent)
{
node.SetAttribute("silent", "1");
}
if (action != null) if (action != null)
{ {
node.SetAttribute("action", action); node.SetAttribute("action", action);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment