Add Tray Icon + Toast Notification service #13
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a client to the client (client-ception).
The actual desktop client runs as a local system background server and does not have rights to interact with the user's desktop session (i.e. sending it notifications). So, this PR adds an additional application called
Lanpartyseating.Desktop.Tray
which starts on login and displays a simple tray icon with a tooltip showing how much time is left.This tray app communicates with the main application via a named pipe called
\\.\pipe\Lanpartyseating.Desktop
. The service starts a server on this pipe and the tray app is the client. The two communicated over this pipe using a very simple JSON-based protocol.On login, the tray will display a Task Dialog informing the user that the session will last x minutes from the point their badge was scanned at the entrance. It also informs them the exact time they will be logged out at. This dialog is persistent until dismissed with an "Ok" button so that it stays visible until the gamer is in front of the computer. This is necessary because the session will be signed in immediately after a user scans their badge. It will take a few minutes for the gamer to make their way from the entrance to the pc, where they will immediately be faced with the dialog.
Over time, non-intrusive "Toast" notifications that do not steal focus will be sent to the gamer to remind them at 10 minute and 2 minute countdown intervals that their session is ending soon. They will also be sent toasts if their reservation time is extended from the seating management page in the web app.