CreamsConsole-Utilities 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package CreamsConsole-Utilities --version 1.1.1                
NuGet\Install-Package CreamsConsole-Utilities -Version 1.1.1                
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="CreamsConsole-Utilities" Version="1.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CreamsConsole-Utilities --version 1.1.1                
#r "nuget: CreamsConsole-Utilities, 1.1.1"                
#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 CreamsConsole-Utilities as a Cake Addin
#addin nuget:?package=CreamsConsole-Utilities&version=1.1.1

// Install CreamsConsole-Utilities as a Cake Tool
#tool nuget:?package=CreamsConsole-Utilities&version=1.1.1                

CreamsConsole-Utilities

A Console Utilities library inspired by spectre console focused on customization and good looking console applications

NuGet Package: https://www.nuget.org/packages/CreamsConsole-Utilities

Github Source code: https://github.com/joloboy20071/CreamsConsole-Utilities

Docs (work in progress): https://docs.creams-productions.nl/projects/creams-console-utilities-package-documentation

example code

Write Colored text with in line syntax EXPEREMENTAL!

using CreamsConsole_utils;

ColorText.CreateCustomColor("MidnightBlue", "#191970");//Define your own custom colors. must have hex value when defining custom colors
ColorText.ColorWriteIn("[/]{Invert}_Red[/]foo[//] [/]{Bold,UnderLine}_MidnightBlue[/]bar[//] , [/]{Italic,Strike}_[/]foo[//][/]Green[/] bar[//]");//Have Inline styling asswell 
 //Supported style  modifiers are [Invert,Bold,Strike,Italic,UnderLine]

output

alt text

Simple Selection menu example

using CreamsConsole_utils;

selectionMenu.config config = new selectionMenu.config() { };

config.AddChoise("Option 1", "returnID 1"); // add option with title and a return id 
config.AddChoise("Option 2", "returnID 2");
config.AddChoise("Option 3"); // add option with title and a return id = title
config.title = "Im a title";
config.description = "im a discription";


string output = selectionMenu.runtimeMenu(config);
Console.WriteLine(output);

output

alt text

Simple Selection menu example without exit

using CreamsConsole_utils;

selectionMenu.config config = new selectionMenu.config() { };

config.AddChoise("Option 1", "returnID 1"); // add option with title and a return id 
config.AddChoise("Option 2", "returnID 2");
config.AddChoise("Option 3"); // add option with title and a return id = title
config.title = "Im a title"; // sets the title
config.description = "im a discription";

config.HasExit = false;
string output = selectionMenu.runtimeMenu(config);
Console.WriteLine(output);

output

alt text

Simple multi Selection Menu

using CreamsConsole_utils;


MultiSelectionMenu.config config = new MultiSelectionMenu.config() { };

config.AddChoise("Option 1", "returnID 1", true); //add a option with Title: option 1, a returnID and set the option to true
config.AddChoise("Option 2", "returnID 2");// add a option with Title: option 2, a returnID and set the option to false
config.AddChoise("Option 3", true); //add a option with Title: option 3, a returnID = option title and set the option to true
config.title = "Im a title"; //Set the Menu title  
config.description = "im a discription"; // Set the menu discription 

MultiSelectionMenu.ReturnedData Output = MultiSelectionMenu.runtimeMenu(config);

if (Output.isSaved) { for (int i = 0; i < Output.returnIDS.Count; i++) { Console.WriteLine($"{Output.returnIDS[i]} -> {Output.returnDict[Output.returnIDS[i]]}"); } }

output

alt text

Simple progress bar

using CreamsConsole_utils;

ProgressBars progressBar = new ProgressBars();

ProgressBars.ProgresBarConfig progresBarConfig = new ProgressBars.ProgresBarConfig();



progresBarConfig.totalTasks = 100; //set the amount of tasks to complete
progresBarConfig.TaskName = "task";// set the main progeess bar name

int bar = progressBar.startBar(progresBarConfig);

for (int i = 0; i < progresBarConfig.totalTasks; i++) {
    Thread.Sleep(100); // do some work
    progressBar.UpdateBar(i + 1, progresBarConfig, bar);// update the progress bar
}

output

alt text

alt text

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.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.3.1 92 8/28/2024
1.3.0 92 8/27/2024
1.2.0 94 8/26/2024
1.1.2 105 8/24/2024
1.1.1 114 8/23/2024
1.1.0 110 8/23/2024

added support for in line colorwrite