Class ShowMessageBox
- Namespace
- Acuit.Pinpoint.Workflows.Workstation.Activities
- Assembly
- Acuit.Pinpoint.Workflows.Workstation.dll
An activity that displays a message in a popup message box.
public class ShowMessageBox : Activity<MessageBoxResult>, IActivity
- Inheritance
-
ShowMessageBox
- Implements
- Inherited Members
Remarks
The result value will be a MessageBoxResult with the message box result.
This activity requires the IUserInterfaceService service (automatically provided by Acuit Pinpoint Workstation).
Properties
Buttons
Gets or sets the button(s) to show in the message box. This defaults to OK.
public ValueSource<MessageBoxButton> Buttons { get; set; }
Property Value
Icon
Gets or sets the icon shown in the message box. This defaults to Information.
public ValueSource<MessageBoxImage> Icon { get; set; }
Property Value
Message
Gets or sets the message. This is required.
public ValueSource<string> Message { get; set; }
Property Value
Methods
OnExecuteAsync(ActivityContext, CancellationToken)
Derived classes must implement this to perform the activity.
protected override Task<MessageBoxResult> OnExecuteAsync(ActivityContext context, CancellationToken cancellationToken)
Parameters
context
ActivityContextThe activity context.
cancellationToken
CancellationTokenThe cancellation token used to request canceling the activity.
Returns
- Task<MessageBoxResult>
A task that represents the asynchronous operation. The value of its Result property contains the result.
Exceptions
- ArgumentNullException
context
is null.- InvalidOperationException
A service required by the activity is not available, or a required activity property value is not set.
- Exception
An error occurred while performing the activity.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Remarks
This is expected to produce a string suitable for labeling this activity in a workflow diagram. It should be as specific as possible, but while keeping it very short. In general, it should be the short name of the class (as that is how it would typically be defined in the workflow XAML), optionally followed by other property values of interest in a diagram. The default implementation returns the short name of the class.