Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding snooze time to snooze option #71

Open
zebulun78 opened this issue Jun 13, 2019 · 5 comments
Open

Binding snooze time to snooze option #71

zebulun78 opened this issue Jun 13, 2019 · 5 comments

Comments

@zebulun78
Copy link

@zebulun78 zebulun78 commented Jun 13, 2019

I am having trouble figuring this one out. I see this is supposed to be able to be bound but with a lack of example I have been unable to figure out just how to do that. I have a dropdown with 4 time options, and want to bind the output to the snooze option.

Cheers!

@zebulun78

This comment has been minimized.

Copy link
Author

@zebulun78 zebulun78 commented Jun 13, 2019

I think I figured it out.

$SnoozeOption1 = New-BTSelectionBoxItem -Id '60' -Content '1 Hour'

This is how it seems to work. You pass the minutes in the Id. This was not clear in the documentation. It would be great if you added some examples that included of the Submit-BTNotification scenarios.

@Windos

This comment has been minimized.

Copy link
Owner

@Windos Windos commented Jun 16, 2019

Yeah, sorry about this, documentation is going to be my big focus for the next few weeks to months covering scenarios like this in better (or ANY in some cases) detail.

If you're still having issues with this in general let me know and I can probably do a blog post on it specifically.

@RichardDee

This comment has been minimized.

Copy link

@RichardDee RichardDee commented Oct 30, 2019

I am not zebulun78, but I would be happy if you do a blog post on it specifically, because I thought that you cant retrieve the selected data from a SelectionBox due to not being able to subscribe to WinRT events in PowerShell as said in " #26 ".

@Windos

This comment has been minimized.

Copy link
Owner

@Windos Windos commented Oct 30, 2019

Sorry, yeah I'll get a blog post done on this topic... have bumped it up my list. If it's not the next one it'll be the one after.

In general though, the snooze thing is probably the one and only area where selection boxes work. That's because it's the system/API itself using the selection, not PowerShell.

@RichardDee

This comment has been minimized.

Copy link

@RichardDee RichardDee commented Oct 31, 2019

Thats fine enough! I use the BurntToast Module to pop a toastnotification as soon as the computer needs a reboot (to ensure proper software installations). The first button is already created and executes a Restart.exe which is defined within the registry and the second button should postpone the notication and the snooze function would be a valid solution to re-pop the notification in x minutes/hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.