Class ProgressBar
Progress bar with text
Inheritance
Namespace
Syntax
public class ProgressBar : SimpleCyclicWriter
Constructors
ProgressBar(Mark, int, int, Spinner?, TextMarquee?, params object?[]?)
Makes a new instance of progress bar
Declaration
public ProgressBar(Mark text, int position, int maxPosition, Spinner? progressSpinner = null, TextMarquee? progressMarquee = null, params object?[]? args)
Parameters
| Name | Type | Description |
|---|---|---|
| text | Mark | Text to render. All VT sequences and control characters are trimmed away. |
| position | int | Current position |
| maxPosition | int | Max position |
| progressSpinner | Spinner | Spinner instance to use, or SpinMore |
| progressMarquee | TextMarquee | Marquee writer to use |
| args | object[] | Arguments to format the string with |
Properties
Accurate
Specifies whether the progress bar uses unicode block characters to accurately describe progress or not.
Remarks
If Indeterminate is true, this won't be applied.
Property Value
Declaration
public bool Accurate { get; set; }
Delay
Delay interval for marquee. The default is 30 ticks for 100 milliseconds, but you can adjust it, depending on the speed of the loop.
Property Value
Declaration
public int Delay { get; set; }
Indeterminate
Specifies whether the progress is indeterminate
Property Value
Declaration
public bool Indeterminate { get; set; }
Position
Position of the progress bar
Property Value
Declaration
public int Position { get; set; }
ProgressActiveForegroundColor
Progress active foreground
Property Value
Declaration
public Color ProgressActiveForegroundColor { get; set; }
ProgressBackgroundColor
Progress background
Property Value
Declaration
public Color ProgressBackgroundColor { get; set; }
ProgressFailedActiveForegroundColor
Progress failed active foreground
Property Value
Declaration
public Color ProgressFailedActiveForegroundColor { get; set; }
ProgressFailedForegroundColor
Progress failed foreground
Property Value
Declaration
public Color ProgressFailedForegroundColor { get; set; }
ProgressForegroundColor
Progress foreground
Property Value
Declaration
public Color ProgressForegroundColor { get; set; }
ProgressHorizontalActiveTrackChar
Progress horizontal active track character for drawing
Remarks
If Accurate is enabled, this property is ignored.
Property Value
Declaration
public char ProgressHorizontalActiveTrackChar { get; set; }
ProgressHorizontalInactiveTrackChar
Progress horizontal inactive track character for drawing
Remarks
If Accurate is enabled, this property is ignored.
Property Value
Declaration
public char ProgressHorizontalInactiveTrackChar { get; set; }
ProgressPausedActiveForegroundColor
Progress paused active foreground
Property Value
Declaration
public Color ProgressPausedActiveForegroundColor { get; set; }
ProgressPausedForegroundColor
Progress paused foreground
Property Value
Declaration
public Color ProgressPausedForegroundColor { get; set; }
ProgressPercentageTextColor
Progress percentage text color
Property Value
Declaration
public Color ProgressPercentageTextColor { get; set; }
ProgressSpinnerTextColor
Progress spinner color
Property Value
Declaration
public Color ProgressSpinnerTextColor { get; set; }
ProgressTextColor
Progress text color
Property Value
Declaration
public Color ProgressTextColor { get; set; }
ProgressUncoloredHorizontalActiveTrackChar
Progress horizontal active track character for drawing (uncolored)
Remarks
If Accurate is enabled, this property is ignored.
Property Value
Declaration
public char ProgressUncoloredHorizontalActiveTrackChar { get; set; }
ProgressUncoloredHorizontalInactiveTrackChar
Progress horizontal inactive track character for drawing (uncolored)
Remarks
If Accurate is enabled, this property is ignored.
Property Value
Declaration
public char ProgressUncoloredHorizontalInactiveTrackChar { get; set; }
ProgressUncoloredVerticalActiveTrackChar
Progress vertical active track character for drawing (uncolored)
Remarks
If Accurate is enabled, this property is ignored.
Property Value
Declaration
public char ProgressUncoloredVerticalActiveTrackChar { get; set; }
ProgressUncoloredVerticalInactiveTrackChar
Progress vertical inactive track character for drawing (uncolored)
Remarks
If Accurate is enabled, this property is ignored.
Property Value
Declaration
public char ProgressUncoloredVerticalInactiveTrackChar { get; set; }
ProgressVerticalActiveTrackChar
Progress vertical active track character for drawing
Remarks
If Accurate is enabled, this property is ignored.
Property Value
Declaration
public char ProgressVerticalActiveTrackChar { get; set; }
ProgressVerticalInactiveTrackChar
Progress vertical inactive track character for drawing
Remarks
If Accurate is enabled, this property is ignored.
Property Value
Declaration
public char ProgressVerticalInactiveTrackChar { get; set; }
ProgressWarningActiveForegroundColor
Progress warning active foreground
Property Value
Declaration
public Color ProgressWarningActiveForegroundColor { get; set; }
ProgressWarningForegroundColor
Progress warning foreground
Property Value
Declaration
public Color ProgressWarningForegroundColor { get; set; }
ShowPercentage
Specifies whether the progress bar shows percentage or not (ignored in indeterminate progress bars)
Property Value
Declaration
public bool ShowPercentage { get; set; }
State
State of the progress bar
Text
Text to render. All VT sequences and control characters are trimmed away.
Property Value
Declaration
public string Text { get; }
UseColors
Whether to use colors or not
Property Value
Declaration
public bool UseColors { get; set; }
Width
Width of the progress bar
Property Value
Declaration
public int Width { get; set; }
Methods
Render()
Renders a scrolling text progress bar
Returns
The result
Declaration
public override string Render()