diff --git a/ExtendedConsole/ExConsoleMultipleSelectMenu.cs b/ExtendedConsole/ExConsoleMultipleSelectMenu.cs index b94e259..77205e3 100644 --- a/ExtendedConsole/ExConsoleMultipleSelectMenu.cs +++ b/ExtendedConsole/ExConsoleMultipleSelectMenu.cs @@ -76,11 +76,13 @@ params T[] items ) { ValidateArguments(); - var menuItems = items.Select(v => new MultipleSelectMenuItem(v, toString)).ToList(); + + var absoluteTop = Console.CursorTop; self.WriteLines(displayArgs.Title, "", displayArgs.PleaseSelectText); var menuTop = Console.CursorTop; + menuItems[0].IsFocused = true; ShowMenu(); @@ -88,7 +90,7 @@ params T[] items if (displayArgs.ClearWhenSelected) { - self.ClearLastLines(Console.CursorTop - menuTop); + self.ClearLastLines(Console.CursorTop - absoluteTop); } return menuItems.Where(i => i.IsSelected).Select(i => i.Value); diff --git a/ExtendedConsole/ExtendedConsole.csproj b/ExtendedConsole/ExtendedConsole.csproj index 382d816..8d04e5f 100644 --- a/ExtendedConsole/ExtendedConsole.csproj +++ b/ExtendedConsole/ExtendedConsole.csproj @@ -13,16 +13,12 @@ true 7.3 Changes from previous version: -1. Added a class called MenuDisplayArgs to reduce the number of overloads and simplify the work. -2. Added a new static class called ExConsoleChooseFromEnum, containing methods that once where in ExConsoleMenu class. -3. Added new functionality - multiple select menues, in ExConsoleMultipleSelectMenu class. -This change also comes with a MultipleSelectDisplayArgs class to hold display configuration for the multiple select menu. -4. Changed void methods to return the current instance of the ExConsole class to enable fluent usage. - 1.1.0 +1. Fixed a small bug in multiple select menu + 1.1.1 https://raw.githubusercontent.com/Peled-Zohar/ExtendedConsole/master/ExtendedConsole.png extendedconsole.ico - 1.1.0.0 - 1.1.0.0 + 1.1.1.0 + 1.1.1.0 diff --git a/ExtendedConsole/bin/Debug/ExtendedConsole.1.1.1.nupkg b/ExtendedConsole/bin/Debug/ExtendedConsole.1.1.1.nupkg new file mode 100644 index 0000000..d0a2e9d Binary files /dev/null and b/ExtendedConsole/bin/Debug/ExtendedConsole.1.1.1.nupkg differ diff --git a/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.deps.json b/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.deps.json index 66f6d9e..1ef5841 100644 --- a/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.deps.json +++ b/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.deps.json @@ -7,7 +7,7 @@ "targets": { ".NETStandard,Version=v2.0": {}, ".NETStandard,Version=v2.0/": { - "ExtendedConsole/1.1.0": { + "ExtendedConsole/1.1.1": { "dependencies": { "NETStandard.Library": "2.0.3" }, @@ -24,7 +24,7 @@ } }, "libraries": { - "ExtendedConsole/1.1.0": { + "ExtendedConsole/1.1.1": { "type": "project", "serviceable": false, "sha512": "" diff --git a/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.dll b/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.dll index ce4c5c0..571f85c 100644 Binary files a/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.dll and b/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.dll differ diff --git a/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.pdb b/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.pdb index 983be8f..112a8b8 100644 Binary files a/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.pdb and b/ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.pdb differ diff --git a/ExtendedConsole/bin/Release/ExtendedConsole.1.1.1.nupkg b/ExtendedConsole/bin/Release/ExtendedConsole.1.1.1.nupkg new file mode 100644 index 0000000..2a5713a Binary files /dev/null and b/ExtendedConsole/bin/Release/ExtendedConsole.1.1.1.nupkg differ diff --git a/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.deps.json b/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.deps.json index 66f6d9e..1ef5841 100644 --- a/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.deps.json +++ b/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.deps.json @@ -7,7 +7,7 @@ "targets": { ".NETStandard,Version=v2.0": {}, ".NETStandard,Version=v2.0/": { - "ExtendedConsole/1.1.0": { + "ExtendedConsole/1.1.1": { "dependencies": { "NETStandard.Library": "2.0.3" }, @@ -24,7 +24,7 @@ } }, "libraries": { - "ExtendedConsole/1.1.0": { + "ExtendedConsole/1.1.1": { "type": "project", "serviceable": false, "sha512": "" diff --git a/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.dll b/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.dll index 146abe0..ed4ed53 100644 Binary files a/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.dll and b/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.dll differ diff --git a/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.pdb b/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.pdb index daf4eb5..7feba38 100644 Binary files a/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.pdb and b/ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.pdb differ diff --git a/ExtendedConsole/obj/Debug/ExtendedConsole.1.1.1.nuspec b/ExtendedConsole/obj/Debug/ExtendedConsole.1.1.1.nuspec new file mode 100644 index 0000000..f3985f4 --- /dev/null +++ b/ExtendedConsole/obj/Debug/ExtendedConsole.1.1.1.nuspec @@ -0,0 +1,24 @@ + + + + ExtendedConsole + 1.1.1 + Zohar Peled + Zohar Peled + false + https://github.com/Peled-Zohar/ExtendedConsole/blob/master/LICENSE + https://peled-zohar.github.io/ExtendedConsole/ + https://raw.githubusercontent.com/Peled-Zohar/ExtendedConsole/master/ExtendedConsole.png + Provides a set of methods to make your life as a programmer easier when writing a Console application. + Changes from previous version: +1. Fixed a small bug in multiple select menu + + + + + + + + + + \ No newline at end of file diff --git a/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.AssemblyInfo.cs b/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.AssemblyInfo.cs index 5d08425..815d7ea 100644 --- a/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.AssemblyInfo.cs +++ b/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.AssemblyInfo.cs @@ -15,11 +15,11 @@ [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Provides a set of methods to make your life as a programmer easier when writing a" + " Console application.")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.1.0")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.1.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.1.1")] [assembly: System.Reflection.AssemblyProductAttribute("ExtendedConsole")] [assembly: System.Reflection.AssemblyTitleAttribute("ExtendedConsole")] -[assembly: System.Reflection.AssemblyVersionAttribute("1.1.0.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.1.1.0")] [assembly: System.Resources.NeutralResourcesLanguageAttribute("en")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.AssemblyInfoInputs.cache b/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.AssemblyInfoInputs.cache index b00f5b1..1da2bba 100644 --- a/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.AssemblyInfoInputs.cache +++ b/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.AssemblyInfoInputs.cache @@ -1 +1 @@ -3117071fe27058d273a9afca6345afe471e458d0 +4349561554698d22fa31286b2368ed1c91d47e96 diff --git a/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.dll b/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.dll index ce4c5c0..571f85c 100644 Binary files a/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.dll and b/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.dll differ diff --git a/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.pdb b/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.pdb index 983be8f..112a8b8 100644 Binary files a/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.pdb and b/ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.pdb differ diff --git a/ExtendedConsole/obj/ExtendedConsole.csproj.nuget.cache b/ExtendedConsole/obj/ExtendedConsole.csproj.nuget.cache index 3003c88..f1913f9 100644 --- a/ExtendedConsole/obj/ExtendedConsole.csproj.nuget.cache +++ b/ExtendedConsole/obj/ExtendedConsole.csproj.nuget.cache @@ -1,5 +1,5 @@ { "version": 1, - "dgSpecHash": "eulTI3NxcRthT6ZYCczhKpZtx40s+WbaU/0e2ObWuMVVr0vCY94KV3EjArtkzomIvO1U1/X4mpFvKkqz2xaUWg==", + "dgSpecHash": "N/lMtwEriST3T1rqfbi3vBhzcz6LoaXgtUsmOG3F7rbvO1BOoKZ/4FB/E1reZhm/ok8zdn36UT4LgrKFUEg+Vg==", "success": true } \ No newline at end of file diff --git a/ExtendedConsole/obj/Release/ExtendedConsole.1.1.1.nuspec b/ExtendedConsole/obj/Release/ExtendedConsole.1.1.1.nuspec new file mode 100644 index 0000000..db0f6fb --- /dev/null +++ b/ExtendedConsole/obj/Release/ExtendedConsole.1.1.1.nuspec @@ -0,0 +1,24 @@ + + + + ExtendedConsole + 1.1.1 + Zohar Peled + Zohar Peled + false + https://github.com/Peled-Zohar/ExtendedConsole/blob/master/LICENSE + https://peled-zohar.github.io/ExtendedConsole/ + https://raw.githubusercontent.com/Peled-Zohar/ExtendedConsole/master/ExtendedConsole.png + Provides a set of methods to make your life as a programmer easier when writing a Console application. + Changes from previous version: +1. Fixed a small bug in multiple select menu + + + + + + + + + + \ No newline at end of file diff --git a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.AssemblyInfo.cs b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.AssemblyInfo.cs index dcc32ab..3180062 100644 --- a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.AssemblyInfo.cs +++ b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.AssemblyInfo.cs @@ -15,11 +15,11 @@ [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Provides a set of methods to make your life as a programmer easier when writing a" + " Console application.")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.1.0")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.1.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.1.1")] [assembly: System.Reflection.AssemblyProductAttribute("ExtendedConsole")] [assembly: System.Reflection.AssemblyTitleAttribute("ExtendedConsole")] -[assembly: System.Reflection.AssemblyVersionAttribute("1.1.0.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.1.1.0")] [assembly: System.Resources.NeutralResourcesLanguageAttribute("en")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.AssemblyInfoInputs.cache b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.AssemblyInfoInputs.cache index 2f35671..00899fb 100644 --- a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.AssemblyInfoInputs.cache +++ b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.AssemblyInfoInputs.cache @@ -1 +1 @@ -a3ffde1c2a832d8a1682964c38782fff5eea5de9 +822ad2fb0315b9c1501c5ac09a5cef82125fb1c2 diff --git a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.csproj.FileListAbsolute.txt b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.csproj.FileListAbsolute.txt index 4c00e05..aaa9575 100644 --- a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.csproj.FileListAbsolute.txt +++ b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.csproj.FileListAbsolute.txt @@ -3,7 +3,6 @@ C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\Extend C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\ExtendedConsole.dll C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\ExtendedConsole.pdb C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\ExtendedConsole.xml -C:\Development\ExtendedConsole\ExtendedConsole\obj\Release\netstandard2.0\ExtendedConsole.csprojAssemblyReference.cache C:\Development\ExtendedConsole\ExtendedConsole\obj\Release\netstandard2.0\ExtendedConsole.csproj.CoreCompileInputs.cache C:\Development\ExtendedConsole\ExtendedConsole\obj\Release\netstandard2.0\ExtendedConsole.AssemblyInfoInputs.cache C:\Development\ExtendedConsole\ExtendedConsole\obj\Release\netstandard2.0\ExtendedConsole.AssemblyInfo.cs diff --git a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.dll b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.dll index 146abe0..ed4ed53 100644 Binary files a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.dll and b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.dll differ diff --git a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.pdb b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.pdb index daf4eb5..7feba38 100644 Binary files a/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.pdb and b/ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.pdb differ diff --git a/ExtendedConsole/obj/project.assets.json b/ExtendedConsole/obj/project.assets.json index 19f8160..c362bc5 100644 --- a/ExtendedConsole/obj/project.assets.json +++ b/ExtendedConsole/obj/project.assets.json @@ -183,7 +183,7 @@ "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {} }, "project": { - "version": "1.1.0", + "version": "1.1.1", "restore": { "projectUniqueName": "C:\\Development\\ExtendedConsole\\ExtendedConsole\\ExtendedConsole.csproj", "projectName": "ExtendedConsole", diff --git a/UsingExtendedConsole/Program.cs b/UsingExtendedConsole/Program.cs index 06c1ee0..bdd6072 100644 --- a/UsingExtendedConsole/Program.cs +++ b/UsingExtendedConsole/Program.cs @@ -13,19 +13,6 @@ static void Main(string[] args) { Console.Title = "Using Extended Console"; - exConsole.ChooseFromEnum("s", true); - - var boolean = exConsole.ReadBool(ConsoleKey.Y, ConsoleKey.N, "Please press y or n"); - if(boolean) - { - Console.WriteLine("You've entered y"); - exConsole.Pause(); - } - else - { - exConsole.WriteLine("You've entered n").Pause(); - } - var arr = new MID[] { new MID(1, "Zohar"), @@ -36,6 +23,8 @@ static void Main(string[] args) var a = exConsole.MultipleSelectMenu(new MultipleSelectDisplayArgs("Multiple select with args", focusedItemColor:ConsoleColor.Cyan), arr); + exConsole.Pause(); + var b = exConsole.MultipleSelectMenu(new MultipleSelectDisplayArgs("Multiple select with args and toString"), s => $"{s.Id} {s.Name}" , arr); var menus = new Func[] { StringsMenu, ActionsMenu }; diff --git a/UsingExtendedConsole/bin/Debug/ExtendedConsole.dll b/UsingExtendedConsole/bin/Debug/ExtendedConsole.dll index ce4c5c0..571f85c 100644 Binary files a/UsingExtendedConsole/bin/Debug/ExtendedConsole.dll and b/UsingExtendedConsole/bin/Debug/ExtendedConsole.dll differ diff --git a/UsingExtendedConsole/bin/Debug/ExtendedConsole.pdb b/UsingExtendedConsole/bin/Debug/ExtendedConsole.pdb index 983be8f..112a8b8 100644 Binary files a/UsingExtendedConsole/bin/Debug/ExtendedConsole.pdb and b/UsingExtendedConsole/bin/Debug/ExtendedConsole.pdb differ diff --git a/UsingExtendedConsole/bin/Debug/UsingExtendedConsole.exe b/UsingExtendedConsole/bin/Debug/UsingExtendedConsole.exe index d9e3a1a..f18ab65 100644 Binary files a/UsingExtendedConsole/bin/Debug/UsingExtendedConsole.exe and b/UsingExtendedConsole/bin/Debug/UsingExtendedConsole.exe differ diff --git a/UsingExtendedConsole/bin/Debug/UsingExtendedConsole.pdb b/UsingExtendedConsole/bin/Debug/UsingExtendedConsole.pdb index 9a13347..cc1312f 100644 Binary files a/UsingExtendedConsole/bin/Debug/UsingExtendedConsole.pdb and b/UsingExtendedConsole/bin/Debug/UsingExtendedConsole.pdb differ diff --git a/UsingExtendedConsole/bin/Release/ExtendedConsole.dll b/UsingExtendedConsole/bin/Release/ExtendedConsole.dll index 146abe0..ed4ed53 100644 Binary files a/UsingExtendedConsole/bin/Release/ExtendedConsole.dll and b/UsingExtendedConsole/bin/Release/ExtendedConsole.dll differ diff --git a/UsingExtendedConsole/bin/Release/ExtendedConsole.pdb b/UsingExtendedConsole/bin/Release/ExtendedConsole.pdb index daf4eb5..7feba38 100644 Binary files a/UsingExtendedConsole/bin/Release/ExtendedConsole.pdb and b/UsingExtendedConsole/bin/Release/ExtendedConsole.pdb differ diff --git a/UsingExtendedConsole/bin/Release/UsingExtendedConsole.exe b/UsingExtendedConsole/bin/Release/UsingExtendedConsole.exe index 0f8dcae..9aef633 100644 Binary files a/UsingExtendedConsole/bin/Release/UsingExtendedConsole.exe and b/UsingExtendedConsole/bin/Release/UsingExtendedConsole.exe differ diff --git a/UsingExtendedConsole/bin/Release/UsingExtendedConsole.pdb b/UsingExtendedConsole/bin/Release/UsingExtendedConsole.pdb index af5b2e8..532c27b 100644 Binary files a/UsingExtendedConsole/bin/Release/UsingExtendedConsole.pdb and b/UsingExtendedConsole/bin/Release/UsingExtendedConsole.pdb differ diff --git a/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.csprojAssemblyReference.cache b/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.csprojAssemblyReference.cache index 9d180f9..f22b7f3 100644 Binary files a/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.csprojAssemblyReference.cache and b/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.csprojAssemblyReference.cache differ diff --git a/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.exe b/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.exe index d9e3a1a..f18ab65 100644 Binary files a/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.exe and b/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.exe differ diff --git a/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.pdb b/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.pdb index 9a13347..cc1312f 100644 Binary files a/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.pdb and b/UsingExtendedConsole/obj/Debug/UsingExtendedConsole.pdb differ diff --git a/UsingExtendedConsole/obj/Release/UsingExtendedConsole.csprojAssemblyReference.cache b/UsingExtendedConsole/obj/Release/UsingExtendedConsole.csprojAssemblyReference.cache index 2485a30..bd01958 100644 Binary files a/UsingExtendedConsole/obj/Release/UsingExtendedConsole.csprojAssemblyReference.cache and b/UsingExtendedConsole/obj/Release/UsingExtendedConsole.csprojAssemblyReference.cache differ diff --git a/UsingExtendedConsole/obj/Release/UsingExtendedConsole.exe b/UsingExtendedConsole/obj/Release/UsingExtendedConsole.exe index 0f8dcae..9aef633 100644 Binary files a/UsingExtendedConsole/obj/Release/UsingExtendedConsole.exe and b/UsingExtendedConsole/obj/Release/UsingExtendedConsole.exe differ diff --git a/UsingExtendedConsole/obj/Release/UsingExtendedConsole.pdb b/UsingExtendedConsole/obj/Release/UsingExtendedConsole.pdb index af5b2e8..532c27b 100644 Binary files a/UsingExtendedConsole/obj/Release/UsingExtendedConsole.pdb and b/UsingExtendedConsole/obj/Release/UsingExtendedConsole.pdb differ