Method ErrorQuery
ErrorQuery(IApplication?, int, int, string, string, params string[])
Displays an error MessageBox with fixed dimensions.
public static int? ErrorQuery(IApplication? app, int width, int height, string title, string message, params string[] buttons)
Parameters
appIApplicationThe application instance. If null, uses TopRunnableView.
widthintWidth for the MessageBox.
heightintHeight for the MessageBox.
titlestringTitle for the MessageBox.
messagestringMessage to display. May contain multiple lines and will be word-wrapped.
buttonsstring[]Array of button labels.
Returns
Remarks
Consider using ErrorQuery(IApplication?, string, string, params string[]) which automatically sizes the MessageBox.
Exceptions
- ArgumentNullException
Thrown if
appis null.
ErrorQuery(IApplication?, string, string, params string[])
Displays an auto-sized error MessageBox.
public static int? ErrorQuery(IApplication? app, string title, string message, params string[] buttons)
Parameters
appIApplicationThe application instance. If null, uses TopRunnableView.
titlestringTitle for the MessageBox.
messagestringMessage to display. May contain multiple lines and will be word-wrapped.
buttonsstring[]Array of button labels.
Returns
Remarks
The MessageBox is centered and auto-sized based on title, message, and buttons.
Exceptions
- ArgumentNullException
Thrown if
appis null.
ErrorQuery(IApplication?, int, int, string, string, int, params string[])
Displays an error MessageBox with fixed dimensions and a default button.
public static int? ErrorQuery(IApplication? app, int width, int height, string title, string message, int defaultButton = 0, params string[] buttons)
Parameters
appIApplicationThe application instance. If null, uses TopRunnableView.
widthintWidth for the MessageBox.
heightintHeight for the MessageBox.
titlestringTitle for the MessageBox.
messagestringMessage to display. May contain multiple lines and will be word-wrapped.
defaultButtonintIndex of the default button (0-based).
buttonsstring[]Array of button labels.
Returns
Remarks
Consider using ErrorQuery(IApplication?, string, string, int, params string[]) which automatically sizes the MessageBox.
Exceptions
- ArgumentNullException
Thrown if
appis null.
ErrorQuery(IApplication?, string, string, int, params string[])
Displays an auto-sized error MessageBox with a default button.
public static int? ErrorQuery(IApplication? app, string title, string message, int defaultButton = 0, params string[] buttons)
Parameters
appIApplicationThe application instance. If null, uses TopRunnableView.
titlestringTitle for the MessageBox.
messagestringMessage to display. May contain multiple lines and will be word-wrapped.
defaultButtonintIndex of the default button (0-based).
buttonsstring[]Array of button labels.
Returns
Remarks
The MessageBox is centered and auto-sized based on title, message, and buttons.
Exceptions
- ArgumentNullException
Thrown if
appis null.
ErrorQuery(IApplication?, int, int, string, string, int, bool, params string[])
Displays an error MessageBox with fixed dimensions, a default button, and word-wrap control.
public static int? ErrorQuery(IApplication? app, int width, int height, string title, string message, int defaultButton = 0, bool wrapMessage = true, params string[] buttons)
Parameters
appIApplicationThe application instance. If null, uses TopRunnableView.
widthintWidth for the MessageBox.
heightintHeight for the MessageBox.
titlestringTitle for the MessageBox.
messagestringMessage to display. May contain multiple lines.
defaultButtonintIndex of the default button (0-based).
wrapMessageboolIf true, word-wraps the message; otherwise displays as-is with multi-line support.
buttonsstring[]Array of button labels.
Returns
Remarks
Consider using ErrorQuery(IApplication?, string, string, int, bool, params string[]) which automatically sizes the MessageBox.
Exceptions
- ArgumentNullException
Thrown if
appis null.
ErrorQuery(IApplication?, string, string, int, bool, params string[])
Displays an auto-sized error MessageBox with a default button and word-wrap control.
public static int? ErrorQuery(IApplication? app, string title, string message, int defaultButton = 0, bool wrapMessage = true, params string[] buttons)
Parameters
appIApplicationThe application instance. If null, uses TopRunnableView.
titlestringTitle for the MessageBox.
messagestringMessage to display. May contain multiple lines.
defaultButtonintIndex of the default button (0-based).
wrapMessageboolIf true, word-wraps the message; otherwise displays as-is with multi-line support.
buttonsstring[]Array of button labels.
Returns
Remarks
The MessageBox is centered and auto-sized based on title, message, and buttons.
Exceptions
- ArgumentNullException
Thrown if
appis null.