Share via


Simple Dialog

Glossary Item Box

Microsoft Robotics Developer Studio Send feedback on this topic

Simple Dialog

Simple Dialog

Simple Dialog - Icon

The Simple Dialog service provides an easy way to create one of three simple Windows dialog boxes. The service’s requests determine the format of dialog displayed.

  • AlertDialog - Displays a text message dialog containing an OK button with an Exclamation Mark icon.
  • ConfirmDialog - Displays a text message dialog containing OK and Cancel buttons with a Question Mark icon.
  • PromptDialog - Displays a text message dialog containing a textbox (for input), OK and Cancel buttons, and a Question Mark icon.

These dialogs are intended to present simple lightweight messages. They time out if you do not respond within 60 seconds. When the timeout is imminent, a message is displayed in the bottom-left of the dialog with a countdown. If you do not respond before the countdown expires, then the dialog will be automatically canceled.

AlertDialog

The AlertDialog request expects a string as incoming data for the AlertText displayed when the dialog appears. The text cannot be edited by the user.

The dialog waits for the user to click on the OK button before sending a response back. No information is included in its Success response.

If the dialog times out, it will automatically disappear.

ConfirmDialog

The ConfirmDialog request expects a string as incoming data for the ConfirmText displayed when the dialog appears. The text cannot be edited by the user.

The dialog waits for the user to click on the OK or Cancel button before sending a response back. It returns a Boolean value in its Success response called Confirmed that is set to true if the OK button was pressed, or false if the Cancel button was pressed. Clicking the dialog’s title bar Close button (the 'X' in the top-right corner) also returns false.

If the dialog times out, it acts as though the user clicked on Cancel.

PromptDialog

The PromptDialog expects two strings as its incoming data for PromptText (displayed in the dialog) and DefaultValue (displayed in a textbox as the initial value).

The dialog waits for the user to click on a button before sending a response back. The Prompt dialog returns a string called TextData which contains the text that the user entered into the textbox if the OK button was pressed. The dialog also returns true for the Confirmed Boolean value in its Success response or false if the Cancel button (or title bar Close button) was pressed.

If the dialog times out, it acts as though the user clicked on Cancel

 

 

© 2012 Microsoft Corporation. All Rights Reserved.