Class ProgressBarOptions
Control the behaviour of your progressbar
Inheritance
System.Object
ProgressBarOptions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common.IO.Console
Assembly: Mars.IO.dll
Syntax
public class ProgressBarOptions
Fields
| Improve this Doc View SourceDefault
Control the behaviour of your progressbar
Declaration
public static readonly ProgressBarOptions Default
Field Value
Type | Description |
---|---|
ProgressBarOptions |
Properties
| Improve this Doc View SourceBackgroundCharacter
The character to use for the background of the progress defaults to ProgressCharacter
Declaration
public char? BackgroundCharacter { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Char> |
BackgroundColor
The background color of the remainder of the progressbar
Declaration
public ConsoleColor? BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.ConsoleColor> |
CollapseWhenFinished
Collapse the progressbar when done, very useful for child progress-bars
Defaults to true
Declaration
public bool CollapseWhenFinished { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DisplayTimeInRealTime
When true will redraw the progressbar using a timer, otherwise only update when
Tick(String) is called.
Defaults to true
Declaration
public bool DisplayTimeInRealTime { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnableTaskBarProgress
Use Windows' task bar to display progress.
Declaration
public bool EnableTaskBarProgress { set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
This feature is available on the Windows platform.
|
Improve this Doc
View Source
ForegroundColor
The foreground color of the progress bar, message and time
Declaration
public ConsoleColor ForegroundColor { get; set; }
Property Value
Type | Description |
---|---|
System.ConsoleColor |
ForegroundColorDone
The foreground color the progressbar has reached a 100 percent
Declaration
public ConsoleColor? ForegroundColorDone { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.ConsoleColor> |
ProgressBarOnBottom
By default the text and time information is displayed at the bottom and the progress bar at the top.
This setting swaps their position
Declaration
public bool ProgressBarOnBottom { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ProgressCharacter
The character to use to draw the progressbar
Declaration
public char ProgressCharacter { get; set; }
Property Value
Type | Description |
---|---|
System.Char |
ShowEstimatedDuration
Whether to show the estimated time. It can be set when
Tick(String) is called or the property
Declaration
public bool ShowEstimatedDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
WriteQueuedMessage
Take ownership of writing a message that is intended to be displayed above the progressbar.
The delegate is expected to return the number of messages written to the console as a result of the string
argument.
Uses case: pretty print or change the console colors, the progressbar will reset back
Declaration
public Func<string, int> WriteQueuedMessage { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.String, System.Int32> |