diff --git a/Samples/ConsoleFeaturesSamples/Program.cs b/Samples/ConsoleFeaturesSamples/Program.cs index 28870280..65474e20 100644 --- a/Samples/ConsoleFeaturesSamples/Program.cs +++ b/Samples/ConsoleFeaturesSamples/Program.cs @@ -20,24 +20,26 @@ static void Main() //global PromptPlus.Config.EnabledAbortKey = false; + PromptPlus.Config.PageSize = 5; PromptPlus.StyleSchema.ApplyStyle(StyleControls.Prompt, new Style(Color.Red)); //by instance PromptPlus.Input("").Config(cfg => { cfg - .ApplyStyle(StyleControls.Answer, new Style(Color.Yellow)) + .ApplyStyle(StyleControls.Prompt, new Style(Color.Yellow)) .EnabledAbortKey(true); }); - PromptPlus.WriteLine("[RED ON WHITE]Hello[/] [YELLOW]Word[/]"); - PromptPlus.WriteLine("[RGB(255,0,0) ON WHITE]Test[YELLOW] COLOR [/] BACK COLOR [/] other text"); - PromptPlus.AppendText("[RGB(255,0,0) ON WHITE]Test[/]") - .And(" COLOR ",Color.Yellow) - .And(" BACK COLOR ",new Style(Color.Red,Color.White)) - .And("other text") - .WriteLine(); + PromptPlus.Join() + .DoubleDash($"PromptPlus Join") + .Write("[RGB(255,0,0) ON WHITE]Test[/]") + .Write(" COLOR ",Style.Default.Foreground(Color.Yellow)) + .Write(" BACK COLOR ",new Style(Color.Red,Color.White)) + .Write("other text") + .WriteLine() + .CountLines(); //standard PromptPlus.DoubleDash($"PromptPlus IgnoreColorTokens = false - Default value and usage" ); @@ -104,7 +106,7 @@ static void Main() cfg.PadRight = 2; }); - PromptPlus.BackgroundColor = ConsoleColor.Blue; + //PromptPlus.BackgroundColor = ConsoleColor.Blue; PromptPlus.Clear(); PromptPlus.SingleDash($"[yellow]Console Information[/]", DashOptions.DoubleBorder, 1 /*extra lines*/); @@ -131,6 +133,8 @@ static void Main() .Spinner(SpinnersType.Balloon) .Run(); + PromptPlus.BackgroundColor = ConsoleColor.Black; + PromptPlus.Clear(); diff --git a/Samples/MaskEditDateTimeTypeSamples/Program.cs b/Samples/MaskEditDateTimeTypeSamples/Program.cs index 8efef7c3..2749df8c 100644 --- a/Samples/MaskEditDateTimeTypeSamples/Program.cs +++ b/Samples/MaskEditDateTimeTypeSamples/Program.cs @@ -55,7 +55,7 @@ static void Main(string[] args) PromptPlus.MaskEdit("input", "MaskEdit DateTime input") .Mask(MaskedType.DateTime) .DescriptionWithInputType(FormatWeek.Long) - .Culture(new CultureInfo("pt-br")) + .Culture("pt-br") .AcceptEmptyValue() .Run(); diff --git a/Samples/MaskEditNumberTypeSamples/Program.cs b/Samples/MaskEditNumberTypeSamples/Program.cs index 3cdb71bc..c890db1d 100644 --- a/Samples/MaskEditNumberTypeSamples/Program.cs +++ b/Samples/MaskEditNumberTypeSamples/Program.cs @@ -38,6 +38,7 @@ static void Main(string[] args) PromptPlus.MaskEdit("input", "MaskEdit Number input") .Mask(MaskedType.Number) + .Culture("pt-br") .AmmoutPositions(10, 2, true) .PositiveStyle(Style.Default.Foreground(Color.Green)) .NegativeStyle(Style.Default.Foreground(Color.IndianRed)) diff --git a/Samples/SelectUserScopeSamples/Program.cs b/Samples/SelectUserScopeSamples/Program.cs index ac945d9d..38800422 100644 --- a/Samples/SelectUserScopeSamples/Program.cs +++ b/Samples/SelectUserScopeSamples/Program.cs @@ -50,8 +50,8 @@ static void Main() PromptPlus.DoubleDash("Control:Select - Using class with AdderScope and OrderBy"); var sel = PromptPlus.Select("Select") .AddItems(_datasample) - .AddItemsTo(AdderScope.Disable, _datasample.Where(x => x.IsDisabled).ToArray()) - .AddItemsTo(AdderScope.Remove, _datasample.Where(x => x.IsHide).ToArray()) + .AddItemsTo(AdderScope.Disable, _datasample.Where(x => x.IsDisabled)) + .AddItemsTo(AdderScope.Remove, _datasample.Where(x => x.IsHide)) .TextSelector(x => x.MyText) .EqualItems((item1, item2) => item1.Id == item2.Id) .ChangeDescription(x => x.MyDesc) diff --git a/Src/Controls/IPromptConfig.cs b/Src/Controls/IPromptConfig.cs index 1cfe7448..fded22ff 100644 --- a/Src/Controls/IPromptConfig.cs +++ b/Src/Controls/IPromptConfig.cs @@ -8,7 +8,7 @@ namespace PPlus.Controls { /// - /// Interface for config controls and overwrite default values + /// Interface for config controls to overwrite default values /// public interface IPromptConfig { diff --git a/Src/Controls/SelectColletion/IControlMultiSelect.cs b/Src/Controls/SelectColletion/IControlMultiSelect.cs index d1eabf0d..285d8aeb 100644 --- a/Src/Controls/SelectColletion/IControlMultiSelect.cs +++ b/Src/Controls/SelectColletion/IControlMultiSelect.cs @@ -4,6 +4,7 @@ // *************************************************************************************** using System; +using System.Collections; using System.Collections.Generic; using System.Linq.Expressions; @@ -173,6 +174,16 @@ public interface IControlMultiSelect : IPromptControls> /// IControlMultiSelect AddItemsTo(AdderScope scope, params T[] values); + /// + /// Add Items colletion to scope Disable/Remove + ///
At startup the list items will be compared and will be removed or disabled
+ ///
Tip: Use for custom comparer
+ ///
+ /// scope Disable/Remove + /// items colletion + /// + IControlMultiSelect AddItemsTo(AdderScope scope, IEnumerable values); + /// /// Custom item comparator /// diff --git a/Src/Controls/SelectColletion/IControlSelect.cs b/Src/Controls/SelectColletion/IControlSelect.cs index 4e2b9fed..fc40b7cd 100644 --- a/Src/Controls/SelectColletion/IControlSelect.cs +++ b/Src/Controls/SelectColletion/IControlSelect.cs @@ -4,6 +4,7 @@ // *************************************************************************************** using System; +using System.Collections; using System.Collections.Generic; using System.Linq.Expressions; @@ -135,6 +136,16 @@ public interface IControlSelect : IPromptControls /// IControlSelect AddItemsTo(AdderScope scope, params T[] values); + /// + /// Add Items colletion to scope Disable/Remove + ///
At startup the list items will be compared and will be removed or disabled
+ ///
Tip: Use for custom comparer
+ ///
+ /// scope Disable/Remove + /// items colletion + /// + IControlSelect AddItemsTo(AdderScope scope, IEnumerable values); + /// /// Add Item in a group to list ///
AddItemGrouped cannot be used with OrderBy/OrderByDescending
diff --git a/Src/Controls/SelectColletion/MultiSelectControl.cs b/Src/Controls/SelectColletion/MultiSelectControl.cs index 923c991d..e27c68ef 100644 --- a/Src/Controls/SelectColletion/MultiSelectControl.cs +++ b/Src/Controls/SelectColletion/MultiSelectControl.cs @@ -377,6 +377,18 @@ public IControlMultiSelect AddItemsGrouped(string group, IEnumerable value } public IControlMultiSelect AddItemsTo(AdderScope scope,params T[] values) + { + InternalAdd(scope, values); + return this; + } + + public IControlMultiSelect AddItemsTo(AdderScope scope, IEnumerable values) + { + InternalAdd(scope, values); + return this; + } + + private void InternalAdd(AdderScope scope, IEnumerable values) { foreach (var item in values) { @@ -396,7 +408,6 @@ public IControlMultiSelect AddItemsTo(AdderScope scope,params T[] values) throw new PromptPlusException($"AdderScope : {scope} Not Implemented"); } } - return this; } public IControlMultiSelect OverflowAnswer(Overflow value) diff --git a/Src/Controls/SelectColletion/SelectControl.cs b/Src/Controls/SelectColletion/SelectControl.cs index b74573a3..8a329e17 100644 --- a/Src/Controls/SelectColletion/SelectControl.cs +++ b/Src/Controls/SelectColletion/SelectControl.cs @@ -187,7 +187,20 @@ public IControlSelect AddItems(IEnumerable value, bool disable = false) return this; } + public IControlSelect AddItemsTo(AdderScope scope, IEnumerable values) + { + InternalAdd(scope, values); + return this; + } + + public IControlSelect AddItemsTo(AdderScope scope,params T[] values) + { + InternalAdd(scope,values); + return this; + } + + private void InternalAdd(AdderScope scope, IEnumerable values) { foreach (var item in values) { @@ -207,7 +220,6 @@ public IControlSelect AddItemsTo(AdderScope scope,params T[] values) throw new PromptPlusException($"AddItemsTo : {scope} Not Implemented"); } } - return this; } public IControlSelect AutoSelect(bool value = true) diff --git a/Src/Drivers/AppendTextControl.cs b/Src/Drivers/AppendTextControl.cs deleted file mode 100644 index f233126e..00000000 --- a/Src/Drivers/AppendTextControl.cs +++ /dev/null @@ -1,70 +0,0 @@ -// *************************************************************************************** -// MIT LICENCE -// The maintenance and evolution is maintained by the PromptPlus project under MIT license -// *************************************************************************************** - -using System; -using System.Collections.Generic; -using PPlus.Drivers; - -namespace PPlus -{ - internal class AppendTextControl : IAppendText - { - private readonly List _segments = new(); - - public IAppendText And(string text) - { - if (!string.IsNullOrEmpty(text)) - { - _segments.Add(new Segment(text, new Style(Style.Default.Foreground, Style.Default.Background, Style.Default.OverflowStrategy))); - } - return this; - } - - public IAppendText And(string text, Style style) - { - if (!string.IsNullOrEmpty(text)) - { - _segments.Add(new Segment(text, style)); - } - return this; - } - - public IAppendText And(string text, Color color) - { - if (!string.IsNullOrEmpty(text)) - { - _segments.Add(new Segment(text, new Style(color,Style.Default.Background,Style.Default.OverflowStrategy))); - } - return this; - } - - public void Write() - { - WriteSegments(false); - } - - public void WriteLine() - { - WriteSegments(true); - } - - private void WriteSegments(bool newline) - { - if (_segments.Count == 0) - { - return; - } - PromptPlus.Write(_segments[0].Text, _segments[0].Style, true); - for (int i = 1; i < _segments.Count; i++) - { - PromptPlus.Write(_segments[i].Text, _segments[i].Style, false); - } - if (newline) - { - PromptPlus.Write(Environment.NewLine, clearrestofline:false); - } - } - } -} diff --git a/Src/Drivers/DriveExtensions.cs b/Src/Drivers/DriveExtensions.cs index a87d6b4f..e77be12d 100644 --- a/Src/Drivers/DriveExtensions.cs +++ b/Src/Drivers/DriveExtensions.cs @@ -43,28 +43,28 @@ static PromptPlus() } else { - OriginalCodePageEncode = System.Console.OutputEncoding; + OriginalCodePageEncode = Console.OutputEncoding; var (codepagefrom, codepageto) = ConvertCodePage; - if (System.Console.OutputEncoding.CodePage.ToString() == codepageto) + if (Console.OutputEncoding.CodePage.ToString() == codepageto) { unicodesupported = true; } - else if (System.Console.OutputEncoding.CodePage.ToString() == codepagefrom) + else if (Console.OutputEncoding.CodePage.ToString() == codepagefrom) { - System.Console.OutputEncoding = Encoding.GetEncoding(int.Parse(codepageto)); + Console.OutputEncoding = Encoding.GetEncoding(int.Parse(codepageto)); unicodesupported = true; } - else if (System.Console.OutputEncoding.Equals(Encoding.Unicode)) + else if (Console.OutputEncoding.Equals(Encoding.Unicode)) { unicodesupported = true; } - else if (System.Console.OutputEncoding.Equals(Encoding.BigEndianUnicode)) + else if (Console.OutputEncoding.Equals(Encoding.BigEndianUnicode)) { unicodesupported = true; } - else if (System.Console.OutputEncoding.Equals(Encoding.UTF32)) + else if (Console.OutputEncoding.Equals(Encoding.UTF32)) { unicodesupported = true; } @@ -91,46 +91,18 @@ private static void CurrentDomain_ProcessExit(object? sender, EventArgs e) Thread.CurrentThread.CurrentCulture = AppConsoleCulture; if (!IsRunningInUnitTest) { - System.Console.OutputEncoding = OriginalCodePageEncode; + Console.OutputEncoding = OriginalCodePageEncode; } ResetColor(); } /// - /// Add text to the recording buffer + /// Start Join Commands /// - /// Text to write - /// - public static IAppendText AppendText(string text) + /// + public static IJointConsole Join() { - var ctrl = new AppendTextControl(); - ctrl.And(text); - return ctrl; - } - - /// - /// Add text to the recording buffer with - /// - /// Text to write - /// The - /// - public static IAppendText AppendText(string text, Style style) - { - var ctrl = new AppendTextControl(); - ctrl.And(text, style); - return ctrl; - } - - /// - /// Add text to the recording buffer with forecolor - /// - /// Text to write - /// The forecolor. - /// - public static IAppendText AppendText(string text, Color color) - { - var ctrl = new AppendTextControl(); - ctrl.And(text, color); + var ctrl = new JoinConsoleControl(); return ctrl; } @@ -246,7 +218,7 @@ internal static bool IsControlText ///
/// The ForegroundColor /// The BackgroundColor - public static void ConsoleDefaultColor(Color forecorlor, Color background) + public static void DefaultColor(Color forecorlor, Color background) { _consoledrive.ForegroundColor = forecorlor; _consoledrive.BackgroundColor = background; diff --git a/Src/Drivers/IAppendText.cs b/Src/Drivers/IAppendText.cs deleted file mode 100644 index 43e5a76a..00000000 --- a/Src/Drivers/IAppendText.cs +++ /dev/null @@ -1,46 +0,0 @@ -// *************************************************************************************** -// MIT LICENCE -// The maintenance and evolution is maintained by the PromptPlus project under MIT license -// *************************************************************************************** - -namespace PPlus.Drivers -{ - /// - /// Represents the interface with all Methods of the Conteole Append control - /// - public interface IAppendText - { - /// - /// Add text to the recording buffer - /// - /// Text to write - /// - IAppendText And(string text); - - /// - /// Add text to the recording buffer with - /// - /// Text to write - /// The - /// - IAppendText And(string text, Style style); - - /// - /// Add text to the recording buffer with forecolor - /// - /// Text to write - /// The forecolor. - /// - IAppendText And(string text, Color color); - - /// - /// Write a text to output console. - /// - void Write(); - - /// - /// Write line terminator a text to output console with line terminator. - /// - void WriteLine(); - } -} diff --git a/Src/Drivers/IJointConsole.cs b/Src/Drivers/IJointConsole.cs new file mode 100644 index 00000000..5088b2dd --- /dev/null +++ b/Src/Drivers/IJointConsole.cs @@ -0,0 +1,96 @@ +// *************************************************************************************** +// MIT LICENCE +// The maintenance and evolution is maintained by the PromptPlus project under MIT license +// *************************************************************************************** + +using System; + +namespace PPlus.Drivers +{ + /// + /// Represents the interface with all Methods of the Joint control + /// + public interface IJointConsole + { + + /// + /// Write result function to output console and next. + /// + /// The function + /// + IJointConsole Write(Func func); + + /// + /// Write a Exception to output console and next + /// + /// Exception to write + /// Style of text + /// Clear rest of line after write + /// + IJointConsole Write(Exception value, Style? style = null, bool clearrestofline = false); + + /// + /// Write a text to output console and next + /// + /// + IJointConsole Write(string value, Style? style = null, bool clearrestofline = false); + + /// + /// Write result function with line terminator to output console next. + /// + /// The function + /// Number of lines write on console + IJointConsole WriteLine(Func func); + + /// + /// Write a Exception with line terminator to output console and next + /// + /// Exception to write + /// Style of text + /// Clear rest of line after write + /// + IJointConsole WriteLine(Exception value, Style? style = null, bool clearrestofline = true); + + /// + /// Write lines with line terminator and next + /// + /// Numbers de lines. + /// + IJointConsole WriteLines(int steps = 1); + + /// + /// Write a text to output console with line terminator and next. + /// + /// text to write + /// Style of text + /// Clear rest of line after write + /// + IJointConsole WriteLine(string? value = null, Style? style = null, bool clearrestofline = true); + + /// + /// Writes text line representation whie colors and Write single dash after. + /// + /// The value to write. + /// character + /// Number lines to write after write value + /// The to write. + /// + IJointConsole SingleDash(string value, DashOptions dashOptions = DashOptions.AsciiSingleBorder, int extralines = 0, Style? style = null); + + + /// + /// Writes text line representation whie colors in a pair of lines of dashes and next. + /// + /// The value to write. + /// character + /// Number lines to write after write value + /// The to write. + /// + IJointConsole DoubleDash(string value, DashOptions dashOptions = DashOptions.AsciiSingleBorder, int extralines = 0, Style? style = null); + + /// + /// Get number of lines write on Join. + /// + int CountLines(); + } +} diff --git a/Src/Drivers/JoinConsoleControl.cs b/Src/Drivers/JoinConsoleControl.cs new file mode 100644 index 00000000..23cf378b --- /dev/null +++ b/Src/Drivers/JoinConsoleControl.cs @@ -0,0 +1,75 @@ +// *************************************************************************************** +// MIT LICENCE +// The maintenance and evolution is maintained by the PromptPlus project under MIT license +// *************************************************************************************** + +using System; +using PPlus.Drivers; + +namespace PPlus +{ + internal class JoinConsoleControl : IJointConsole + { + private int _countlines = 0; + + public int CountLines() + { + return _countlines; + } + + public IJointConsole DoubleDash(string value, DashOptions dashOptions = DashOptions.AsciiSingleBorder, int extralines = 0, Style? style = null) + { + _countlines += PromptPlus.DoubleDash(value, dashOptions, extralines, style); + return this; + } + + public IJointConsole SingleDash(string value, DashOptions dashOptions = DashOptions.AsciiSingleBorder, int extralines = 0, Style? style = null) + { + _countlines += PromptPlus.SingleDash(value, dashOptions, extralines, style); + return this; + } + + public IJointConsole Write(Func func) + { + _countlines += PromptPlus.Write(func.Invoke()); + return this; + } + + public IJointConsole Write(Exception value, Style? style = null, bool clearrestofline = false) + { + _countlines += PromptPlus.Write(value,style,clearrestofline); + return this; + } + + public IJointConsole Write(string value, Style? style = null, bool clearrestofline = false) + { + _countlines += PromptPlus.Write(value, style, clearrestofline); + return this; + } + + public IJointConsole WriteLine(Func func) + { + _countlines += PromptPlus.WriteLine(func.Invoke()); + return this; + } + + public IJointConsole WriteLine(Exception value, Style? style = null, bool clearrestofline = true) + { + _countlines += PromptPlus.WriteLine(value, style, clearrestofline); + return this; + } + + public IJointConsole WriteLine(string? value = null, Style? style = null, bool clearrestofline = true) + { + _countlines += PromptPlus.WriteLine(value, style, clearrestofline); + return this; + } + + public IJointConsole WriteLines(int steps = 1) + { + PromptPlus.WriteLines(steps); + _countlines += steps; + return this; + } + } +} diff --git a/Src/Drivers/WriteLineExtensions.cs b/Src/Drivers/WriteLineExtensions.cs index 45540f1f..e1209be8 100644 --- a/Src/Drivers/WriteLineExtensions.cs +++ b/Src/Drivers/WriteLineExtensions.cs @@ -16,7 +16,8 @@ public static partial class PromptPlus /// character /// Number lines to write after write value /// The to write. - public static void SingleDash(string value, DashOptions dashOptions = DashOptions.AsciiSingleBorder, int extralines = 0, Style? style = null) + /// Number of lines write on console + public static int SingleDash(string value, DashOptions dashOptions = DashOptions.AsciiSingleBorder, int extralines = 0, Style? style = null) { var aux = Segment.Parse(value, style ?? Style.Default); if (aux.Length > 1) @@ -49,9 +50,10 @@ public static void SingleDash(string value, DashOptions dashOptions = DashOption break; } } - WriteLine(aux[0].Text, aux[0].Style); - WriteLine(new string(wrapperChar, aux[0].Text.Length), aux[0].Style); + int lines = WriteLine(aux[0].Text, aux[0].Style); + lines += WriteLine(new string(wrapperChar, aux[0].Text.Length), aux[0].Style); WriteLines(extralines); + return lines + extralines; } /// @@ -74,7 +76,8 @@ public static void WriteLines(int steps = 1) /// character /// Number lines to write after write value /// The to write. - public static void DoubleDash(string value, DashOptions dashOptions = DashOptions.AsciiSingleBorder, int extralines = 0, Style? style = null) + /// Number of lines write on console + public static int DoubleDash(string value, DashOptions dashOptions = DashOptions.AsciiSingleBorder, int extralines = 0, Style? style = null) { var aux = Segment.Parse(value, style ?? Style.Default); if (aux.Length > 1) @@ -107,10 +110,11 @@ public static void DoubleDash(string value, DashOptions dashOptions = DashOption break; } } - WriteLine(new string(wrapperChar, aux[0].Text.Length), aux[0].Style); - WriteLine(aux[0].Text, aux[0].Style); - WriteLine(new string(wrapperChar, aux[0].Text.Length), aux[0].Style); + int lines = WriteLine(new string(wrapperChar, aux[0].Text.Length), aux[0].Style); + lines += WriteLine(aux[0].Text, aux[0].Style); + lines += WriteLine(new string(wrapperChar, aux[0].Text.Length), aux[0].Style); WriteLines(extralines); + return lines + extralines; } } } diff --git a/docs/apis/apis.md b/docs/apis/apis.md index 7e731bc3..3a0e3052 100644 --- a/docs/apis/apis.md +++ b/docs/apis/apis.md @@ -216,7 +216,7 @@ ## Namespace PPlus.Drivers -- [IAppendText](./pplus.drivers.iappendtext.md) +- [IJointConsole](./pplus.drivers.ijointconsole.md) - - - diff --git a/docs/apis/pplus.controls.icontrolmultiselect-1.md b/docs/apis/pplus.controls.icontrolmultiselect-1.md index c1d0e46a..736f495d 100644 --- a/docs/apis/pplus.controls.icontrolmultiselect-1.md +++ b/docs/apis/pplus.controls.icontrolmultiselect-1.md @@ -164,6 +164,26 @@ items colletion [IControlMultiSelect<T>](./pplus.controls.icontrolmultiselect-1.md) +### **AddItemsTo(AdderScope, IEnumerable<T>)** + +Add Items colletion to scope Disable/Remove [AdderScope](./pplus.controls.adderscope.md)
At startup the list items will be compared and will be removed or disabled
Tip: Use for custom comparer + +```csharp +IControlMultiSelect AddItemsTo(AdderScope scope, IEnumerable values) +``` + +#### Parameters + +`scope` [AdderScope](./pplus.controls.adderscope.md)
+scope Disable/Remove + +`values` IEnumerable<T>
+items colletion + +#### Returns + +[IControlMultiSelect<T>](./pplus.controls.icontrolmultiselect-1.md) + ###
**AppendGroupOnDescription(Boolean)** Append group text on description. Default false diff --git a/docs/apis/pplus.controls.icontrolselect-1.md b/docs/apis/pplus.controls.icontrolselect-1.md index ae3a1522..70c2c9e0 100644 --- a/docs/apis/pplus.controls.icontrolselect-1.md +++ b/docs/apis/pplus.controls.icontrolselect-1.md @@ -135,6 +135,26 @@ items colletion [IControlSelect<T>](./pplus.controls.icontrolselect-1.md) +### **AddItemsTo(AdderScope, IEnumerable<T>)** + +Add Items colletion to scope Disable/Remove [AdderScope](./pplus.controls.adderscope.md)
At startup the list items will be compared and will be removed or disabled
Tip: Use for custom comparer + +```csharp +IControlSelect AddItemsTo(AdderScope scope, IEnumerable values) +``` + +#### Parameters + +`scope` [AdderScope](./pplus.controls.adderscope.md)
+scope Disable/Remove + +`values` IEnumerable<T>
+items colletion + +#### Returns + +[IControlSelect<T>](./pplus.controls.icontrolselect-1.md) + ###
**AppendGroupOnDescription(Boolean)** Append group text on description. Default false diff --git a/docs/apis/pplus.controls.ipromptconfig.md b/docs/apis/pplus.controls.ipromptconfig.md index 2a1ac3ff..44f5018d 100644 --- a/docs/apis/pplus.controls.ipromptconfig.md +++ b/docs/apis/pplus.controls.ipromptconfig.md @@ -12,7 +12,7 @@ Namespace: PPlus.Controls -Interface for config controls and overwrite default values +Interface for config controls to overwrite default values ```csharp public interface IPromptConfig diff --git a/docs/apis/pplus.drivers.ijointconsole.md b/docs/apis/pplus.drivers.ijointconsole.md new file mode 100644 index 00000000..2967dde5 --- /dev/null +++ b/docs/apis/pplus.drivers.ijointconsole.md @@ -0,0 +1,229 @@ +# PromptPlus API:IJointConsole + +[![Build](https://github.com/FRACerqueira/PromptPlus/workflows/Build/badge.svg)](https://github.com/FRACerqueira/PromptPlus/actions/workflows/build.yml) +[![Publish](https://github.com/FRACerqueira/PromptPlus/actions/workflows/publish.yml/badge.svg)](https://github.com/FRACerqueira/PromptPlus/actions/workflows/publish.yml) +[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/FRACerqueira/PromptPlus/blob/master/LICENSE) +[![NuGet](https://img.shields.io/nuget/v/PromptPlus)](https://www.nuget.org/packages/PromptPlus/) +[![Downloads](https://img.shields.io/nuget/dt/PromptPlus)](https://www.nuget.org/packages/PromptPlus/) + +[**Back to List Api**](./apis.md) + +# IJointConsole + +Namespace: PPlus.Drivers + +Represents the interface with all Methods of the Joint control + +```csharp +public interface IJointConsole +``` + +## Methods + +### **CountLines()** + +Get number of lines write on Join. + +```csharp +int CountLines() +``` + +#### Returns + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) + +### **DoubleDash(String, DashOptions, Int32, Nullable<Style>)** + +Writes text line representation whie colors in a pair of lines of dashes and next. + +```csharp +IJointConsole DoubleDash(string value, DashOptions dashOptions, int extralines, Nullable