ConsoleFeatures 1.0.0
dotnet add package ConsoleFeatures --version 1.0.0
NuGet\Install-Package ConsoleFeatures -Version 1.0.0
<PackageReference Include="ConsoleFeatures" Version="1.0.0" />
<PackageVersion Include="ConsoleFeatures" Version="1.0.0" />
<PackageReference Include="ConsoleFeatures" />
paket add ConsoleFeatures --version 1.0.0
#r "nuget: ConsoleFeatures, 1.0.0"
#:package ConsoleFeatures@1.0.0
#addin nuget:?package=ConsoleFeatures&version=1.0.0
#tool nuget:?package=ConsoleFeatures&version=1.0.0
ConsoleFeatures
A library that gives functionality to the console (Progressbar, selection menu, acceptance field)
<p align="center"> <img src="https://raw.githubusercontent.com/KimPiks/ConsoleFeatures/main/output.png" /> </p>
Docs
void Progressbar(int value, int min = 0, int max = 100, string information = "")<br> Shows a progressbar<br>int value- Progressbar valueint min- Progressbar minimum value (default 0)int max- Progressbar minimum value (default 100)string information- Additional information (e.q. download speed)ArgumentOutOfRangeException- The exception is returned when the progressbar value is outside its range (min < = value < = max)
int Selector(List<string> options, int selectedIndex = 0)<br> Shows a form with options to choose from<br>List<string> options- List of options to choose fromint selectedIndex- Currently selected option, no need to specify, needed for recursionReturn- The index of the selected option
bool Acceptance(string text, bool approvalRequired = false)<br> Shows acceptable condition (Y/N)<br>string text- Acceptable conditionbool approvalRequired- Whether the user must accept the terms to proceedReturn- Whether the user has accepted the terms
void ClearLastLine()<br> Clears the last console line
Example
using Console = ConsoleFeatures.Console;
System.Console.WriteLine("Progressbar");
Random rand = new();
for (var i = 0; i <= 100; i++)
{
var downloadSpeed = rand.NextInt64(1, 20);
Console.Progressbar(i, information: $"{downloadSpeed} Mb/s");
Thread.Sleep(100);
}
System.Console.Write("\n");
System.Console.WriteLine("Selector");
var options = new List<string>()
{
"First option",
"Second option",
"Third option"
};
var selectedOptionIndex = Console.Selector(options);
System.Console.WriteLine($"Selected option: {options[selectedOptionIndex]}");
System.Console.Write("\n");
System.Console.WriteLine("Acceptance");
var accepted = Console.Acceptance("Do you accept sth?");
System.Console.WriteLine(accepted.ToString());
System.Console.Write("\n");
Console.Acceptance("Do you accept sth? required", true);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
-
net7.0
- 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 |
|---|---|---|
| 1.0.0 | 371 | 2/1/2023 |