Class Dialogs
Modal dialogs; call on the UI thread.
Namespace: Uniform.Matrix.Gui.Terminal
Assembly: Uniform.Matrix.Gui.Terminal.dll
public static class Dialogs
Methods
|
Edit this page
View Source
Ask for one line of text; return null when cancelled or left empty.
Declaration
public static string? Ask(IApplication app, string title, string label, string initial = "", bool secret = false)
Parameters
| Type |
Name |
Description |
| IApplication |
app |
Running application.
|
| string |
title |
Dialog title.
|
| string |
label |
Prompt above the field.
|
| string |
initial |
Initial text.
|
| bool |
secret |
Whether to mask input, e.g. for passwords.
|
Returns
|
Edit this page
View Source
Ask for one line of text that may be empty; return null only when cancelled.
Declaration
public static string? AskAllowEmpty(IApplication app, string title, string label, string initial = "")
Parameters
Returns
|
Edit this page
View Source
Let the user pick one of options; return its index, or null when closed.
Declaration
public static int? Choose(IApplication app, string title, string message, IReadOnlyList<string> options)
Parameters
Returns
|
Edit this page
View Source
Ask a yes or no question; return true for yes.
Declaration
public static bool Confirm(IApplication app, string title, string message)
Parameters
| Type |
Name |
Description |
| IApplication |
app |
|
| string |
title |
|
| string |
message |
|
Returns
|
Edit this page
View Source
Show an error with an OK button.
Declaration
public static void Error(IApplication app, string title, string message)
Parameters
| Type |
Name |
Description |
| IApplication |
app |
|
| string |
title |
|
| string |
message |
|
|
Edit this page
View Source
Show a message with an OK button.
Declaration
public static void Info(IApplication app, string title, string message)
Parameters
| Type |
Name |
Description |
| IApplication |
app |
|
| string |
title |
|
| string |
message |
|
|
Edit this page
View Source
Let the user pick an existing file; return its path, or null when cancelled.
Declaration
public static string? PickFile(IApplication app, string title)
Parameters
| Type |
Name |
Description |
| IApplication |
app |
|
| string |
title |
|
Returns
|
Edit this page
View Source
Let the user pick a row of rows, below message; return its index, or null when cancelled or empty.
Declaration
public static int? PickIndex(IApplication app, string title, string message, IReadOnlyList<string> rows)
Parameters
Returns
|
Edit this page
View Source
Let the user pick one of options; the current value is marked and selected. Returns null when cancelled.
Declaration
public static string? PickOne(IApplication app, string title, IReadOnlyList<string> options, string? current)
Parameters
Returns
|
Edit this page
View Source
Show text in a read-only field that can be selected and copied, e.g. a recovery key.
Declaration
public static void ShowCopyable(IApplication app, string title, string message, string text)
Parameters
|
Edit this page
View Source
ShowText(IApplication, string, string)
Show long read-only text, e.g. a log entry with its stack trace.
Declaration
public static void ShowText(IApplication app, string title, string text)
Parameters
| Type |
Name |
Description |
| IApplication |
app |
|
| string |
title |
|
| string |
text |
|