MenuPreset
ConsoleMonster.Interactive
A preset the app comes with (Menu.Presets): selections of selection items and values of forms under one name. A MenuItem.Presets item lists it before the presets people save, marked as built in; it cannot be overwritten or deleted, and applying it changes what it names the way a saved preset does (items and fields it does not name keep their values). Configure it with the chainable methods: preset.Selection(targets, "SRV01", "SRV02").Form(patch, values).
Inheritance
- object
- MenuPreset
Usage
Explore 16 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 7
- Property Menu.Presets
- Extension method MenuPreset.Description
- Extension method MenuPreset.Preview
- Method MenuPreset.Form
- Method MenuPreset.Selection
- Method MenuPresetFluent.Description
- Method MenuPresetFluent.Preview
Accepted by parameters 9
- Extension method Menu.Preset
- Extension method Menu.Presets
- Method Menu.Preset
- Method MenuFluent.Preset
- Method MenuFluent.Presets
- Extension method MenuPreset.Description
- Extension method MenuPreset.Preview
- Method MenuPresetFluent.Description
- Method MenuPresetFluent.Preview
Constructors
public MenuPreset(string name) #Creates a built-in preset.
Parameters
- name string
- The name; a saved preset cannot take it.
Methods
public MenuPreset Form(Form form, IDictionary<string, object?> values) #Sets field values of a form opened from the menu (see Form.Apply for how they apply).
Parameters
- form ConsoleMonster.Interactive.Form
- The form.
- values System.Collections.Generic.IDictionary<string, object?>
- Values by field name, as the fields take them: a string, a number, a bool, or a list for a multi-choice field.
public override string ToString() #Returns a string that represents the current object.
Returns
string A string that represents the current object.