ConsoleProgressBar Class

A personalizable colorful ASCII progress bar for console applications.

Definition

Namespace: DevCase.Core.Application.Console
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public class ConsoleProgressBar : IDisposable, 
	IProgress<double>
Inheritance
Object    ConsoleProgressBar
Implements
IDisposable, IProgressDouble

Remarks

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Constructors

ConsoleProgressBar Initializes a new instance of the ConsoleProgressBar class.

Properties

Animation Gets or sets the characters used to draw the animation secuence at the very end of the progress bar.

Default value is: {"|"c, "|"c, "/"c, "/"c, "-"c, "-"c, "\"c, "\"c} ( that is: "||//--\\" )

AnimationBackColor Gets or sets the ConsoleColor used to paint the background of the animation secuence.
AnimationForeColor Gets or sets the ConsoleColor used to paint the foreground of the borders of the animation secuence.
AnimationSpeed Gets or sets the speed (framerate) of the animation secuence defined in Animation.

Default value is: 125 milliseconds.

AnimationVisible Gets or sets a value indicating whether the animation secuence is visible in the progress bar.
BlockActiveBackColor Gets or sets the ConsoleColor used to paint the background of an active progress bar block.
BlockActiveChar Gets the character used to draw an active progress bar block.

Default value is: "#"

BlockActiveForeColor Gets or sets the ConsoleColor used to paint the foreground of an active progress bar block.
BlockCount Gets the amount of blocks to display in the progress bar.

Default value is: 20

BlockInactiveBackColor Gets or sets the ConsoleColor used to paint the background of a inactive progress bar block.
BlockInactiveChar Gets the character used to draw an inactive progress bar block.

Default value is: "·"

BlockInactiveForeColor Gets or sets the ConsoleColor used to paint the foreground of a inactive progress bar block.
BorderBackColor Gets or sets the ConsoleColor used to paint the background of the borders of the progress bar.
BorderForeColor Gets or sets the ConsoleColor used to paint the foreground of the borders of the progress bar.
CurrentProgress Gets the current progress value. From 0.0 to 1.0
ProgressTextBackColor Gets or sets the ConsoleColor used to paint the background of the progress text.
ProgressTextForeColor Gets or sets the ConsoleColor used to paint the foreground of the borders of the progress text.
ProgressTextFormat Gets or sets the format of the progress text, where:

{0} = Percentage Value

{1} = Current Value

{2} = Maximum Value

Default value is: "{0}%"

Methods

Dispose Releases all the resources used by this instance.
Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetType Gets the Type of the current instance.
(Inherited from Object)
Report Reports a progress update.
ToString Returns a string that represents the current object.
(Inherited from Object)

Extension Methods

CanConvertTo Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
CanConvertToT Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
ConvertToT Converts an object to the specified target type.

If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions)

ConvertToT Converts an object to the specified target type.

If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions)

IsDisposable Determines whether the specified object is a disposable type (i.e., it implements IDisposable interface).
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
ThrowIfNullTException Throws the specified exception if the source object is null.
(Defined by ObjectExtensions)

See Also