This member of Class WaveLinkMenu is supported on Windows Mobile, Windows CE, Palm, and DOS.
The DoMenu Method executes a menu file from a device's non-volatile memory and returns the selected option to your application.
Syntax
public int DoMenu(String fileName)
throws WaveLinkError,
IllegalArgumentException
Parameters
fileName |
The menu file to be executed |
Returns
The numeric value of the option selected
Throws
WaveLinkError
IllegalArgumentException
Remarks
You may pass a file name up to eight characters in length.
The DoMenu Method returns -1 if CLR is pressed and -2 if an error is encountered
The DoMenu Method returns the numeric value of the option line selected by the user to your application. For example, if you have a menu with a total of three options and the user selects the second option in the menu, the number 2 is returned to your application.
Example
WaveLinkIO ioIface = new WaveLinkIO();
WaveLinkMenu mnuIface = new WaveLinkMenu();
string nTmp;
try {
mnuIface.ResetMenu();
mnuIface.MenuWidth(18);
mnuIface.AddOption("Option 1");
mnuIface.AddOption("Option 2");
mnuIface.AddOption("Option 3");
mnuIface.AddOption("Option 4");
mnuIface.AddTitleLine("Demonstration");
mnuIface.SetCoordinates(0, 1, 20, 6);
//The menu must be stored on the device
// before it may be used.
mnuIface.StoreMenu("MainMenu");
.
.
.
nTmp = mnuIface.DoMenu("MainMenu");
}
catch (WaveLinkError wlErr) {
//Do error handling
}
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other