Skip to content

Commit

Permalink
Merge pull request #104 from faesel/added-app-logo
Browse files Browse the repository at this point in the history
added new parameter to pass in the app logo
  • Loading branch information
Windos authored Jul 16, 2020
2 parents e990711 + a5cfe75 commit f4cbd05
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Examples/Example05/New-ToastReminder.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ This parameter is additive with the -Seconds and -Hours parameters
The number of hours to wait before showing the reminder.
This parameter is additive with the -Seconds and -Minutes parameters
.PARAMETER AppLogo
The logo to be displayed on the toast notification
.PARAMETER PassThru
If this parameter is specified, a reference to the event registration will be written to the pipeline
(e.g. to allow the subscription to be cancelled). By default, this cmdlet produces no output
Expand Down Expand Up @@ -59,6 +62,10 @@ remain open for the reminder to trigger.
[Int]
$Hours,

[Parameter(Position = 5)]
[string]
$AppLogo,

[switch]
$Passthru
)
Expand All @@ -84,11 +91,12 @@ remain open for the reminder to trigger.
$Data = [pscustomobject]@{
Title = $ReminderTitle
Text = $ReminderText
$AppLogo = $AppLogo
}
$ElapsedAction = {
$Data = $event.MessageData
$Header = New-BTHeader -ID 1 -Title $Data.Title
New-BurntToastNotification -Text $Data.Text -Header $Header -AppLogo $null -SnoozeAndDismiss
New-BurntToastNotification -Text $Data.Text -Header $Header -AppLogo $Data.$AppLogo -SnoozeAndDismiss
$Event | Unregister-Event
$Timer.Dispose()
}
Expand Down

0 comments on commit f4cbd05

Please sign in to comment.