Displaying Notifications

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 ...

Get Embedded Programming with the Microsoft® .NET Micro Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.