using Newtonsoft.Json; using System; namespace ElectronNET.API.Entities { /// /// /// public class NotificationOptions { /// /// A title for the notification, which will be shown at the top of the notification /// window when it is shown. /// public string Title { get; set; } /// /// A subtitle for the notification, which will be displayed below the title. /// public string SubTitle { get; set; } /// /// The body text of the notification, which will be displayed below the title or /// subtitle. /// public string Body { get; set; } /// /// Whether or not to emit an OS notification noise when showing the notification. /// public bool Silent { get; set; } /// /// An icon to use in the notification. /// public string Icon { get; set; } /// /// Whether or not to add an inline reply option to the notification. /// public bool HasReply { get; set; } /// /// The timeout duration of the notification. Can be 'default' or 'never'. /// public string TimeoutType { get; set; } /// /// The placeholder to write in the inline reply input field. /// public string ReplyPlaceholder { get; set; } /// /// The name of the sound file to play when the notification is shown. /// public string Sound { get; set; } /// /// The urgency level of the notification. Can be 'normal', 'critical', or 'low'. /// public string Urgency { get; set; } /// /// Actions to add to the notification. Please read the available actions and /// limitations in the NotificationAction documentation. /// public NotificationAction Actions { get; set; } /// /// A custom title for the close button of an alert. An empty string will cause the /// default localized text to be used. /// public string CloseButtonText { get; set; } /// /// Emitted when the notification is shown to the user, note this could be fired /// multiple times as a notification can be shown multiple times through the Show() /// method. /// [JsonIgnore] public Action OnShow { get; set; } /// /// Gets or sets the show identifier. /// /// /// The show identifier. /// [JsonProperty] internal string ShowID { get; set; } /// /// Emitted when the notification is clicked by the user. /// [JsonIgnore] public Action OnClick { get; set; } /// /// Gets or sets the click identifier. /// /// /// The click identifier. /// [JsonProperty] internal string ClickID { get; set; } /// /// Emitted when the notification is closed by manual intervention from the user. /// /// This event is not guarunteed to be emitted in all cases where the notification is closed. /// [JsonIgnore] public Action OnClose { get; set; } /// /// Gets or sets the close identifier. /// /// /// The close identifier. /// [JsonProperty] internal string CloseID { get; set; } /// /// macOS only: Emitted when the user clicks the “Reply” button on a notification with hasReply: true. /// /// The string the user entered into the inline reply field /// [JsonIgnore] public Action OnReply { get; set; } /// /// Gets or sets the reply identifier. /// /// /// The reply identifier. /// [JsonProperty] internal string ReplyID { get; set; } /// /// macOS only - The index of the action that was activated /// [JsonIgnore] public Action OnAction { get; set; } /// /// Gets or sets the action identifier. /// /// /// The action identifier. /// [JsonProperty] internal string ActionID { get; set; } /// /// Initializes a new instance of the class. /// /// The title. /// The body. public NotificationOptions(string title, string body) { Title = title; Body = body; } } }