Class IntSelector
- Namespace
- ConsoleAppVisuals.InteractiveElements
- Assembly
- ConsoleAppVisuals.dll
The IntSelector is an interactive element that allows the user to select an integer value from a range of values.
public class IntSelector : InteractiveElement<int>
- Inheritance
-
IntSelector
- Inherited Members
Remarks
For more information, consider visiting the documentation available here.
Constructors
IntSelector(string, int, int, int, int, Placement, BordersType)
The IntSelector is an interactive element that allows the user to select an integer value from a range of values.
public IntSelector(string question, int min, int max, int start, int step, Placement placement = Placement.TopCenter, BordersType bordersType = BordersType.SingleStraight)
Parameters
questionstringThe question to ask the user.
minintThe minimum value of the selector.
maxintThe maximum value of the selector.
startintThe start value of the selector.
stepintThe step of the selector.
placementPlacementThe placement of the selector on the console.
bordersTypeBordersTypeThe border type of the selector.
Remarks
For more information, consider visiting the documentation available here.
Properties
Borders
Gets the borders manager of the selector.
public Borders Borders { get; }
Property Value
BordersType
Gets the border type of the selector.
public BordersType BordersType { get; }
Property Value
Height
Gets the height of the selector.
public override int Height { get; }
Property Value
LeftSelector
Gets the left selector of the selector.
public char LeftSelector { get; }
Property Value
Max
Gets the maximum value of the selector.
public int Max { get; }
Property Value
Min
Gets the minimum value of the selector.
public int Min { get; }
Property Value
Placement
Gets the placement of the selector on the console.
public override Placement Placement { get; }
Property Value
Question
Gets the question to ask the user.
public string Question { get; }
Property Value
RightSelector
Gets the right selector of the selector.
public char RightSelector { get; }
Property Value
Start
Gets the start value of the selector.
public int Start { get; }
Property Value
Step
Gets the step of the selector.
public int Step { get; }
Property Value
Width
Gets the width of the selector.
public override int Width { get; }
Property Value
Methods
RenderElementActions()
Defines the actions to perform when the element is called to be rendered on the console.
[Visual]
protected override void RenderElementActions()
UpdateBordersType(BordersType)
Updates the border type of the selector.
public void UpdateBordersType(BordersType bordersType)
Parameters
bordersTypeBordersTypeThe border type of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateLeftSelector(char)
Updates the selector of the selector.
public void UpdateLeftSelector(char leftSelector = '▶')
Parameters
leftSelectorcharThe new left selector of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateMax(int)
Updates the maximum value of the selector.
public void UpdateMax(int max)
Parameters
maxintThe maximum value of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateMin(int)
Updates the minimum value of the selector.
public void UpdateMin(int min)
Parameters
minintThe minimum value of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdatePlacement(Placement)
Updates the placement of the selector.
public void UpdatePlacement(Placement placement)
Parameters
placementPlacementThe placement of the selector on the console.
Remarks
For more information, consider visiting the documentation available here.
UpdateQuestion(string)
Updates the question of the selector.
public void UpdateQuestion(string question)
Parameters
questionstringThe question to ask the user.
Remarks
For more information, consider visiting the documentation available here.
UpdateRightSelector(char)
Updates the selector of the selector.
public void UpdateRightSelector(char rightSelector = '◀')
Parameters
rightSelectorcharThe new right selector of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateStart(int)
Updates the start value of the selector.
public void UpdateStart(int start)
Parameters
startintThe start value of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateStep(int)
Updates the step of the selector.
public void UpdateStep(int step)
Parameters
stepintThe step of the selector.
Remarks
For more information, consider visiting the documentation available here.