MessageBox
class cAlgo.API
DesktopCLICloud
A message dialog window that you can use to show a message with buttons
Environment behaviour
CLI — not supported. Nothing is shown; Show returns MessageBoxResult.None immediately.
Cloud — not supported. Nothing is shown; Show returns MessageBoxResult.None immediately.
Definition
public static class MessageBox
Namespace: cAlgo.API · Group: Windows
Examples
var result = MessageBox.Show("Close all open positions?", "Confirm", MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result == MessageBoxResult.Yes)
{
foreach (var position in Positions.ToArray())
ClosePosition(position);
}
result = MessageBox.Show("Close all open positions?", "Confirm", MessageBoxButton.YesNo, MessageBoxImage.Question)
if result == MessageBoxResult.Yes:
for position in list(api.Positions):
api.ClosePosition(position)
Methods
| Name | Description |
|---|---|
Show 10 overloadsDesktopCLICloudMessageBoxResult | Shows a MessageBox with just a text |