-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a06cf3
commit 80694c4
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,65 @@ | ||
# FancyPrint | ||
|
||
A C# .NET Library for printing to the console with style! | ||
|
||
## Description | ||
|
||
FancyPrint is a simple .NET library used to print information to the console with preset formatting and color templates. | ||
This should be a fairly drop-in replacement for `Console.WriteLine` statements, you'll just need to add a 'Method' to them. | ||
|
||
The library contains 4 methods: | ||
- `WriteStandard` writes the text in white (or the default console foreground color) | ||
- `WriteError` writes the text in red | ||
- `WriteWarn` writes the text in yellow | ||
- `WriteSuccess` writes the text in green. | ||
|
||
All colors are configurable though `FancyPrint.Colors` | ||
|
||
## Getting Started | ||
|
||
### Dependencies | ||
|
||
* Project targets .NET 5.0. | ||
* The .NET Runtime is required for running console applications. | ||
|
||
### Building | ||
|
||
* Building the library from scratch just requires you to download the solution, then build this through your .NET IDE of choise | ||
* You can also use `dotnet build` from the CLI to build the file. | ||
|
||
### Installing | ||
|
||
* Add reference to FancyPrint.dll in your .NET Project. | ||
|
||
### Usage | ||
|
||
C# Example | ||
```c# | ||
static void Main(string[] args) | ||
{ | ||
// 1st parameter: Method to be printed inside [] | ||
// 2nd parameter: Message to be displayed. | ||
FancyPrint.Print.WriteSuccess("Docs", "This worked!"); | ||
FancyPrint.Print.WriteWarn("Docs", "This kinda worked!"); | ||
FancyPrint.Print.WriteError("Docs", "This didn't work!"); | ||
|
||
// Change method, success, warning, and error colors to anything you wish! | ||
FancyPrint.Colors.Method = ConsoleColor.Magenta; | ||
Console.WriteLine(); | ||
FancyPrint.Print.WriteSuccess("Docs", "Now in purple!"); | ||
} | ||
``` | ||
![Screenshot 2021-10-28 130137](https://user-images.githubusercontent.com/8160191/139251745-b29752d9-3911-4515-9b30-8401d6b88c9f.png) | ||
|
||
## Authors | ||
|
||
[lewisdoesstuff](https://github.com/lewisdoesstuff) | ||
|
||
## Version History | ||
|
||
* 0.1 | ||
* Initial Release | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the LICENSE.md file for details |