You can send a pop-up notification display to a SideShow device using the ShowNotification method.
Icon icon = new Icon(@"C:\Program Files\FlashlightMemo\flashlight.ico"); memoGadget.ShowNotification( 1, // Notification ID "Alarm Triggered", // Notification heading "Intruder Sector 7G", // Notification body icon, // Notification icon new TimeSpan(0, 0, 20)); // display duration
This code creates a notification that remains on the display for 20 seconds (the size of the TimeSpan) or until the user cancels it. The final parameter could instead be a DateTime value that gives the time at which the notification would cancel. You can give the message a particular icon design to give the user more detail about the event described by the notification. Figure 8-12 shows the form that the notification would take on the display of a target device.
Figure 8-12: A notification display.
You can revoke a notification, or all notifications, on connected SideShow devices by calling the methods RevokeNotification or RevokeAllNotifications. You must give the RevokeNotification method the ID number of the notification that you want revoked.