Creating a SideShow Menu Page


A device that implements the SideShow interface will have navigation keys, by which the user can move items around on a display. It will also have a Select key and a Menu key, as well as a Back key that allows the user to exit from a page. These allow the user to navigate content that the device has downloaded. You can create menu items on the display so that the user can select downloaded content.

 memoGadget.AddContent(    Scf.Menu(       1,       "Main Menu",       ScfSelectAction.Target,       Scf.Item(100, "Active Locations"),       Scf.Item(101, "Duty Roster"),       Scf.Item(102, "Archive"),       Scf.Div(),       Scf.Item(103, "Help")    ) ); 

This code creates a page of content that will display a menu. The items specify the ID numbers of the destination content pages.

Figure 8-13 shows the menu page. The user can select a destination content page by using the Up and Down keys to navigate to the required option and then pressing the Select key.

image from book
Figure 8-13: A menu page.

You can also add items to a menu that will allow the user to navigate to content pages just by pressing one of the keys on the SideShow device.

 memoGadget.AddContent(    Scf.Menu(       1,       "Main Menu",       ScfSelectAction.Target,       Scf.Item(100, "Active Locations"),       Scf.Item(101, "Duty Roster"),       Scf.Item(102, "Archive"),       Scf.Div(),       Scf.Item(103, "Help"),       Scf.Btn(DeviceButton.Right,"Active Locations",100),       Scf.Btn(DeviceButton.Left, "Duty Roster", 101)    ) ); 

This code produces exactly the same display as the previous menu, but if the user presses the Left key, the display moves to the Active Locations page, and if the user presses the Right key, the display moves to the Duty Roster page.




Embedded Programming with the Microsoft .Net Micro Framework
Embedded Programming with the Microsoft .NET Micro Framework
ISBN: 0735623651
EAN: 2147483647
Year: 2007
Pages: 118

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net