Skip to content
ConsoleMonster
Class

FormFluent

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
static
Attributes
GeneratedCode("ConsoleMonster.Generators", "1.0.0")

The fluent methods of Form, generated from its public properties: A property-named method sets a property and Add... adds to a collection, both returning the same instance.

Inheritance

  • object
  • FormFluent

Methods

public static Form AddPage(Form form, FormPage item) #

Adds an item to Form.Pages: The pages, in order.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
item ConsoleMonster.Interactive.FormPage required
The item.

Returns

Form The same instance.
AddPages 2 overloads
public static Form AddPages(Form form, params FormPage[] items) #

Adds items to Form.Pages: The pages, in order.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
items ConsoleMonster.Interactive.FormPage[] required
The items, in order.

Returns

Form The same instance.
public static Form AddPages(Form form, IEnumerable<FormPage> items) #

Adds items to Form.Pages: The pages, in order.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.FormPage> required
The items, in order.

Returns

Form The same instance.
public static Form AddPreset(Form form, FormPreset item) #

Adds an item to Form.Presets: The presets the form comes with: listed before the presets people save, marked as built in, never overwritten or deleted, and applied the same way (by FormOptions.Preset or the menu's command palette). A saved preset whose name matches a built-in one (ignoring case) is hidden.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
item ConsoleMonster.Interactive.FormPreset required
The item.

Returns

Form The same instance.
AddPresets 2 overloads
public static Form AddPresets(Form form, params FormPreset[] items) #

Adds items to Form.Presets: The presets the form comes with: listed before the presets people save, marked as built in, never overwritten or deleted, and applied the same way (by FormOptions.Preset or the menu's command palette). A saved preset whose name matches a built-in one (ignoring case) is hidden.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
items ConsoleMonster.Interactive.FormPreset[] required
The items, in order.

Returns

Form The same instance.
public static Form AddPresets(Form form, IEnumerable<FormPreset> items) #

Adds items to Form.Presets: The presets the form comes with: listed before the presets people save, marked as built in, never overwritten or deleted, and applied the same way (by FormOptions.Preset or the menu's command palette). A saved preset whose name matches a built-in one (ignoring case) is hidden.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.FormPreset> required
The items, in order.

Returns

Form The same instance.
public static Form Command(Form form, string? value) #

Sets Form.Command: The command the equivalent command line starts with (Install-Toolbox, toolbox install).

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
value string? required
The value.

Returns

Form The same instance.

Examples

// C# initializer or property    // C# fluent
form.Command = value;            Ui.Form().Command(value);
public static Form CommandStyle(Form form, CommandStyle value) #

Sets Form.CommandStyle: How the equivalent command line is written.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
value ConsoleMonster.Interactive.CommandStyle required
The value.

Returns

Form The same instance.

Examples

// C# initializer or property    // C# fluent
form.CommandStyle = value;       Ui.Form().CommandStyle(value);
public static Form Description(Form form, string? value) #

Sets Form.Description: A sentence under the title.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
value string? required
The value.

Returns

Form The same instance.

Examples

// C# initializer or property    // C# fluent
form.Description = value;        Ui.Form().Description(value);
Review 2 overloads
public static Form Review(Form form, bool value) #

Sets Form.Review: Whether a review page (summary, equivalent command, run) comes after the last page.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
value bool required
The value.

Returns

Form The same instance.

Examples

// C# initializer or property    // C# fluent
form.Review = value;             Ui.Form().Review(value);
public static Form Review(Form form) #

Sets Form.Review to true.

Parameters

form ConsoleMonster.Interactive.Form required
The instance to configure.

Returns

Form The same instance.
public static Form StorageKey(Form form, string? value) #

Sets Form.StorageKey: The key presets and remembered choices are stored under; null uses the title.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
value string? required
The value.

Returns

Form The same instance.

Examples

// C# initializer or property    // C# fluent
form.StorageKey = value;         Ui.Form().StorageKey(value);
public static Form SubmitText(Form form, string? value) #

Sets Form.SubmitText: The caption of the button that submits the form; null uses "Run".

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
value string? required
The value.

Returns

Form The same instance.

Examples

// C# initializer or property    // C# fluent
form.SubmitText = value;         Ui.Form().SubmitText(value);
public static Form Title(Form form, string value) #

Sets Form.Title: The title.

Parameters

form ConsoleMonster.Interactive.Form required
The instance.
value string required
The value.

Returns

Form The same instance.

Examples

// C# initializer or property    // C# fluent
form.Title = value;              Ui.Form().Title(value);