Skip to content

Commit

Permalink
Merge pull request #2 from MihailsKuzmins/feature/expose_current
Browse files Browse the repository at this point in the history
add Current to IProgressBar
  • Loading branch information
goblinfactory authored Dec 16, 2020
2 parents 67f772a + 46eb840 commit c2f9d03
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Goblinfactory.ProgressBar/IProgressBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ public interface IProgressBar
string Line1 { get; }
string Line2 { get; }
int Y { get; }
int Current { get; }
int Max { get; set; }
void Refresh(int current, string item);
void Refresh(int current, string format, params object[] args);
void Next(string item);
}


}
3 changes: 2 additions & 1 deletion Goblinfactory.ProgressBar/ProgressBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ namespace Konsole
public enum PbStyle { SingleLine, DoubleLine }
public class ProgressBar : IProgressBar
{
private IProgressBar _bar;
private readonly IProgressBar _bar;

public int Y => _bar.Y;
public int Current => _bar.Current;
public string Line1 => _bar.Line1;
public string Line2 => _bar.Line2;

Expand Down
2 changes: 2 additions & 0 deletions Goblinfactory.ProgressBar/ProgressBarTwoLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public int Y
get { return _y; }
}

public int Current => _current;

public string Line1
{
get { return _line1; }
Expand Down

0 comments on commit c2f9d03

Please sign in to comment.