Class MessageBox
Shows message boxes.
Inheritance
Inherited Members
Namespace: Cosmos.VS.DebugEngine.Utilities
Assembly: Cosmos.VS.DebugEngine.dll
Syntax
public class MessageBox
Methods
| Improve this Doc View SourceShow(String, String, OLEMSGICON, OLEMSGBUTTON, OLEMSGDEFBUTTON)
Shows a message box that is parented to the main Visual Studio window.
Declaration
public MessageBoxResult Show(string line1, string line2 = "", OLEMSGICON icon = null, OLEMSGBUTTON buttons = null, OLEMSGDEFBUTTON defaultButton = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | line1 | |
System.String | line2 | |
OLEMSGICON | icon | |
OLEMSGBUTTON | buttons | |
OLEMSGDEFBUTTON | defaultButton |
Returns
Type | Description |
---|---|
MessageBoxResult | The result of which button on the message box was clicked. |
Examples
VS.MessageBox.Show("Title", "The message");
|
Improve this Doc
View Source
ShowAsync(String, String, OLEMSGICON, OLEMSGBUTTON, OLEMSGDEFBUTTON)
Shows a message box that is parented to the main Visual Studio window.
Declaration
public async Task<MessageBoxResult> ShowAsync(string line1, string line2 = "", OLEMSGICON icon = null, OLEMSGBUTTON buttons = null, OLEMSGDEFBUTTON defaultButton = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | line1 | |
System.String | line2 | |
OLEMSGICON | icon | |
OLEMSGBUTTON | buttons | |
OLEMSGDEFBUTTON | defaultButton |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<MessageBoxResult> | The result of which button on the message box was clicked. |
Examples
await VS.MessageBox.ShowAsync("Title", "The message");
|
Improve this Doc
View Source
ShowConfirm(String, String)
Shows a yes/no/cancel message box.
Declaration
public bool ShowConfirm(string line1, string line2 = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | line1 | |
System.String | line2 |
Returns
Type | Description |
---|---|
System.Boolean | true if the user clicks the 'Yes' button. |
ShowConfirmAsync(String, String)
Shows a yes/no/cancel message box.
Declaration
public async Task<bool> ShowConfirmAsync(string line1, string line2 = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | line1 | |
System.String | line2 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | true if the user clicks the 'Yes' button. |
ShowError(String, String)
Shows an error message box.
Declaration
public MessageBoxResult ShowError(string line1, string line2 = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | line1 | |
System.String | line2 |
Returns
Type | Description |
---|---|
MessageBoxResult | The result of which button on the message box was clicked. |
ShowErrorAsync(String, String)
Shows an error message box.
Declaration
public async Task<MessageBoxResult> ShowErrorAsync(string line1, string line2 = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | line1 | |
System.String | line2 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<MessageBoxResult> | The result of which button on the message box was clicked. |
ShowWarning(String, String)
Shows a warning message box.
Declaration
public MessageBoxResult ShowWarning(string line1, string line2 = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | line1 | |
System.String | line2 |
Returns
Type | Description |
---|---|
MessageBoxResult | The result of which button on the message box was clicked. |
ShowWarningAsync(String, String)
Shows a warning message box.
Declaration
public async Task<MessageBoxResult> ShowWarningAsync(string line1, string line2 = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | line1 | |
System.String | line2 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<MessageBoxResult> | The result of which button on the message box was clicked. |