Alcuino.ConsoleWriter472 2.0.0

dotnet add package Alcuino.ConsoleWriter472 --version 2.0.0                
NuGet\Install-Package Alcuino.ConsoleWriter472 -Version 2.0.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="Alcuino.ConsoleWriter472" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Alcuino.ConsoleWriter472 --version 2.0.0                
#r "nuget: Alcuino.ConsoleWriter472, 2.0.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 Alcuino.ConsoleWriter472 as a Cake Addin
#addin nuget:?package=Alcuino.ConsoleWriter472&version=2.0.0

// Install Alcuino.ConsoleWriter472 as a Cake Tool
#tool nuget:?package=Alcuino.ConsoleWriter472&version=2.0.0                

Alcuino.ConsoleWriter472

ConsoleWriter472 is a C# utility class designed to enhance console output capabilities with additional features for text alignment, colors, typewriter-like effects, and structured formatting.

Properties

  • IsTypeWriterMode (false as default, optional)
  • TypeWriterSpeed (2 as default)
  • IsTypeWriterByWord = false (false as default)

Methods

  • Write()
  • WriteLine()
  • WriteColumn()
  • WriteHeader()
  • TypeWrite()
  • TypeWriteLine()
  • ReadLine()
  • WriteMenu() new!

Features

  • Typewriter Mode

    • Simulate the typewriter effect with customizable typing speeds.
    • Control individual character or word-by-word typing.
  • Text Formatting

    • Write and write lines of text with custom foreground and background colors.
    • Format text into visually appealing columns with specified alignment and colors.
  • Header Display

    • Create centered headers with customized foreground and background colors.
    • Design headers with borders for a structured display.
  • Input Handling

    • Read user input with customizable prompt colors.
  • Creates Functional Menu

    • Create a simple menus that returns integer on selected menu
    • Customizable menu, can change foreground/background color
    • Disable instructions used or you can have your own instructions

Usage

Typewriter Mode

// Enable typewriter mode, allow ConsoleWriter.Write and ConsoleWriter.WriteLine to take effect
ConsoleWriter.IsTypeWriterMode = true;

// Set typing speed (in milliseconds)
ConsoleWriter.TypeWriterSpeed = 2;

// Write text with typewriter effect
ConsoleWriter.TypeWrite("Hello, World!");

Text Formatting

// Write text with custom colors
ConsoleWriter.Write("Hello, World!", ConsoleColor.Green, ConsoleColor.Black);

// Write a line of text with custom colors
ConsoleWriter.WriteLine("Welcome!", ConsoleColor.Yellow, ConsoleColor.Blue);

// Create formatted columns
string[] columnData = { "Column 1", "Column 2", "Column 3" };
ConsoleWriter.WriteColumn(columnData, Align.Center, 15, ConsoleColor.Cyan, ConsoleColor.Magenta);

// Create formatted columns with customize max characters per column
Dictionary<string, int> columnData = new Dictionary<string, int>()
{
    { "Column 1", 8 },
    { "Column 2", 8 },
    { "Column 3", 16 }
};
ConsoleWriter.WriteColumn(columnData, Align.Center, ConsoleColor.Cyan, ConsoleColor.Magenta);

Header Display

// Display a header with custom colors
ConsoleWriter.WriteHeader("ConsoleWriter472", ConsoleColor.White, ConsoleColor.DarkBlue, 30);

Text Input

// Prompt user for input
string userInput = ConsoleWriter.ReadLine(ConsoleColor.Yellow);

Create Menu

// create menu
string[] menus = {
        "Add Person",
        "Update Person",
        "Add Person",
        "Display Somthing",
        "Exit",
    };

int option = ConsoleWriter.WriteMenu(menus);
Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • 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
2.0.0 107 4/29/2024
1.9.0 237 11/28/2023
1.8.0 117 11/28/2023
1.7.0 98 11/28/2023
1.6.0 103 11/27/2023
1.5.0 131 11/25/2023
1.4.0 128 11/25/2023
1.3.0 104 11/24/2023
1.1.0 177 11/24/2023
1.0.0 154 11/24/2023

Summary of changes made in this release of the package.