Easy to use Boolean getter.
Namespace:
Rhino.Input
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 5.0
Syntax public static Result GetBool(
string prompt,
bool acceptNothing,
string offPrompt,
string onPrompt,
ref bool boolValue
)
Public Shared Function GetBool (
prompt As String,
acceptNothing As Boolean,
offPrompt As String,
onPrompt As String,
ByRef boolValue As Boolean
) As Result
Parameters
- prompt
- Type: SystemString
Command prompt. - acceptNothing
- Type: SystemBoolean
If true, the user can press enter. - offPrompt
- Type: SystemString
The 'false/off' message. - onPrompt
- Type: SystemString
The 'true/on' message. - boolValue
- Type: SystemBoolean
Default Boolean value set to this and returned here.
Return Value
Type:
ResultThe getter result based on user choice.
Commands.Result.Success - got value.
Commands.Result.Nothing - user pressed enter.
Commands.Result.Cancel - user canceled value getting.
See Also