1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-26 05:03:15 +00:00

Fixed cleanup for toast on Windows

This commit is contained in:
Bryan Roe
2020-05-16 14:33:45 -07:00
parent 474f6fc4d0
commit 41628bf0d9
2 changed files with 6 additions and 6 deletions

View File

@@ -86,7 +86,7 @@ function Toaster()
retVal.child.stdin.write('$objBalloon = New-Object System.Windows.Forms.NotifyIcon\r\n');
retVal.child.stdin.write('$objBalloon.Icon = [System.Drawing.SystemIcons]::Information\r\n');
retVal.child.stdin.write('$objBalloon.Visible = $True\r\n');
retVal.child.stdin.write('Register-ObjectEvent -InputObject $objBalloon -EventName BalloonTipClosed -Action { Write-Host "<`DISMISSED`>" }')
retVal.child.stdin.write('Register-ObjectEvent -InputObject $objBalloon -EventName BalloonTipClosed -Action { $objBalloon.dispose();Write-Host "<`DISMISSED`>" }')
retVal.child.stdin.write('$objBalloon.ShowBalloonTip(10000,"' + title + '", "' + caption + '", 0)\r\n');
retVal.child.on('exit', function () { this.toast._res('DISMISSED'); });
return (retVal);