Skip to content

Commit

Permalink
updated changelog and some code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lastunicorn committed Apr 5, 2022
1 parent f16623d commit 344d104
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 18 deletions.
7 changes: 5 additions & 2 deletions doc/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ Note: For any bug or feature request please add a new issue on GitHub: https://g

ver 1.1.0
---------
- [feature] Splitted the one nuget package into multiple packages.
- [feature] DataGrid: Add multiple rows ar once.
- [feature] Splitted the single nuget package into multiple packages.
- [feature] DataGrid: Add multiple rows at once.
- [feature] DataGrid: Added a footer row.
- [feature] DataGrid: "AddCell" method returns the newly created cell.
- [feature] DataGrid: Add multiple rows at once.
- [bugfix ] BlockControl: Fixed row shifting when console window is resized.

ver 1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public InlineTextBlock Label
}

/// <summary>
/// Gets or sets a velue that specifies if the text label should be displayed.
/// Gets or sets a value that specifies if the text label should be displayed.
/// Default value: <c>true</c>
/// </summary>
public bool ShowLabel { get; set; } = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class FillSpinnerTemplate : ISpinnerTemplate
/// </summary>
public FilledBehavior FilledBehavior
{
get { return filledBehavior; }
get => filledBehavior;
set
{
bool valueIsDefined = Enum.IsDefined(typeof(FilledBehavior), value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace DustInTheWind.ConsoleTools.Controls.Spinners
{
/// <summary>
/// In the<see cref="ProgressBar"/>, it specifies the position of the value in regards to the progress bar.
/// In the <see cref="ProgressBar"/>, it specifies the position of the value in regards to the progress bar.
/// </summary>
public enum ValuePosition
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new BoomerangSpinnerTemplate(),
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new BubbleSpinnerTemplate(),
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new FanSpinnerTemplate(),
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new FillSpinnerTemplate('▓', 10),
SpinnerStepMilliseconds = 100,
WorkPeriod = TimeSpan.FromSeconds(10)
WorkTimeSpan = TimeSpan.FromSeconds(10)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new FillSpinnerTemplate { FilledBehavior = FilledBehavior.EmptyFromEnd },
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new FillSpinnerTemplate(),
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new FillSpinnerTemplate { FilledBehavior = FilledBehavior.SuddenEmpty },
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new FillSpinnerTemplate { ShowBorders = true },
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new HalfBlinkSpinnerTemplate(),
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new HalfRotateSpinnerTemplate(),
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Execute()
{
SpinnerTemplate = new StickSpinnerTemplate(),
SpinnerStepMilliseconds = 400,
WorkPeriod = TimeSpan.FromSeconds(5)
WorkTimeSpan = TimeSpan.FromSeconds(5)
};

worker.Run();
Expand Down
6 changes: 4 additions & 2 deletions sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo
{
internal class Worker
{
public TimeSpan WorkPeriod { get; set; }
public TimeSpan WorkTimeSpan { get; set; }

public ISpinnerTemplate SpinnerTemplate { get; set; }

public int SpinnerStepMilliseconds { get; set; }

public void Run()
Expand All @@ -45,7 +47,7 @@ public void Run()
try
{
// Simulate work
Thread.Sleep(WorkPeriod);
Thread.Sleep(WorkTimeSpan);

spinner.DoneText = new InlineTextBlock("[Done]", CustomConsole.SuccessColor);
spinner.Close();
Expand Down

0 comments on commit 344d104

Please sign in to comment.