Class FakeLoadingBar
- Namespace
- ConsoleAppVisuals.AnimatedElements
- Assembly
- ConsoleAppVisuals.dll
The FakeLoadingBar is an animated element that simulates a loading bar with a fixed duration.
public class FakeLoadingBar : AnimatedElement
- Inheritance
-
FakeLoadingBar
- Inherited Members
Remarks
For more information, consider visiting the documentation available here.
Constructors
FakeLoadingBar(string, Placement, int, int)
The FakeLoadingBar is an animated element that simulates a loading bar with a fixed duration.
public FakeLoadingBar(string text = "[ Loading ...]", Placement placement = Placement.TopCenter, int processDuration = 2000, int additionalDuration = 1000)
Parameters
text
stringThe text of the loading bar.
placement
PlacementThe placement of the loading bar.
processDuration
intThe duration of the loading bar.
additionalDuration
intThe additional duration of the loading bar at the end.
Remarks
For more information, consider visiting the documentation available here.
Properties
AdditionalDuration
Gets the additional duration of the loading bar at the end.
public int AdditionalDuration { get; }
Property Value
Height
Gets the height of the loading bar.
public override int Height { get; }
Property Value
Placement
Gets the placement of the loading bar.
public override Placement Placement { get; }
Property Value
ProcessDuration
Gets the duration of the loading bar.
public int ProcessDuration { get; }
Property Value
Text
Gets the text of the loading bar.
public string Text { get; }
Property Value
Width
Gets the width of the loading bar.
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()
UpdateAdditionalDuration(int)
Updates the additional duration of the loading bar.
public void UpdateAdditionalDuration(int additionalDuration)
Parameters
additionalDuration
intThe new additional duration of the loading bar.
Remarks
For more information, consider visiting the documentation available here.
Exceptions
- ArgumentOutOfRangeException
The additional duration of the loading bar cannot be negative.
UpdatePlacement(Placement)
Updates the placement of the loading bar.
public void UpdatePlacement(Placement placement)
Parameters
placement
PlacementThe new placement of the loading bar.
Remarks
For more information, consider visiting the documentation available here.
UpdateProcessDuration(int)
Updates the duration of the loading bar.
public void UpdateProcessDuration(int processDuration)
Parameters
processDuration
intThe new duration of the loading bar.
Remarks
For more information, consider visiting the documentation available here.
Exceptions
- ArgumentOutOfRangeException
Throw when the process duration is negative.
UpdateText(string)
Updates the text of the loading bar.
public void UpdateText(string text)
Parameters
text
stringThe new text of the loading bar.
Remarks
For more information, consider visiting the documentation available here.