Table of Contents

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 string

The text of the loading bar.

placement Placement

The placement of the loading bar.

processDuration int

The duration of the loading bar.

additionalDuration int

The 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

int

Height

Gets the height of the loading bar.

public override int Height { get; }

Property Value

int

Placement

Gets the placement of the loading bar.

public override Placement Placement { get; }

Property Value

Placement

ProcessDuration

Gets the duration of the loading bar.

public int ProcessDuration { get; }

Property Value

int

Text

Gets the text of the loading bar.

public string Text { get; }

Property Value

string

Width

Gets the width of the loading bar.

public override int Width { get; }

Property Value

int

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 int

The 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 Placement

The 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 int

The 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 string

The new text of the loading bar.

Remarks

For more information, consider visiting the documentation available here.