SGrottel.ConProgBar.CSharp 0.4.0

Requires NuGet 3.3 or higher.

dotnet add package SGrottel.ConProgBar.CSharp --version 0.4.0                
NuGet\Install-Package SGrottel.ConProgBar.CSharp -Version 0.4.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SGrottel.ConProgBar.CSharp" Version="0.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SGrottel.ConProgBar.CSharp --version 0.4.0                
#r "nuget: SGrottel.ConProgBar.CSharp, 0.4.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SGrottel.ConProgBar.CSharp as a Cake Addin
#addin nuget:?package=SGrottel.ConProgBar.CSharp&version=0.4.0

// Install SGrottel.ConProgBar.CSharp as a Cake Tool
#tool nuget:?package=SGrottel.ConProgBar.CSharp&version=0.4.0                

SGrottel.ConProgBar

A simple progress bar for the text console.

https://github.com/sgrottel/ConProgBar

Example

ConProgBar bar = new();
bar.MaximumWidth = Console.WindowWidth - 1;
bar.MinimumWidth = bar.MaximumWidth;
bar.Show = true;
for (int i = 0; i < maxI; ++i)
{
	bar.Value = (double)i / maxI;
	Thread.Sleep(500);
	if (i == 10)
	{
		bar.Show = false;
		Console.WriteLine("Intermission...");
		Thread.Sleep(2000);
		bar.Show = true;
	}
}
bar.Show = false;

License

The code is freely available under terms of the Apache License V2 (see LICENSE)

Copyright 2022-2024 SGrottel

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.4.0 76 11/14/2024
0.3.0 133 5/26/2024