Releases: meokullu/HelpConsole
v1.12.0 Visual improvements
On this release;
Key-Action
WaitKeyAction()andWaitKeyAction(string message)now returnsConsoleKeyInfoas a return value. #61- When
ListKeyActionPairList()is calledModifiersis checked and its data is printed only when it has aConsoleModifiersvalue. #65 AddKeyActionPair(ControlKeyInfo cki, Action action)now checks if item is already in the list. #66
Key-Func
- When
ListKeyFuncPairList()is called, whencki.KeyCharwas not empty char, it was adding unintended new line. It is changed with expected behaviour now. #65 - When
ListKeyFuncPairList()is calledModifiersis checked and its data is printed only when it has aConsoleModifiersvalue. #65 - WaitKeyFunc()
andWaitKeyFunc(string message)now returnsConsoleKeyInfo` as a return value. #61 AddKeyFuncPair(ConsoleKeyInfo cki, Func<object> func)now checks if item is already in the list. #66
Sleep
SleepWithTitle(int duration)andSleepWithBeeping(int duration)now uses internal method to set console title better for remaining duration to sleep. #64
v1.11.0 Key-Func
On this release;
As previous "Key-Action Pair" structure, new structure is added with possible use of return data.
Key-Func pair is introduced
List<Tuple<ConsoleKeyInfo, Func<object>>> is public list which can be used with AddKeyFuncPair(ConsoleKeyInfo cki, Func<object> func), ClearKeyFuncPairList() and ListKeyFuncPairList().
ConsoleKeyInfo with a pair of Func is used on the list and when WaitKeyFunc() is called, it calls func if there is an exact match of key which read by Console.KeyRead() inside of WaitFuncAction()
WaitKeyFunc() gets pressed key and calls KeyFunc(ConsoleKeyInfo cki) internally but KeyFunc(ConsoleKeyInfo cki) is also publicly available to call.
WaitKeyFunc(string message) method is also added to use one-line code to write a message and wait for an action such as "Press any key: "
WaitKeyFunc() and KeyFunc(ConsoneKeyInfo cki) returns an object from given func.
Key-Action pair
WaitKeyAction(string message) method is also added to use one-line code to write a message an wait for an action such as "Press any key:"
Summary of methods
Method summaries are imrpoved and added missing ones.
v1.10.0 Key-Action pair
Compare with previous
On this release;
Key-Action pair is introduced
Console Application has a feature to interact with user and one of them is asking user to press any key. With this structure, asking users to choose options or call an action becomes easier.
List<Tuple<ConsoleKeyInfo,Action>> is public list which can be used with AddKeyActionPair(ConsoleKeyInfo cki, Action Action), ClearKeyActionPairList() and ListKeyActionPairList().
ConsoleKeyInfo with a pair of Action is used on the list and when WaitKeyAction() is called, it calls action if there is an exact match of key which read by Console.KeyRead() inside of WaitKeyAction()
WaitKeyAction() gets pressed key and calls KeyAction(ConsoleKeyInfo cki) internally but ``KeyAction(ConsoleKeyInfo cki)` is also publicly available to call.
WriteCore and WriteLineCore
- Summaries are improved.
Following methods are added into WriteCore.cs and WriteLineCore.cs
Write(string format, object arg0)Write(string format, object arg0, object arg1)Write(string format, object arg0, object arg1, object arg2)Write(string format, object arg0, object arg1, object arg2, object arg3)Write(Linestring format, object arg0)WriteLine(string format, object arg0, object arg1)WriteLine(string format, object arg0, object arg1, object arg2)WriteLine(string format, object arg0, object arg1, object arg2, object arg3)
v1.9.0 Predefined colorful arrays
On this release;
AllLightColors, AllDarkColors, GrayToneColors, BlueToneColors, GreenToneColors, BlueToneColors, GreenToneColors, CyanToneColors, RedToneColors, MagentaToneColors, YellowToneColors, BlackWhiteColors predefined ConsoleColor[] are added to use for WriteLine<T>(T[] valueArray, ConsoleColor[] colorList) and Write<T>(T[] valueArray, ConsoleColor[] colorList).
SetConsoleTitle() method series now use null value as ignoring. SetConsoleTitle() series were not keeping previous value when method with different parameters were using.
v1.8.0 Improvements for built-in melodies and title.
Compare with previous
On this release;
Melodies
StartingUpandEndingUpmelodies are now public and they can be provided externally.- All melodies are simplified.
ErrorandFailmelodies are added.
Title
SetConsoleTitle()method series are expanded from three to eight components.ClearConsoleTitle()now clears all eight values.
v1.7.0 Arrays of generic data
On this release;
New methods added for array of generic data and, write generic values with given foreground and background color.
Write<T>(T value, ConsoleColor bgColor, ConsoleColor fgColor),WriteLine<T>(T value, ConsoleColor bgColor, ConsoleColor fgColor)method added for write text with given foreground and background color.Write<T>(T[] valueArray, T expectedValue, ConsoleColor valueColor, ConsoleColor expectedColor),WriteLine<T>(T[] valueArray, T expectedValue, ConsoleColor valueColor, ConsoleColor expectedColor)method added to print array of generic data with colorizing expecting ones.Write<T>(T[] valueArray, T expectedValue, Melody melody, ConsoleColor valueColor, ConsoleColor expectedColor),WriteLine<T>(T[] valueArray, T expectedValue, Melody melody, ConsoleColor valueColor, ConsoleColor expectedColor)method added to print array of generic data with colorizing and beeping for expecting ones.Write<T>(T[] valueArray, ConsoleColor[] colorList),WriteLine<T>(T[] valueArray, ConsoleColor[] colorList)method added to print array of generic data with each of given color array.WriteLine<T>(T value, ConsoleColor bgColor, ConsoleColor fgColor),WriteLine<T>(T value, ConsoleColor bgColor, ConsoleColor fgColor)method added for write text with given foreground and background color.
On previous versions which don't have individual releases;
- Unused usings are removed.
- Built-in memories are slightly changed.
- Methods are splitted into files based on their usage.
v1.6.1 Improvements and bugfixes, hotfix.
On this release;
Sleep(int duration)
SleepWithTitle(int duration)method added instead ofSleep(int duration). It writes sleeping duration into Console's title.Sleep(int duration)now only waits instead of writing sleeping duration into screen.
Beep(Melody melody)
Beep(Melody melody)was checkingMelodyelements with checking duration of beeping and duration of waiting as not being lower than zero. Now it is checking with equal or lower than zero as it should be.- Hotfix added with v1.6.1 when Beep(Melody melody) was writing "error on notes" into screen when third element duraiton of waiting is zero.
Featıres availability
- Several features were not working due to default values of
ConsoleOptionsandScreenColorOptions. Features likeWriteLine()orStartingMethod()now can be used without callingStartUp().
v1.5.0 Writing expansions and bugfix
On this release;
StartUp() was throwing an error when ConsoleOption is not provided as optional parameter. This bug is fixed.
Improvements on Beep(Melody melody) added.
Two new methods are added. Write<T>(T value, ConsoleColor color, Melody melody) and ``WriteLine(T value, ConsoleColor color, Melody melody)` allows you to write with specified color and beeping specified melody at the same time.
For check all changes; please see changelog.
v1.4.0 Expanding usage of Melody.
On this release;
Four methods added under Method.cs and four methods added under Write.cs. You can specify a melody to following methods.
Method
StartingMethod(Melody melody, [CallerMemberName] string memberName = "")StartingMethod(ConsoleColor color, Melody melody, [CallerMemberName] string memberName = "")EndingMethod(Melody melody, [CallerMemberName] string memberName = "")EndingMethod(ConsoleColor color, Melody melody, [CallerMemberName] string memberName = "")
Write
Write<T>(T value, Melody melody)Write<T>(List<T> valueList, T expectedValue, Melody melody, ConsoleColor valueColor, ConsoleColor expecetedColor)WriteLine<T>(T value, Melody melody)WriteLine<T>(List<T> valueList, T expectedValue, Melody melody, ConsoleColor valueColor, ConsoleColor expectedColor)
v1.3.0 Bugfixed and new features.
On this release;
Several bugs are fixed.
ScreenColorOptionswas not holding color-pair, now it is fixed.- When
SetScreenColor(ConsoleColor foregroundColor, ConsoleColor backgroundColor)called, now it also setsScreenColorOptionswhich holds preset values. ConsoleOptionswas not holding options, now it is fixed.- When
StartUp(ConsoleOption consoleOption)called, now it also setsConsoleOptionswhich holds preset option values. - When
StartUp(ConsoleOption consoleOption)called, now it also setsScreenColorOptionwhich holds preset color-pair values with givenScreenColorOptiononconsoleOptions.
Several new features are added.
StartingMethod(ConsoleColor consoleColor, [CallerName] string memberName = "")method is added. NowStartingMethod()writes method's start with colorful text.EndingMethod(ConsoleColor consoleColor, [CallerName] string memberName = "")method is added. NowEndingMethod()writes method's end with colorful text.Black,DarkBlue,DarkGreen,DarkDyan,DarkRed,DarkMagenta,DarkYellow,Gray,DarkGray,Blue,Green,Cyan,Red,Magenta,YellowandWhiteare added asConsoleColorto use them easily onWrite<T>()andWriteLine<T>().
