Frame handler tool for console
$ dotnet add package TirsvadCLI.Frame
Frame handlerFrame tool for C# console applications.
Frame tool for C# console applications. Create a frame with text inside. Frame can be centered to windows.
Frame can be filled with a character and colored.
Nuget package: https://www.nuget.org/packages/TirsvadCLI.Frame/
dotnet add package TirsvadCLI.Frame
In the example you can see how to use the AnsiCode class.
The Frame class provides several methods to create and customize frames in console applications.
Below is a list of the public methods and their descriptions:
Frame()
Frame(int windowWidth, int windowHeight, int? frameWidth = null, int? frameHeight = null, char leftTop = '╔', char rightTop = '╗', char leftBottom = '╚', char rightBottom = '╝', char horizontal = '═', char vertical = '║')
Frame(int windowWidth, int windowHeight, string[] frameText, int? frameWidth = null, int? frameHeight = null, char leftTop = '╔', char rightTop = '╗', char leftBottom = '╚', char rightBottom = '╝', char horizontal = '═', char vertical = '║')
SetStartPosition((int Left, int Top) startPosition)
SetColorBg(ConsoleColor color)
SetColorFg(ConsoleColor color)
SetTextColorBg(ConsoleColor color)
SetTextColorFg(ConsoleColor color)
SetFrameColorBg(ConsoleColor color)
SetFrameColorFg(ConsoleColor color)
SetFrameText(string title)
SetFrameText(List<string> title)
Render(bool center = false)
center is true, the frame is centered on the screen.FrameText(ICollection<string> texts, bool centerText = false)
CenterText(string text, int width)
These methods allow you to create visually appealing and customizable frames for console applications. For usage examples, refer to the Example section.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)If you encounter a bug or have an issue to report, please follow these steps:
Go to the Issues Page
Navigate to the GitHub Issues page.
Click "New Issue"
Click the green "New Issue" button to create a new issue.
Provide Details
Your feedback is valuable and helps improve the project!
Distributed under the GPL-3.0 License.
Jens Tirsvad Nielsen - LinkedIn