ConsoleTools

A set of tools and "controls" for the .net Console. It contains: List Input/Output Controls, Text Input/Output Controls, Progress Bar, Spinner, Data Table, Prompter, Menus, etc.


Keywords
console, cli, prompter, menu, progressbar, spinner, table, read, write, textblock, inlinetextblock, blockcontrol, inlinecontrol, csharp, data-table, datatable, dotnet, input-output, progress-bar
License
GPL-3.0
Install
Install-Package ConsoleTools -Version 1.1.1

Documentation

Donations

If you like my work and want to support me, you can buy me a coffee:

ko-fi

Console Tools

A set of tools and "controls" for the .net Console. They help displaying and reading data to/from the user.

Note: Until reaching the version 1.0.0 the controls may change dramatically and will not ensure backwards compatibility.

Bugs and feature requests

Please add a new issue if:

  • you found a bug;
  • you see an improvement that can be done;
  • you think of a control that is cool to add.

Most cool controls

This is a list of most important controls that are provided by this library. There is a DataGrid control that can display tabular data, there is a progress bar, a spinner, menus, etc.

All controls have configurable top and bottom margins and paddings.

DataGrid

Displays tabular data. Optionally, it can display a title, column headers, different types of borders, cell margins, etc.

DataGrid Example Result

Yes/No Question

Asks a question to the user and expects a yes/no answer.

YesNoCancel Example Result

Progress Bar

Displays a progress bar, to show the amount of finished work.

ProgressBar Example Result

Spinner

A "loading" control to be displayed while running an asynchronous jobs for which the remaining work cannot be estimated.

Scroll Menu

A menu where the user can navigate through the items with up/down keys.

ScrollMenu Example Result

TextMenu

A menu where the user selects an item by typing its id.

TextMenu Example Result

Prompter

Displays a prompter and waits for the user to type a command.

Pause Control

Custom text, custom unpause key, the usual top and bottom margins.

Pause Control Quick Example Result

Read/Write value

Reads or writes a value from/to the console. Read Value - Write Value

TextInput Instance Example Result

TextOutput Instance Example Result

Read/Write list of values:

Reads or displays a list of values from/to the user. Read List of Values - Write List of Values

ListInput Quick Example Result

Other controls:

  • ControlRepeater - Repeatedly display a specific control until it is closed.
  • Sound - A class that helps you make short sounds on specific frequencies.
  • Guardian - A class that helps you prevent multiple instances of the same application.