Show/Hide Toolbars

Inventu Viewer+ .NET Programmer's Reference

Navigation: HostScreen Class > Methods

getScreenID Method

Scroll Prev Top Next More

Return the unique integer for this screen.  Will match the ScreenID enumeration for the assembly generated by the Mapper utility.

 

integer HostScreen.getScreenID()

 

Arguments

 

HostScreen

 Required. HostScreen object.

 

Returns

 

The integer value starting with 1 corresponding to the ScreenID enumeration in the active generated screen definition helper assembly created by the Inventu Viewer+ Studio or Mapper application.

 

Returns 0 if the screen is not recognized (default).

 

Remarks

 

With the IOHelper [projectname]Maps class generated by Inventu Viewer+ Studio or the Mapper application, a ScreenID enumeration is created that is based on the recursion through the active screen definition file's screens.  In this enumeration, each screen has a unique ID that is integer based.

 

By using the integer-based ScreenID instead of text-based screen names, recognition as well as lists of screens can be more efficiently handled.  In addition, for the developer, the ScreenID enumeration provides "spell-proof" coding since the screen names are all listed in the enumeration and are readily available to the Intellisense in Visual Studio.

 

 

Example

 

 

ScreenID activeScreen;

activeScreen=(ScreenID) oScreen.getScreenID();

if (activeScreen != ScreenID.ComplicatedNameThatIsEasyToFindWithIntellisense)

 Throw new System.Exception("Not the right screen!");

 

Requirements

 

Inventu Viewer+

 

Applies To: HostScreen object

 


© 2022 Inventu Corporation