Skip to content

jchristn/StatusIcons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

StatusIcons

NuGet Version NuGet

Simple C# class library for adding Unicode status icons to console applications, or falling back to ASCII if the terminal doesn't support Unicode.

Help or Feedback

First things first - do you need help or have feedback? File an issue here! We'd love to hear from you.

Have an idea for amending the default set of icons? Let us know!

New in v1.0.x

  • Initial release

It's Really Easy... I Mean, REALLY Easy

Usage

Refer to the Test project for full usage details. If Unicode is supported in your terminal, retrieving an icon via StatusIcon["name"] will return the Unicode icon, and if not, it will return the ASCII variant.

using StatusIcons;

// Display an icon
StatusIcon icon = new StatusIcon();
Console.WriteLine("Success: " + icon["Success"]);

// Test your terminal for Unicode support
icon.TestTerminal();

// Add and use an icon
icon["Speaker"] = "🔊";  // add to whichever dictionary is in use
icon.AsciiIcons["Speaker"] = ":(";  // add only to the ASCII icon dictionary
icon.UnicodeIcons["Speaker"] = "🔊";  // add only to the Unicode icon dictionary
Console.WriteLine("Icon 'Speaker' : " + icon["Speaker"]);

Default Icons

The following icons are added by default.

Key Unicode ASCII
Success +
Error X
Warning !
Info i
Working .
Bullet *
Arrow >

Version History

Please refer to CHANGELOG.md.

About

Class library to enable Unicode status icons in console apps or fall-back to ASCII.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages