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
question
stringThe question to ask the user.
min
intThe minimum value of the selector.
max
intThe maximum value of the selector.
start
intThe start value of the selector.
step
intThe step of the selector.
placement
PlacementThe placement of the selector on the console.
bordersType
BordersTypeThe 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
bordersType
BordersTypeThe 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
leftSelector
charThe 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
max
intThe 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
min
intThe 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
placement
PlacementThe 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
question
stringThe 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
rightSelector
charThe 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
start
intThe 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
step
intThe step of the selector.
Remarks
For more information, consider visiting the documentation available here.