HelpConsole

HelpConsole HelpConsole License

HelpConsole is a project to offer useful methods which makes easier to use console applications.

HelpConsole

Download on NuGet gallery

Description

HelpConsole has methods to increase liability of output, state and methods.

How to download

Release: Latest release

Download on NuGet gallery

.NET CLI:

dotnet add package HelpConsole

Example Usage

Start & Finish

StartUp(ConsoleOption consoleOption = null);
FinishUp();

Title & Writing

SetConsoleTitle(string firstText = null, string secondText = null, string thirdText = null);
ClearConsoleTitle();
Write<T>(T value, ConsoleColor color);
Write<T>(List<T> valueList, T expectedValue, ConsoleColor valueCcolor, ConsoleColor expectedColor);

Sleeping & Beeping

Beep(Melody melody);
Sleep(int duration);
SleepWithBeeping(int duration);

Method

StartingMethod([CallerMemberName] string memberName = "");
EndingMethod([CallerMemberName] string memberName = "");

Math

PercentageNoFrac(int item1, int item2);
Percentage2F(int item1, int item2);
Percentage8F(int item1, int item2);

Key-Action

AddKeyActionPair(new Tuple<ConsoleKeyInfo, Action>(cki: cki, action: action))`;
WaitKeyAction();
KeyAction(ConsoleKeyInfo cki);

Key-Func

AddKeyFuncPair(new Tuple<ConsoleKeyInfo, Func<object>>(cki: cki, func: func));
object returnData = WaitKeyFunc();
object returnData = KeyFunc(ConsoleKeyInfo cki);

To check listed methods, example of output visit wiki page. HelpConsole Wiki

Version History

See Changelog

Task list

Licence

This repository is licensed under the “MIT” license. See MIT license.

Authors & Contributing

If you’d like to contribute, then contribute. contributing guide

Contributors

Help

Twitter: Enes Okullu @enesokullu