Skip to content
ConsoleMonster

API Reference

Class

FormPage

Namespace ConsoleMonster.Interactive
Assembly ConsoleMonster
Modifiers sealed

A page of a form.

Inheritance

  • Object
  • FormPage

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 1

Constructors

public FormPage(String title) #

Creates a page.

Parameters

title System.String requiredposition: 0
The title.

Methods

public T Add<T>(T field) #
Returns: T

Adds a field.

Type Parameters

T
The field type.

Parameters

field T requiredposition: 0
The field.

Returns

The field.

public ChoiceField MultiSelect(String name, String? label = null, IEnumerable<Choice>? choices = null) #
Returns: ChoiceField

Adds a multi-choice field.

Parameters

name System.String requiredposition: 0
The key.
label System.String? = null optionalposition: 1
The label.
choices System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice>? = null optionalposition: 2
The choices.

Returns

The field.

public NumberField Number(String name, String? label = null) #
Returns: NumberField

Adds a number field.

Parameters

name System.String requiredposition: 0
The key.
label System.String? = null optionalposition: 1
The label.

Returns

The field.

public PathField Path(String name, String? label = null) #
Returns: PathField

Adds a path field.

Parameters

name System.String requiredposition: 0
The key.
label System.String? = null optionalposition: 1
The label.

Returns

The field.

public SecretField Secret(String name, String? label = null) #
Returns: SecretField

Adds a secret field.

Parameters

name System.String requiredposition: 0
The key.
label System.String? = null optionalposition: 1
The label.

Returns

The field.

public ChoiceField Select(String name, String? label = null, IEnumerable<Choice>? choices = null) #
Returns: ChoiceField

Adds a single-choice field.

Parameters

name System.String requiredposition: 0
The key.
label System.String? = null optionalposition: 1
The label.
choices System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice>? = null optionalposition: 2
The choices.

Returns

The field.

public TextField Text(String name, String? label = null) #
Returns: TextField

Adds a text field.

Parameters

name System.String requiredposition: 0
The key.
label System.String? = null optionalposition: 1
The label.

Returns

The field.

public TextAreaField TextArea(String name, String? label = null) #
Returns: TextAreaField

Adds a field for several lines of text.

Parameters

name System.String requiredposition: 0
The key.
label System.String? = null optionalposition: 1
The label.

Returns

The field.

public ToggleField Toggle(String name, String? label = null) #
Returns: ToggleField

Adds a toggle.

Parameters

name System.String requiredposition: 0
The key.
label System.String? = null optionalposition: 1
The label.

Returns

The field.

Properties

public String Title { get; set; } #

The title (also shown in the progress strip).

public String? Description { get; set; } #

A sentence under the title.

public IList<Field> Fields { get; } #

The fields.