From 2c47aaa5abdc8a843abb489127f8a66d9420564d Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Mon, 18 Mar 2019 21:38:17 +0200 Subject: [PATCH 01/57] created the net core project. --- .../ConsoleTools.Demo.Guard.csproj | 2 +- .../ConsoleTools.Demo.InputControls.csproj | 2 +- .../ConsoleTools.Demo.Musical.csproj | 2 +- .../ConsoleTools.Demo.Pause.csproj | 2 +- .../ConsoleTools.Demo.ProgressBar.csproj | 2 +- .../ConsoleTools.Demo.ProgressBarDemo.csproj | 3 +- .../ConsoleTools.Demo.Prompter.csproj | 2 +- .../ConsoleTools.Demo.ScrollMenu.csproj | 2 +- .../ConsoleTools.Demo.Spinners.csproj | 2 +- .../ConsoleTools.Demo.TabularData.csproj | 3 +- .../ConsoleTools.Demo.TextMenu.csproj | 2 +- .../ConsoleTools.Demo.WriteText.csproj | 2 +- .../ConsoleTools.Tests.csproj | 9 +- .../ConsoleTools.Tutorial.csproj | 2 +- sources/ConsoleTools/ConsoleTools.sln | 20 +- .../ConsoleTools/ConsoleTools.csproj | 278 +++--------------- .../ConsoleTools/InputControls/DoubleWrite.cs | 46 --- .../ConsoleTools/InputControls/FloatWrite.cs | 46 --- .../ConsoleTools/InputControls/Int32Write.cs | 46 --- .../ConsoleTools/InputControls/Int64Write.cs | 46 --- .../ListInputResources.Designer.cs | 2 +- .../ConsoleTools/InputControls/StringWrite.cs | 46 --- .../ValueInputResources.Designer.cs | 2 +- .../ConsoleTools/InputControls/ValueWrite.cs | 124 -------- .../YesNoQuestionResources.Designer.cs | 2 +- .../ConsoleTools/PauseResources.Designer.cs | 2 +- .../Spinners/SpinnerResources.Designer.cs | 2 +- sources/ConsoleTools/ConsoleTools/WinAPI.cs | 81 ----- 28 files changed, 76 insertions(+), 704 deletions(-) delete mode 100644 sources/ConsoleTools/ConsoleTools/InputControls/DoubleWrite.cs delete mode 100644 sources/ConsoleTools/ConsoleTools/InputControls/FloatWrite.cs delete mode 100644 sources/ConsoleTools/ConsoleTools/InputControls/Int32Write.cs delete mode 100644 sources/ConsoleTools/ConsoleTools/InputControls/Int64Write.cs delete mode 100644 sources/ConsoleTools/ConsoleTools/InputControls/StringWrite.cs delete mode 100644 sources/ConsoleTools/ConsoleTools/InputControls/ValueWrite.cs delete mode 100644 sources/ConsoleTools/ConsoleTools/WinAPI.cs diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Guard/ConsoleTools.Demo.Guard.csproj b/sources/ConsoleTools/ConsoleTools.Demo.Guard/ConsoleTools.Demo.Guard.csproj index 7eee8d8c..27c566ae 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Guard/ConsoleTools.Demo.Guard.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.Guard/ConsoleTools.Demo.Guard.csproj @@ -62,7 +62,7 @@ - {5a50aa3d-e14a-4e0c-bc6a-06aa1d6a5524} + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControls/ConsoleTools.Demo.InputControls.csproj b/sources/ConsoleTools/ConsoleTools.Demo.InputControls/ConsoleTools.Demo.InputControls.csproj index fa2346d9..d6fb24e6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControls/ConsoleTools.Demo.InputControls.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControls/ConsoleTools.Demo.InputControls.csproj @@ -77,7 +77,7 @@ - {5A50AA3D-E14A-4E0C-BC6A-06AA1D6A5524} + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Musical/ConsoleTools.Demo.Musical.csproj b/sources/ConsoleTools/ConsoleTools.Demo.Musical/ConsoleTools.Demo.Musical.csproj index 6be019b0..4a5b5ee5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Musical/ConsoleTools.Demo.Musical.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.Musical/ConsoleTools.Demo.Musical.csproj @@ -62,7 +62,7 @@ - {5a50aa3d-e14a-4e0c-bc6a-06aa1d6a5524} + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Pause/ConsoleTools.Demo.Pause.csproj b/sources/ConsoleTools/ConsoleTools.Demo.Pause/ConsoleTools.Demo.Pause.csproj index ee2837ee..1a8eb158 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Pause/ConsoleTools.Demo.Pause.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.Pause/ConsoleTools.Demo.Pause.csproj @@ -61,7 +61,7 @@ - {5A50AA3D-E14A-4E0C-BC6A-06AA1D6A5524} + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBar/ConsoleTools.Demo.ProgressBar.csproj b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBar/ConsoleTools.Demo.ProgressBar.csproj index ed471b83..df7aae24 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBar/ConsoleTools.Demo.ProgressBar.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBar/ConsoleTools.Demo.ProgressBar.csproj @@ -61,7 +61,7 @@ - {5a50aa3d-e14a-4e0c-bc6a-06aa1d6a5524} + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/ConsoleTools.Demo.ProgressBarDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/ConsoleTools.Demo.ProgressBarDemo.csproj index 3407de7e..0445a333 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/ConsoleTools.Demo.ProgressBarDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/ConsoleTools.Demo.ProgressBarDemo.csproj @@ -65,11 +65,10 @@ - {5a50aa3d-e14a-4e0c-bc6a-06aa1d6a5524} + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools - - \ No newline at end of file + + diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/DoubleWrite.cs b/sources/ConsoleTools/ConsoleTools/InputControls/DoubleWrite.cs deleted file mode 100644 index 65a11a0c..00000000 --- a/sources/ConsoleTools/ConsoleTools/InputControls/DoubleWrite.cs +++ /dev/null @@ -1,46 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.InputControls -{ - /// - /// Displays a value to the console. - /// - public class DoubleWrite : ValueWrite - { - /// - /// Initializes a new instance of the class. - /// - public DoubleWrite() - { - } - - /// - /// Initializes a new instance of the class with - /// the label to be displayed in front of the value. - /// - /// The label to be displayed when the user is requested to provide the value. - public DoubleWrite(string label) - : base(label) - { - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/FloatWrite.cs b/sources/ConsoleTools/ConsoleTools/InputControls/FloatWrite.cs deleted file mode 100644 index 7dcdbf1b..00000000 --- a/sources/ConsoleTools/ConsoleTools/InputControls/FloatWrite.cs +++ /dev/null @@ -1,46 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.InputControls -{ - /// - /// Displays a value to the console. - /// - public class FloatWrite : ValueWrite - { - /// - /// Initializes a new instance of the class. - /// - public FloatWrite() - { - } - - /// - /// Initializes a new instance of the class with - /// the label to be displayed in front of the value. - /// - /// The label to be displayed when the user is requested to provide the value. - public FloatWrite(string label) - : base(label) - { - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int32Write.cs b/sources/ConsoleTools/ConsoleTools/InputControls/Int32Write.cs deleted file mode 100644 index 2e6432e6..00000000 --- a/sources/ConsoleTools/ConsoleTools/InputControls/Int32Write.cs +++ /dev/null @@ -1,46 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.InputControls -{ - /// - /// Displays a value to the console. - /// - public class Int32Write : ValueWrite - { - /// - /// Initializes a new instance of the class. - /// - public Int32Write() - { - } - - /// - /// Initializes a new instance of the class with - /// the label to be displayed in front of the value. - /// - /// The label to be displayed when the user is requested to provide the value. - public Int32Write(string label) - : base(label) - { - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int64Write.cs b/sources/ConsoleTools/ConsoleTools/InputControls/Int64Write.cs deleted file mode 100644 index dbee466d..00000000 --- a/sources/ConsoleTools/ConsoleTools/InputControls/Int64Write.cs +++ /dev/null @@ -1,46 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.InputControls -{ - /// - /// Displays a value to the console. - /// - public class Int64Write : ValueWrite - { - /// - /// Initializes a new instance of the class. - /// - public Int64Write() - { - } - - /// - /// Initializes a new instance of the class with - /// the label to be displayed in front of the value. - /// - /// The label to be displayed when the user is requested to provide the value. - public Int64Write(string label) - : base(label) - { - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.Designer.cs b/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.Designer.cs index bd3c578a..93006961 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.Designer.cs @@ -19,7 +19,7 @@ namespace DustInTheWind.ConsoleTools.InputControls { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class ListInputResources { diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/StringWrite.cs b/sources/ConsoleTools/ConsoleTools/InputControls/StringWrite.cs deleted file mode 100644 index 90e89b92..00000000 --- a/sources/ConsoleTools/ConsoleTools/InputControls/StringWrite.cs +++ /dev/null @@ -1,46 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.InputControls -{ - /// - /// Displays a value to the console. - /// - public class StringWrite : ValueWrite - { - /// - /// Initializes a new instance of the class. - /// - public StringWrite() - { - } - - /// - /// Initializes a new instance of the class with - /// the label to be displayed in front of the value. - /// - /// The label to be displayed in front of the value. - public StringWrite(string label) - : base(label) - { - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.Designer.cs b/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.Designer.cs index 2e86911a..54c4b85c 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.Designer.cs @@ -19,7 +19,7 @@ namespace DustInTheWind.ConsoleTools.InputControls { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class ValueInputResources { diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ValueWrite.cs b/sources/ConsoleTools/ConsoleTools/InputControls/ValueWrite.cs deleted file mode 100644 index 03c670c5..00000000 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ValueWrite.cs +++ /dev/null @@ -1,124 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools.InputControls -{ - /// - /// Displays a value to the console. - /// - /// The type of the value that is displayed to the user. - public class ValueWrite : Control - { - private readonly Label labelControl = new Label - { - ForegroundColor = CustomConsole.EmphasiesColor - }; - - /// - /// Gets or sets the label text to be displayed in front of the value. - /// - public string Label { get; set; } - - /// - /// Gets or sets the value that needs to be displayed. - /// - public T Value { get; set; } - - /// - /// Gets or sets the amount of space to be displayed between the label and the value. - /// - public int SpaceAfterLabel - { - get { return labelControl.MarginRight; } - set { labelControl.MarginRight = value; } - } - - /// - /// Gets or sets the foreground color used to display the label text. - /// - public ConsoleColor? LabelForegroundColor - { - get { return labelControl.ForegroundColor; } - set { labelControl.ForegroundColor = value; } - } - - /// - /// Gets or sets the background color used to display the label text. - /// - public ConsoleColor? LabelBackgroundColor - { - get { return labelControl.BackgroundColor; } - set { labelControl.BackgroundColor = value; } - } - - /// - /// Initializes a new instance of the class. - /// - public ValueWrite() - { - } - - /// - /// Initializes a new instance of the class with - /// the label to be displayed in front of the value. - /// - /// The label to be displayed in front of the value. - public ValueWrite(string label) - { - Label = label; - } - - public void Write(T value) - { - Value = value; - Display(); - } - - /// - /// Writes a value to the Console output. - /// - protected override void DoDisplayContent() - { - labelControl.Text = Label; - labelControl.Display(); - - CustomConsole.WriteLine(Value); - } - - /// - /// Reads a value from the console using a with default configuration. - /// - /// The label text to be displayed. - /// The value to be displayed. - /// The value read from the console. - public static void QuickDisplay(string label, T value) - { - ValueWrite valueWrite = new ValueWrite - { - Label = label, - Value = value - }; - valueWrite.Display(); - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.Designer.cs b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.Designer.cs index 1277669a..8254a91c 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.Designer.cs @@ -19,7 +19,7 @@ namespace DustInTheWind.ConsoleTools.InputControls { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class YesNoQuestionResources { diff --git a/sources/ConsoleTools/ConsoleTools/PauseResources.Designer.cs b/sources/ConsoleTools/ConsoleTools/PauseResources.Designer.cs index 610b5c6f..8b915854 100644 --- a/sources/ConsoleTools/ConsoleTools/PauseResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools/PauseResources.Designer.cs @@ -19,7 +19,7 @@ namespace DustInTheWind.ConsoleTools { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class PauseResources { diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.Designer.cs b/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.Designer.cs index bf1f5ab1..a7645459 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.Designer.cs @@ -19,7 +19,7 @@ namespace DustInTheWind.ConsoleTools.Spinners { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class SpinnerResources { diff --git a/sources/ConsoleTools/ConsoleTools/WinAPI.cs b/sources/ConsoleTools/ConsoleTools/WinAPI.cs deleted file mode 100644 index 98c17cce..00000000 --- a/sources/ConsoleTools/ConsoleTools/WinAPI.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace ConsoleApplication1 -{ - [StructLayout(LayoutKind.Sequential)] - struct COORD - { - public short X; - public short Y; - } - - internal static class WinAPI - { - public const Int16 STD_INPUT_HANDLE = -10; - public const Int16 STD_OUTPUT_HANDLE = -11; - public const Int16 STD_ERROR_HANDLE = -12; - - public const int INVALID_HANDLE_VALUE = -1; - - [DllImport("Kernel32.dll", SetLastError = true)] - public static extern int SetConsoleCursorPosition(IntPtr hConsoleOutput, COORD dwCursorPosition); - - [DllImport("kernel32.dll", SetLastError = true)] - public static extern IntPtr GetStdHandle(int nStdHandle); - - //[DllImport("kernel32.dll", SetLastError = true)] - //public static extern int ReadConsoleOutputCharacter(IntPtr hConsoleOutput, LPTSTR lpCharacter, int nLength, COORD dwReadCoord, LPDWORD lpNumberOfCharsRead); - - [DllImport("kernel32.dll")] - public static extern bool ReadConsoleOutputCharacter(IntPtr hConsoleOutput, [Out] StringBuilder lpCharacter, uint nLength, COORD dwReadCoord, out uint lpNumberOfCharsRead); - - - /// - /// - /// - /// - /// - /// - public static void SetConsoleCursorPosition(short x, short y) - { - IntPtr h = WinAPI.GetStdHandle(WinAPI.STD_OUTPUT_HANDLE); - COORD coord = new COORD(); - coord.X = x; - coord.Y = y; - if (WinAPI.SetConsoleCursorPosition(h, coord) == 0) - { - throw new Win32Exception(); - } - } - - public static string ReadALineOfConsoleOutput(short lineIndex) - { - IntPtr stdout = WinAPI.GetStdHandle(WinAPI.STD_OUTPUT_HANDLE); - - if (stdout.ToInt32() == INVALID_HANDLE_VALUE) - throw new Win32Exception(); - - // this assumes the console screen buffer is 80 columns wide. - // You can call GetConsoleScreenBufferInfo() to get its actual dimensions. - uint nLength = 80; - StringBuilder lpCharacter = new StringBuilder((int)nLength); - - // read from the first character of the first line (0, 0). - COORD dwReadCoord; - dwReadCoord.X = 0; - dwReadCoord.Y = lineIndex; - - uint lpNumberOfCharsRead = 0; - - if (!ReadConsoleOutputCharacter(stdout, lpCharacter, nLength, dwReadCoord, out lpNumberOfCharsRead)) - throw new Win32Exception(); - - return lpCharacter.ToString(); - } - } -} From 8a7b4cfebab1269eb659bc98eab74454451b19b0 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Mon, 18 Mar 2019 21:54:21 +0200 Subject: [PATCH 02/57] enabled xml documentation. --- sources/ConsoleTools/ConsoleTools.sln | 12 ++++++------ .../ConsoleTools/ConsoleTools/ConsoleTools.csproj | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index 0c9e033e..b0580969 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -131,24 +131,24 @@ Global {0E8603FB-7EEB-40A3-97C0-35F1D038111B}.Release-Net461|Any CPU.Build.0 = Release|Any CPU {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Release|Any CPU.ActiveCfg = Release-Net45|Any CPU - {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Release|Any CPU.Build.0 = Release-Net45|Any CPU + {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Release|Any CPU.ActiveCfg = Release-Net461|Any CPU + {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Release|Any CPU.Build.0 = Release-Net461|Any CPU {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Release-Net45|Any CPU.ActiveCfg = Release-Net45|Any CPU {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Release-Net45|Any CPU.Build.0 = Release-Net45|Any CPU {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Release-Net461|Any CPU.ActiveCfg = Release-Net461|Any CPU {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF}.Release-Net461|Any CPU.Build.0 = Release-Net461|Any CPU {099E13DC-313B-4901-9B75-0F400F8E94A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {099E13DC-313B-4901-9B75-0F400F8E94A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {099E13DC-313B-4901-9B75-0F400F8E94A3}.Release|Any CPU.ActiveCfg = Release-Net45|Any CPU - {099E13DC-313B-4901-9B75-0F400F8E94A3}.Release|Any CPU.Build.0 = Release-Net45|Any CPU + {099E13DC-313B-4901-9B75-0F400F8E94A3}.Release|Any CPU.ActiveCfg = Release-Net461|Any CPU + {099E13DC-313B-4901-9B75-0F400F8E94A3}.Release|Any CPU.Build.0 = Release-Net461|Any CPU {099E13DC-313B-4901-9B75-0F400F8E94A3}.Release-Net45|Any CPU.ActiveCfg = Release-Net45|Any CPU {099E13DC-313B-4901-9B75-0F400F8E94A3}.Release-Net45|Any CPU.Build.0 = Release-Net45|Any CPU {099E13DC-313B-4901-9B75-0F400F8E94A3}.Release-Net461|Any CPU.ActiveCfg = Release-Net461|Any CPU {099E13DC-313B-4901-9B75-0F400F8E94A3}.Release-Net461|Any CPU.Build.0 = Release-Net461|Any CPU {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}.Release|Any CPU.ActiveCfg = Release-Net45|Any CPU - {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}.Release|Any CPU.Build.0 = Release-Net45|Any CPU + {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}.Release|Any CPU.ActiveCfg = Release-Net461|Any CPU + {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}.Release|Any CPU.Build.0 = Release-Net461|Any CPU {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}.Release-Net45|Any CPU.ActiveCfg = Release-Net45|Any CPU {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}.Release-Net45|Any CPU.Build.0 = Release-Net45|Any CPU {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}.Release-Net461|Any CPU.ActiveCfg = Release-Net461|Any CPU diff --git a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj b/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj index 25fd7eeb..67d6c35b 100644 --- a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj +++ b/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj @@ -9,6 +9,7 @@ DustInTheWind.ConsoleTools false false + true From ea58689f220a44d57f22fb6bb68f20c45f5cb354 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Mon, 18 Mar 2019 22:32:17 +0200 Subject: [PATCH 03/57] updated the version to 0.5.2 --- doc/changelog.txt | 4 ++++ nuget/ConsoleTools.nuspec | 4 ++-- nuget/build.bat | 12 ++++++------ release/build.bat | 10 +++++----- sources/ConsoleTools/AssemblyInfo.Shared.cs | 2 +- .../ConsoleTools/ConsoleTools/ConsoleTools.csproj | 2 +- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index 7e3bcb66..929d969c 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -3,6 +3,10 @@ ConsoleTools Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +ver 0.5.2 +--------- +- double target: net core and net framework. + ver 0.5.1 --------- - ProgressBar: [bugfix] Fixed incorrect throw of out of range exception when setting the MaxValue property. diff --git a/nuget/ConsoleTools.nuspec b/nuget/ConsoleTools.nuspec index c3275888..b0218e29 100644 --- a/nuget/ConsoleTools.nuspec +++ b/nuget/ConsoleTools.nuspec @@ -2,7 +2,7 @@ ConsoleTools - 0.5.1 + 0.5.2 Dust in the Wind ConsoleTools Dust in the Wind @@ -11,7 +11,7 @@ false A set of tools and "controls" for the .net Console. It contains: List Input/Output Controls, Text Input/Output Controls, Progress Bar, Spinner, Data Table, Prompter, Menus, etc. A set of tools and "controls" for the .net Console. - Fixed incorrect throw of out of range exception when setting the MaxValue property. + Released the net core version. Copyright 2017-2018 Dust in the Wind console cli prompter menu progressbar spinner table read write textblock inlinetextblock blockcontrol, inlinecontrol diff --git a/nuget/build.bat b/nuget/build.bat index 751a032e..5baf05a3 100644 --- a/nuget/build.bat +++ b/nuget/build.bat @@ -52,22 +52,22 @@ rem ---------------------------------------------------------------------------- echo. echo --- -echo --- Retrieve assemblies - Net461 +echo --- Retrieve assemblies - netcoreapp2.2 echo --- echo. -xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release-Net461\*.dll" "lib\net461" +xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.dll" "lib\netcoreapp2.2" if %errorlevel% neq 0 goto :error -xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release-Net461\*.xml" "lib\net461" +xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.xml" "lib\netcoreapp2.2" if %errorlevel% neq 0 goto :error echo. echo --- -echo --- Retrieve assemblies - Net45 +echo --- Retrieve assemblies - net45 echo --- echo. -xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release-Net45\*.dll" "lib\net45" +xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.dll" "lib\net45" if %errorlevel% neq 0 goto :error -xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release-Net45\*.xml" "lib\net45" +xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.xml" "lib\net45" if %errorlevel% neq 0 goto :error echo. diff --git a/release/build.bat b/release/build.bat index a2332697..9133e6c2 100644 --- a/release/build.bat +++ b/release/build.bat @@ -1,7 +1,7 @@ @echo off set root_directory=.. -set version=0.5.1 +set version=0.5.2 rem ---------------------------------------------------------------------------------------------------- rem Clean up existing files. @@ -34,9 +34,9 @@ echo --- echo --- Retrieve assemblies echo --- echo. -xcopy /Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release-Net461\*.dll" "ConsoleTools\lib\Net461" +xcopy /Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.dll" "ConsoleTools\lib\netcoreapp2.2" if %errorlevel% neq 0 goto :error -xcopy /Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release-Net461\*.xml" "ConsoleTools\lib\Net461" +xcopy /Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.xml" "ConsoleTools\lib\netcoreapp2.2" if %errorlevel% neq 0 goto :error echo. @@ -44,9 +44,9 @@ echo --- echo --- Retrieve assemblies echo --- echo. -xcopy /Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release-Net45\*.dll" "ConsoleTools\lib\Net45" +xcopy /Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.dll" "ConsoleTools\lib\net45" if %errorlevel% neq 0 goto :error -xcopy /Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release-Net45\*.xml" "ConsoleTools\lib\Net45" +xcopy /Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.xml" "ConsoleTools\lib\net45" if %errorlevel% neq 0 goto :error rem ---------------------------------------------------------------------------------------------------- diff --git a/sources/ConsoleTools/AssemblyInfo.Shared.cs b/sources/ConsoleTools/AssemblyInfo.Shared.cs index 531203b1..542524c7 100644 --- a/sources/ConsoleTools/AssemblyInfo.Shared.cs +++ b/sources/ConsoleTools/AssemblyInfo.Shared.cs @@ -39,5 +39,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.5.1.*")] +[assembly: AssemblyVersion("0.5.2.*")] //[assembly: AssemblyFileVersion("1.0.0.*")] \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj b/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj index 67d6c35b..8261400e 100644 --- a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj +++ b/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj @@ -2,7 +2,7 @@ Library - netcoreapp2.2;net461 + netcoreapp2.2;net45 DustInTheWind.ConsoleTools From 55b72ed47e0f770c481e2abde10504debdcd697b Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 29 Dec 2019 09:44:34 +0200 Subject: [PATCH 04/57] fixed the namespace --- .../ConsoleTools.Tutorial/AddressBookApplication.cs | 5 ++--- .../ConsoleTools.Tutorial/AddressBookModel/AddressBook.cs | 2 +- .../ConsoleTools.Tutorial/AddressBookModel/Person.cs | 2 +- .../ConsoleTools.Tutorial/Commands/AddPersonCommand.cs | 6 +++--- .../Commands/DisplayPersonDetailsCommand.cs | 7 +++---- .../Commands/DisplayPersonsCommand.cs | 6 +++--- .../ConsoleTools.Tutorial/Commands/ExitCommand.cs | 2 +- .../ConsoleTools.Tutorial/ConsoleTools.Tutorial.csproj | 4 ++-- .../ConsoleTools.Tutorial/CustomControls/AddPersonView.cs | 4 ++-- .../ConsoleTools.Tutorial/CustomControls/PersonView.cs | 4 ++-- .../ConsoleTools.Tutorial/CustomControls/PersonsView.cs | 4 ++-- sources/ConsoleTools/ConsoleTools.Tutorial/MainMenu.cs | 6 +++--- sources/ConsoleTools/ConsoleTools.Tutorial/Program.cs | 3 +-- 13 files changed, 26 insertions(+), 29 deletions(-) diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookApplication.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookApplication.cs index 6e6e9f0a..885a1576 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookApplication.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookApplication.cs @@ -19,10 +19,9 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -using DustIntheWind.ConsoleTools.Tutorial.AddressBookModel; -using DustInTheWind.ConsoleTools; +using DustInTheWind.ConsoleTools.Tutorial.AddressBookModel; -namespace DustIntheWind.ConsoleTools.Tutorial +namespace DustInTheWind.ConsoleTools.Tutorial { internal class AddressBookApplication { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/AddressBook.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/AddressBook.cs index 76b57a8c..6bc2033d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/AddressBook.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/AddressBook.cs @@ -24,7 +24,7 @@ using System.Collections.Generic; using System.Linq; -namespace DustIntheWind.ConsoleTools.Tutorial.AddressBookModel +namespace DustInTheWind.ConsoleTools.Tutorial.AddressBookModel { internal class AddressBook : IEnumerable { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/Person.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/Person.cs index 8a6bdb34..3f1bdb97 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/Person.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/Person.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Text; -namespace DustIntheWind.ConsoleTools.Tutorial.AddressBookModel +namespace DustInTheWind.ConsoleTools.Tutorial.AddressBookModel { internal class Person { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/AddPersonCommand.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/AddPersonCommand.cs index c097dd85..49a15e75 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/AddPersonCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/AddPersonCommand.cs @@ -20,11 +20,11 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System; -using DustIntheWind.ConsoleTools.Tutorial.AddressBookModel; -using DustIntheWind.ConsoleTools.Tutorial.CustomControls; using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Tutorial.AddressBookModel; +using DustInTheWind.ConsoleTools.Tutorial.CustomControls; -namespace DustIntheWind.ConsoleTools.Tutorial.Commands +namespace DustInTheWind.ConsoleTools.Tutorial.Commands { internal class AddPersonCommand : ICommand { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonDetailsCommand.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonDetailsCommand.cs index f10b7ceb..808f7257 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonDetailsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonDetailsCommand.cs @@ -20,13 +20,12 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System; -using DustIntheWind.ConsoleTools.Tutorial.AddressBookModel; -using DustIntheWind.ConsoleTools.Tutorial.CustomControls; -using DustInTheWind.ConsoleTools; using DustInTheWind.ConsoleTools.InputControls; using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Tutorial.AddressBookModel; +using DustInTheWind.ConsoleTools.Tutorial.CustomControls; -namespace DustIntheWind.ConsoleTools.Tutorial.Commands +namespace DustInTheWind.ConsoleTools.Tutorial.Commands { internal class DisplayPersonDetailsCommand : ICommand { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonsCommand.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonsCommand.cs index 127a0070..1fbdf119 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonsCommand.cs @@ -20,11 +20,11 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System; -using DustIntheWind.ConsoleTools.Tutorial.AddressBookModel; -using DustIntheWind.ConsoleTools.Tutorial.CustomControls; using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Tutorial.AddressBookModel; +using DustInTheWind.ConsoleTools.Tutorial.CustomControls; -namespace DustIntheWind.ConsoleTools.Tutorial.Commands +namespace DustInTheWind.ConsoleTools.Tutorial.Commands { internal class DisplayPersonsCommand : ICommand { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/ExitCommand.cs index 445d757a..b3c3f5b3 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/ExitCommand.cs @@ -22,7 +22,7 @@ using System; using DustInTheWind.ConsoleTools.Menues; -namespace DustIntheWind.ConsoleTools.Tutorial.Commands +namespace DustInTheWind.ConsoleTools.Tutorial.Commands { internal class ExitCommand : ICommand { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/ConsoleTools.Tutorial.csproj b/sources/ConsoleTools/ConsoleTools.Tutorial/ConsoleTools.Tutorial.csproj index 9db31ad6..f86e3ebd 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/ConsoleTools.Tutorial.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/ConsoleTools.Tutorial.csproj @@ -7,8 +7,8 @@ {0E8603FB-7EEB-40A3-97C0-35F1D038111B} Exe Properties - DustIntheWind.ConsoleTools.Tutorial - DustIntheWind.ConsoleTools.Tutorial + DustInTheWind.ConsoleTools.Tutorial + DustInTheWind.ConsoleTools.Tutorial v4.6.1 512 true diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/AddPersonView.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/AddPersonView.cs index c2ac971d..f16a6b54 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/AddPersonView.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/AddPersonView.cs @@ -20,10 +20,10 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System; -using DustIntheWind.ConsoleTools.Tutorial.AddressBookModel; using DustInTheWind.ConsoleTools.InputControls; +using DustInTheWind.ConsoleTools.Tutorial.AddressBookModel; -namespace DustIntheWind.ConsoleTools.Tutorial.CustomControls +namespace DustInTheWind.ConsoleTools.Tutorial.CustomControls { internal class AddPersonView { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonView.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonView.cs index 3c2f6f00..7cfe7078 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonView.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonView.cs @@ -20,10 +20,10 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System; -using DustIntheWind.ConsoleTools.Tutorial.AddressBookModel; using DustInTheWind.ConsoleTools.InputControls; +using DustInTheWind.ConsoleTools.Tutorial.AddressBookModel; -namespace DustIntheWind.ConsoleTools.Tutorial.CustomControls +namespace DustInTheWind.ConsoleTools.Tutorial.CustomControls { internal class PersonView { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonsView.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonsView.cs index 6ab1e510..b4edadb5 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonsView.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonsView.cs @@ -20,10 +20,10 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Collections.Generic; -using DustIntheWind.ConsoleTools.Tutorial.AddressBookModel; using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Tutorial.AddressBookModel; -namespace DustIntheWind.ConsoleTools.Tutorial.CustomControls +namespace DustInTheWind.ConsoleTools.Tutorial.CustomControls { internal class PersonsView { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/MainMenu.cs index ade92555..95b3ca22 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/MainMenu.cs @@ -21,12 +21,12 @@ using System; using System.Collections.Generic; -using DustIntheWind.ConsoleTools.Tutorial.AddressBookModel; -using DustIntheWind.ConsoleTools.Tutorial.Commands; using DustInTheWind.ConsoleTools.Menues; using DustInTheWind.ConsoleTools.Menues.MenuItems; +using DustInTheWind.ConsoleTools.Tutorial.AddressBookModel; +using DustInTheWind.ConsoleTools.Tutorial.Commands; -namespace DustIntheWind.ConsoleTools.Tutorial +namespace DustInTheWind.ConsoleTools.Tutorial { internal class MainMenu : ScrollMenu { diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Program.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Program.cs index 1d1c3e0e..f41a5997 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Program.cs @@ -20,9 +20,8 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System; -using DustInTheWind.ConsoleTools; -namespace DustIntheWind.ConsoleTools.Tutorial +namespace DustInTheWind.ConsoleTools.Tutorial { internal class Program { From 9b6d643509e41e3de1ae283f83d77768ef19c58e Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 29 Dec 2019 10:24:17 +0200 Subject: [PATCH 05/57] extracted the tables in a separate project. --- .../ConsoleTools.Demo.NetCore22.csproj | 14 + .../ConsoleTools.Demo.NetCore22/Program.cs | 31 + .../ConsoleTools.Demo.NetFramework20.csproj | 50 ++ .../Program.cs | 35 + .../Properties/AssemblyInfo.cs | 57 ++ .../App.config | 6 + .../ConsoleTools.Demo.NetFramework45.csproj | 58 ++ .../Program.cs | 31 + .../Properties/AssemblyInfo.cs | 56 ++ .../App.config | 6 + .../ConsoleTools.Demo.NetFramework461.csproj | 59 ++ .../Program.cs | 31 + .../Properties/AssemblyInfo.cs | 57 ++ .../ConsoleTools.Demo.Prompter.csproj | 4 + .../ConsoleTools.Demo.TabularData.csproj | 4 + .../BorderTemplate.cs | 658 +++++++++--------- .../CellBase.cs | 382 +++++----- .../Column.cs | 278 ++++---- .../ColumnList.cs | 300 ++++---- .../ConsoleTools.Tables.csproj | 13 + .../DataCell.cs | 494 ++++++------- .../DataGrid.cs | 632 ++++++++--------- .../DataRow.cs | 634 ++++++++--------- .../DataRowList.cs | 518 +++++++------- .../HeaderCell.cs | 394 +++++------ .../HorizontalSeparatorBuilder.cs | 460 ++++++------ .../ITablePrinter.cs | 142 ++-- .../Printers/ConsoleTablePrinter.cs | 264 +++---- .../Printers/StreamTablePrinter.cs | 252 +++---- .../Printers/StringTablePrinter.cs | 248 +++---- .../RenderingModel/BottomBorderData.cs | 118 ++-- .../RenderingModel/DataCellX.cs | 54 +- .../RenderingModel/DataDataSeparator.cs | 162 ++--- .../RenderingModel/DataGridX.cs | 364 +++++----- .../RenderingModel/DataGridXBuilder.cs | 264 +++---- .../RenderingModel/DataRowX.cs | 200 +++--- .../RenderingModel/DataTopBorder.cs | 118 ++-- .../RenderingModel/HeaderBottomBorder.cs | 120 ++-- .../RenderingModel/HeaderDataSeparator.cs | 162 ++--- .../RenderingModel/HeaderRowX.cs | 192 ++--- .../RenderingModel/HeaderTopBorder.cs | 120 ++-- .../RenderingModel/TitleBottomBorder.cs | 118 ++-- .../RenderingModel/TitleDataSeparator.cs | 182 ++--- .../RenderingModel/TitleHeaderSeparator.cs | 170 ++--- .../RenderingModel/TitleRowX.cs | 80 +-- .../RenderingModel/TitleTopBorder.cs | 116 +-- .../TitleCell.cs | 308 ++++---- .../TitleRow.cs | 324 ++++----- .../ConsoleTools.Tests.csproj | 4 + .../ConsoleTools.Tutorial.csproj | 4 + sources/ConsoleTools/ConsoleTools.sln | 61 +- .../ConsoleTools/ConsoleTools/AlignedText.cs | 2 +- .../ConsoleTools/ConsoleTools/BlockControl.cs | 2 +- .../ConsoleTools/ConsoleTools.csproj | 6 + .../ConsoleTools/IRepeatableSupport.cs | 2 +- sources/ConsoleTools/ConsoleTools/Label.cs | 2 +- sources/ConsoleTools/ConsoleTools/Location.cs | 2 +- 57 files changed, 5005 insertions(+), 4420 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetCore22/ConsoleTools.Demo.NetCore22.csproj create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetCore22/Program.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/ConsoleTools.Demo.NetFramework20.csproj create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Program.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Properties/AssemblyInfo.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/App.config create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/ConsoleTools.Demo.NetFramework45.csproj create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Program.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Properties/AssemblyInfo.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/App.config create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/ConsoleTools.Demo.NetFramework461.csproj create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Program.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Properties/AssemblyInfo.cs rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/BorderTemplate.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/CellBase.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/Column.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/ColumnList.cs (97%) create mode 100644 sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/DataCell.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/DataGrid.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/DataRow.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/DataRowList.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/HeaderCell.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/HorizontalSeparatorBuilder.cs (96%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/ITablePrinter.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/Printers/ConsoleTablePrinter.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/Printers/StreamTablePrinter.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/Printers/StringTablePrinter.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/BottomBorderData.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/DataCellX.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/DataDataSeparator.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/DataGridX.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/DataGridXBuilder.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/DataRowX.cs (96%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/DataTopBorder.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/HeaderBottomBorder.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/HeaderDataSeparator.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/HeaderRowX.cs (96%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/HeaderTopBorder.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/TitleBottomBorder.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/TitleDataSeparator.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/TitleHeaderSeparator.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/TitleRowX.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/RenderingModel/TitleTopBorder.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/TitleCell.cs (97%) rename sources/ConsoleTools/{ConsoleTools/TabularData => ConsoleTools.Tables}/TitleRow.cs (97%) diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/ConsoleTools.Demo.NetCore22.csproj b/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/ConsoleTools.Demo.NetCore22.csproj new file mode 100644 index 00000000..ff19af09 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/ConsoleTools.Demo.NetCore22.csproj @@ -0,0 +1,14 @@ + + + + Exe + netcoreapp2.2 + DustInTheWind.ConsoleTools.Demo.NetCore22 + DustInTheWind.ConsoleTools.Demo.NetCore22 + + + + + + + diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/Program.cs new file mode 100644 index 00000000..1dc53b79 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/Program.cs @@ -0,0 +1,31 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Demo.NetCore22 +{ + internal class Program + { + private static void Main(string[] args) + { + Pause.QuickDisplay(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/ConsoleTools.Demo.NetFramework20.csproj b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/ConsoleTools.Demo.NetFramework20.csproj new file mode 100644 index 00000000..50df6144 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/ConsoleTools.Demo.NetFramework20.csproj @@ -0,0 +1,50 @@ + + + + + Debug + AnyCPU + {CA132B68-599B-499B-B01F-613FBDE56189} + Exe + ConsoleTools.Demo.NetFramework20 + ConsoleTools.Demo.NetFramework20 + v2.0 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + {6e67de9d-7ab8-4828-8dfa-78e2e9ac59e8} + ConsoleTools + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Program.cs new file mode 100644 index 00000000..3b48ed34 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Program.cs @@ -0,0 +1,35 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Text; + +namespace ConsoleTools.Demo.NetFramework20 +{ + class Program + { + static void Main(string[] args) + { + Dust Pause.Display(); + } + } +} diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..573e8be0 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ConsoleTools.Demo.NetFramework20")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("ConsoleTools.Demo.NetFramework20")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ca132b68-599b-499b-b01f-613fbde56189")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/App.config b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/App.config new file mode 100644 index 00000000..8e156463 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/ConsoleTools.Demo.NetFramework45.csproj b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/ConsoleTools.Demo.NetFramework45.csproj new file mode 100644 index 00000000..a7d6a4e0 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/ConsoleTools.Demo.NetFramework45.csproj @@ -0,0 +1,58 @@ + + + + + Debug + AnyCPU + {75273E84-51DF-4547-81C0-16C253A2EBB7} + Exe + DustInTheWind.ConsoleTools.Demo.NetFramework45 + DustInTheWind.ConsoleTools.Demo.NetFramework45 + v4.5 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {6e67de9d-7ab8-4828-8dfa-78e2e9ac59e8} + ConsoleTools + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Program.cs new file mode 100644 index 00000000..2dc80adf --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Program.cs @@ -0,0 +1,31 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Demo.NetFramework45 +{ + class Program + { + static void Main(string[] args) + { + Pause.QuickDisplay(); + } + } +} diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..b6af1f40 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Properties/AssemblyInfo.cs @@ -0,0 +1,56 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ConsoleTools.Demo.NetFramework45")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("ConsoleTools.Demo.NetFramework45")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("75273e84-51df-4547-81c0-16c253a2ebb7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/App.config b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/App.config new file mode 100644 index 00000000..731f6de6 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/ConsoleTools.Demo.NetFramework461.csproj b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/ConsoleTools.Demo.NetFramework461.csproj new file mode 100644 index 00000000..005b680c --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/ConsoleTools.Demo.NetFramework461.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1} + Exe + DustInTheWind.ConsoleTools.Demo.NetFramework461 + DustInTheWind.ConsoleTools.Demo.NetFramework461 + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {6e67de9d-7ab8-4828-8dfa-78e2e9ac59e8} + ConsoleTools + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Program.cs new file mode 100644 index 00000000..79ee50a1 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Program.cs @@ -0,0 +1,31 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Demo.NetFramework461 +{ + internal class Program + { + private static void Main(string[] args) + { + Pause.QuickDisplay(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..f321382b --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ConsoleTools.Demo.NetFramework461")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("ConsoleTools.Demo.NetFramework461")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0ca815d0-6d4a-4d74-9a30-ac027c321ba1")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Prompter/ConsoleTools.Demo.Prompter.csproj b/sources/ConsoleTools/ConsoleTools.Demo.Prompter/ConsoleTools.Demo.Prompter.csproj index c8fd2e8b..20c16ae9 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Prompter/ConsoleTools.Demo.Prompter.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.Prompter/ConsoleTools.Demo.Prompter.csproj @@ -67,6 +67,10 @@ + + {1378eec9-98b1-41ee-bf7e-b7ff7d3f9932} + ConsoleTools.Tables + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/ConsoleTools.Demo.TabularData.csproj b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/ConsoleTools.Demo.TabularData.csproj index 285e8f94..b1b15234 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/ConsoleTools.Demo.TabularData.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/ConsoleTools.Demo.TabularData.csproj @@ -78,6 +78,10 @@ + + {1378eec9-98b1-41ee-bf7e-b7ff7d3f9932} + ConsoleTools.Tables + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/BorderTemplate.cs b/sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/BorderTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs index d9fab338..e1c08e53 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/BorderTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs @@ -1,330 +1,330 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Represents a border template that can be applied on a instance. - /// - public class BorderTemplate - { - /// - /// Gets an instance of the that uses '+' and '-' characters to render the border. - /// - public static BorderTemplate PlusMinusBorderTemplate { get; } = new BorderTemplate("+-+|+-+|+++++|-"); - - /// - /// Gets an instance of the that uses single line ASCII characters to render the border. - /// - public static BorderTemplate SingleLineBorderTemplate { get; } = new BorderTemplate("┌─┐│┘─└│┬┤┴├┼│─"); - - /// - /// Gets an instance of the that uses double line ASCII characters to render the border. - /// - public static BorderTemplate DoubleLineBorderTemplate { get; } = new BorderTemplate("╔═╗║╝═╚║╦╣╩╠╬║═"); - - /// - /// Gets the character used to render the top left corner. - /// - public char TopLeft { get; } - - /// - /// Gets the character used to render the top border. - /// - public char Top { get; } - - /// - /// Gets the character used to render the top right corner. - /// - public char TopRight { get; } - - /// - /// Gets the character used to render the right border. - /// - public char Right { get; } - - /// - /// Gets the character used to render the bottom right corner. - /// - public char BottomRight { get; } - - /// - /// Gets the character used to render the bottom border. - /// - public char Bottom { get; } - - /// - /// Gets the character used to render the bottom left corner. - /// - public char BottomLeft { get; } - - /// - /// Gets the character used to render the left border. - /// - public char Left { get; } - - /// - /// Gets the character used to render the intersection between the top outer border and an internal vertical border. - /// - public char TopIntersection { get; } - - /// - /// Gets the character used to render the intersection between the right outer border and an internal horizontal border. - /// - public char RightIntersection { get; } - - /// - /// Gets the character used to render the intersection between the bottom outer border and an internal vertical border. - /// - public char BottomIntersection { get; } - - /// - /// Gets the character used to render the intersection between the left outer border and an internal horizontal border. - /// - public char LeftIntersection { get; } - - /// - /// Gets the character used to render the intersection between two internal borders: a vertical and a horizontal one. - /// - public char MiddleIntersection { get; } - - /// - /// Gets the character used to render an internal vertical border. - /// - public char Vertical { get; } - - /// - /// Gets the character used to render an internal horizontal border. - /// - public char Horizontal { get; } - - /// - /// Initializes a new instance of the class with - /// a string of length 15 that containing all the characters needed to render the border. - /// - /// - /// The string of length 15 that containing all the characters needed to render the border. - /// The string must contain the characters in the following order: - /// top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, - /// top-intersection, right-intersection, bottom-intersection, left-intersection, middle-intersection, - /// vertical, horizontal. - /// - public BorderTemplate(string values) - { - if (values == null) throw new ArgumentNullException(nameof(values)); - - if (values.Length != 15) - throw new ArgumentException( - "Please provide 15 characters for the border in the following order: top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, top-intersection, right-intersection, bottom-intersection, left-intersection, middle-intersection, vertical, horizontal.", - nameof(values)); - - TopLeft = values[0]; - Top = values[1]; - TopRight = values[2]; - Right = values[3]; - BottomRight = values[4]; - Bottom = values[5]; - BottomLeft = values[6]; - Left = values[7]; - - TopIntersection = values[8]; - RightIntersection = values[9]; - BottomIntersection = values[10]; - LeftIntersection = values[11]; - MiddleIntersection = values[12]; - - Vertical = values[13]; - Horizontal = values[14]; - } - - /// - /// Initializes a new instance of the class with - /// all the characters needed to render the border. - /// - public BorderTemplate(char topLeft, char top, char topRight, char right, char bottomRight, char bottom, char bottomLeft, char left, - char topIntersection, char rightIntersection, char bottomIntersection, char leftIntersection, char middleIntersection, - char vertical, char horizontal) - { - TopLeft = topLeft; - Top = top; - TopRight = topRight; - Right = right; - BottomRight = bottomRight; - Bottom = bottom; - BottomLeft = bottomLeft; - Left = left; - - TopIntersection = topIntersection; - RightIntersection = rightIntersection; - BottomIntersection = bottomIntersection; - LeftIntersection = leftIntersection; - MiddleIntersection = middleIntersection; - - Vertical = vertical; - Horizontal = horizontal; - } - - /// - /// Generates the border displayed at the top of the column header row. - /// This border is used only when title is hidden and the column header row is visible, being the first row of the table. - /// - public string GenerateTopBorder(params int[] columnWidths) - { - return GenerateTopBorder((IList)columnWidths); - } - - /// - /// Generates the border displayed at the top of the column header row. - /// This border is used only when title is hidden and the column header row is visible, being the first row of the table. - /// - public string GenerateTopBorder(IList columnWidths) - { - if (columnWidths == null || columnWidths.Count == 0) - return string.Empty; - - StringBuilder sb = new StringBuilder(); - - sb.Append(TopLeft); - - for (int columnIndex = 0; columnIndex < columnWidths.Count; columnIndex++) - { - int columnWidth = columnWidths[columnIndex]; - sb.Append(new string(Top, columnWidth)); - - char columnBorderRight = columnIndex < columnWidths.Count - 1 - ? TopIntersection - : TopRight; - - sb.Append(columnBorderRight); - } - - return sb.ToString(); - } - - /// - /// Generates the border displayed between title and column header rows. - /// This border is used only when both title and column header rows are visible. - /// - public string GenerateHorizontalSeparator(params int[] columnWidths) - { - return GenerateHorizontalSeparator((IList)columnWidths); - } - - /// - /// Generates the border displayed between title and column header rows. - /// This border is used only when both title and column header rows are visible. - /// - public string GenerateHorizontalSeparator(IList columnWidths) - { - if (columnWidths == null || columnWidths.Count == 0) - return string.Empty; - - StringBuilder sb = new StringBuilder(); - - sb.Append(LeftIntersection); - - for (int columnIndex = 0; columnIndex < columnWidths.Count; columnIndex++) - { - int columnWidth = columnWidths[columnIndex]; - sb.Append(new string(Horizontal, columnWidth)); - - char columnBorderRight = columnIndex < columnWidths.Count - 1 - ? MiddleIntersection - : RightIntersection; - - sb.Append(columnBorderRight); - } - - return sb.ToString(); - } - - /// - /// Generates the border displayed between title and column header rows. - /// This border is used only when both title and column header rows are visible. - /// - public string GenerateHorizontalSeparator(IList topCellWidths, IList bottomCellWidths) - { - if (topCellWidths == null && bottomCellWidths == null) - return string.Empty; - - if (topCellWidths == null) - return GenerateTopBorder(bottomCellWidths); - - if (bottomCellWidths == null) - return GenerateBottomBorder(topCellWidths); - - HorizontalSeparatorBuilder builder = new HorizontalSeparatorBuilder - { - Horizontal = Horizontal, - LeftIntersection = LeftIntersection, - RightIntersection = RightIntersection, - TopIntersection = TopIntersection, - BottomIntersection = BottomIntersection, - MiddleIntersection = MiddleIntersection, - TopRight = TopRight, - BottomRight = BottomRight, - TopCellWidths = topCellWidths, - BottomCellWidths = bottomCellWidths - }; - - return builder.Build(); - } - - /// - /// Generates the border displayed at the bottom of the last data row. - /// - public string GenerateBottomBorder(params int[] columnWidths) - { - return GenerateBottomBorder((IList)columnWidths); - } - - /// - /// Generates the border displayed at the bottom of the last data row. - /// - public string GenerateBottomBorder(IList columnWidths) - { - if (columnWidths == null || columnWidths.Count == 0) - return string.Empty; - - StringBuilder sb = new StringBuilder(); - - sb.Append(BottomLeft); - - for (int columnIndex = 0; columnIndex < columnWidths.Count; columnIndex++) - { - int columnWidth = columnWidths[columnIndex]; - sb.Append(new string(Bottom, columnWidth)); - - char columnBorderRight = columnIndex < columnWidths.Count - 1 - ? BottomIntersection - : BottomRight; - - sb.Append(columnBorderRight); - } - - return sb.ToString(); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Represents a border template that can be applied on a instance. + /// + public class BorderTemplate + { + /// + /// Gets an instance of the that uses '+' and '-' characters to render the border. + /// + public static BorderTemplate PlusMinusBorderTemplate { get; } = new BorderTemplate("+-+|+-+|+++++|-"); + + /// + /// Gets an instance of the that uses single line ASCII characters to render the border. + /// + public static BorderTemplate SingleLineBorderTemplate { get; } = new BorderTemplate("┌─┐│┘─└│┬┤┴├┼│─"); + + /// + /// Gets an instance of the that uses double line ASCII characters to render the border. + /// + public static BorderTemplate DoubleLineBorderTemplate { get; } = new BorderTemplate("╔═╗║╝═╚║╦╣╩╠╬║═"); + + /// + /// Gets the character used to render the top left corner. + /// + public char TopLeft { get; } + + /// + /// Gets the character used to render the top border. + /// + public char Top { get; } + + /// + /// Gets the character used to render the top right corner. + /// + public char TopRight { get; } + + /// + /// Gets the character used to render the right border. + /// + public char Right { get; } + + /// + /// Gets the character used to render the bottom right corner. + /// + public char BottomRight { get; } + + /// + /// Gets the character used to render the bottom border. + /// + public char Bottom { get; } + + /// + /// Gets the character used to render the bottom left corner. + /// + public char BottomLeft { get; } + + /// + /// Gets the character used to render the left border. + /// + public char Left { get; } + + /// + /// Gets the character used to render the intersection between the top outer border and an internal vertical border. + /// + public char TopIntersection { get; } + + /// + /// Gets the character used to render the intersection between the right outer border and an internal horizontal border. + /// + public char RightIntersection { get; } + + /// + /// Gets the character used to render the intersection between the bottom outer border and an internal vertical border. + /// + public char BottomIntersection { get; } + + /// + /// Gets the character used to render the intersection between the left outer border and an internal horizontal border. + /// + public char LeftIntersection { get; } + + /// + /// Gets the character used to render the intersection between two internal borders: a vertical and a horizontal one. + /// + public char MiddleIntersection { get; } + + /// + /// Gets the character used to render an internal vertical border. + /// + public char Vertical { get; } + + /// + /// Gets the character used to render an internal horizontal border. + /// + public char Horizontal { get; } + + /// + /// Initializes a new instance of the class with + /// a string of length 15 that containing all the characters needed to render the border. + /// + /// + /// The string of length 15 that containing all the characters needed to render the border. + /// The string must contain the characters in the following order: + /// top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, + /// top-intersection, right-intersection, bottom-intersection, left-intersection, middle-intersection, + /// vertical, horizontal. + /// + public BorderTemplate(string values) + { + if (values == null) throw new ArgumentNullException(nameof(values)); + + if (values.Length != 15) + throw new ArgumentException( + "Please provide 15 characters for the border in the following order: top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, top-intersection, right-intersection, bottom-intersection, left-intersection, middle-intersection, vertical, horizontal.", + nameof(values)); + + TopLeft = values[0]; + Top = values[1]; + TopRight = values[2]; + Right = values[3]; + BottomRight = values[4]; + Bottom = values[5]; + BottomLeft = values[6]; + Left = values[7]; + + TopIntersection = values[8]; + RightIntersection = values[9]; + BottomIntersection = values[10]; + LeftIntersection = values[11]; + MiddleIntersection = values[12]; + + Vertical = values[13]; + Horizontal = values[14]; + } + + /// + /// Initializes a new instance of the class with + /// all the characters needed to render the border. + /// + public BorderTemplate(char topLeft, char top, char topRight, char right, char bottomRight, char bottom, char bottomLeft, char left, + char topIntersection, char rightIntersection, char bottomIntersection, char leftIntersection, char middleIntersection, + char vertical, char horizontal) + { + TopLeft = topLeft; + Top = top; + TopRight = topRight; + Right = right; + BottomRight = bottomRight; + Bottom = bottom; + BottomLeft = bottomLeft; + Left = left; + + TopIntersection = topIntersection; + RightIntersection = rightIntersection; + BottomIntersection = bottomIntersection; + LeftIntersection = leftIntersection; + MiddleIntersection = middleIntersection; + + Vertical = vertical; + Horizontal = horizontal; + } + + /// + /// Generates the border displayed at the top of the column header row. + /// This border is used only when title is hidden and the column header row is visible, being the first row of the table. + /// + public string GenerateTopBorder(params int[] columnWidths) + { + return GenerateTopBorder((IList)columnWidths); + } + + /// + /// Generates the border displayed at the top of the column header row. + /// This border is used only when title is hidden and the column header row is visible, being the first row of the table. + /// + public string GenerateTopBorder(IList columnWidths) + { + if (columnWidths == null || columnWidths.Count == 0) + return string.Empty; + + StringBuilder sb = new StringBuilder(); + + sb.Append(TopLeft); + + for (int columnIndex = 0; columnIndex < columnWidths.Count; columnIndex++) + { + int columnWidth = columnWidths[columnIndex]; + sb.Append(new string(Top, columnWidth)); + + char columnBorderRight = columnIndex < columnWidths.Count - 1 + ? TopIntersection + : TopRight; + + sb.Append(columnBorderRight); + } + + return sb.ToString(); + } + + /// + /// Generates the border displayed between title and column header rows. + /// This border is used only when both title and column header rows are visible. + /// + public string GenerateHorizontalSeparator(params int[] columnWidths) + { + return GenerateHorizontalSeparator((IList)columnWidths); + } + + /// + /// Generates the border displayed between title and column header rows. + /// This border is used only when both title and column header rows are visible. + /// + public string GenerateHorizontalSeparator(IList columnWidths) + { + if (columnWidths == null || columnWidths.Count == 0) + return string.Empty; + + StringBuilder sb = new StringBuilder(); + + sb.Append(LeftIntersection); + + for (int columnIndex = 0; columnIndex < columnWidths.Count; columnIndex++) + { + int columnWidth = columnWidths[columnIndex]; + sb.Append(new string(Horizontal, columnWidth)); + + char columnBorderRight = columnIndex < columnWidths.Count - 1 + ? MiddleIntersection + : RightIntersection; + + sb.Append(columnBorderRight); + } + + return sb.ToString(); + } + + /// + /// Generates the border displayed between title and column header rows. + /// This border is used only when both title and column header rows are visible. + /// + public string GenerateHorizontalSeparator(IList topCellWidths, IList bottomCellWidths) + { + if (topCellWidths == null && bottomCellWidths == null) + return string.Empty; + + if (topCellWidths == null) + return GenerateTopBorder(bottomCellWidths); + + if (bottomCellWidths == null) + return GenerateBottomBorder(topCellWidths); + + HorizontalSeparatorBuilder builder = new HorizontalSeparatorBuilder + { + Horizontal = Horizontal, + LeftIntersection = LeftIntersection, + RightIntersection = RightIntersection, + TopIntersection = TopIntersection, + BottomIntersection = BottomIntersection, + MiddleIntersection = MiddleIntersection, + TopRight = TopRight, + BottomRight = BottomRight, + TopCellWidths = topCellWidths, + BottomCellWidths = bottomCellWidths + }; + + return builder.Build(); + } + + /// + /// Generates the border displayed at the bottom of the last data row. + /// + public string GenerateBottomBorder(params int[] columnWidths) + { + return GenerateBottomBorder((IList)columnWidths); + } + + /// + /// Generates the border displayed at the bottom of the last data row. + /// + public string GenerateBottomBorder(IList columnWidths) + { + if (columnWidths == null || columnWidths.Count == 0) + return string.Empty; + + StringBuilder sb = new StringBuilder(); + + sb.Append(BottomLeft); + + for (int columnIndex = 0; columnIndex < columnWidths.Count; columnIndex++) + { + int columnWidth = columnWidths[columnIndex]; + sb.Append(new string(Bottom, columnWidth)); + + char columnBorderRight = columnIndex < columnWidths.Count - 1 + ? BottomIntersection + : BottomRight; + + sb.Append(columnBorderRight); + } + + return sb.ToString(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/CellBase.cs b/sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/CellBase.cs rename to sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs index b2289a08..f0379fc8 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/CellBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs @@ -1,192 +1,192 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System.Collections.Generic; - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Represents a table cell that contains data. - /// - public abstract class CellBase - { - /// - /// Gets or sets the content of the cell. - /// - public MultilineText Content { get; set; } - - /// - /// Gets a value that specified if the cell contains no data. - /// - public bool IsEmpty => Content == null || Content.IsEmpty; - - /// - /// Gets or sets the horizontal alignment of the content displayed in the cell. - /// - public HorizontalAlignment HorizontalAlignment { get; set; } - - /// - /// Initializes a new instance of the class with - /// empty content. - /// - protected CellBase() - { - Content = MultilineText.Empty; - HorizontalAlignment = HorizontalAlignment.Default; - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it and its horizontal alignment. - /// - /// The text displayed in the cell. - /// The horizontal alignment of the content of the new cell. - protected CellBase(string text, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Default) - { - Content = new MultilineText(text); - HorizontalAlignment = horizontalAlignment; - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it and its horizontal alignment. - /// - /// - /// The horizontal alignment of the content of the new cell. - protected CellBase(MultilineText text, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Default) - { - Content = text; - HorizontalAlignment = horizontalAlignment; - } - - /// - /// Initializes a new instance of the class with - /// an object representing the content and its horizontal alignment. - /// - protected CellBase(object content, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Default) - { - Content = new MultilineText(content.ToString()); - HorizontalAlignment = horizontalAlignment; - } - - /// - /// Returns the size of the cell, including the padding. - /// - public Size CalculatePreferedSize() - { - int cellWidth; - int cellHeight; - - int paddingLeft = CalculatePaddingLeft(); - int paddingRight = CalculatePaddingRight(); - - if (IsEmpty) - { - cellWidth = paddingLeft + paddingRight; - cellHeight = 0; - } - else - { - cellWidth = paddingLeft + Content.Size.Width + paddingRight; - cellHeight = Content.Size.Height; - } - - return new Size(cellWidth, cellHeight); - } - - /// - /// Returns the number of spaces representing the left padding. - /// - protected abstract int CalculatePaddingLeft(); - - /// - /// Returns the number of spaces representing the right padding. - /// - protected abstract int CalculatePaddingRight(); - - /// - /// Returns the string representation of the content of the cell. - /// - public override string ToString() - { - return Content?.ToString() ?? string.Empty; - } - - /// - /// Returns a list of text lines that represent the string representation of the cell. - /// Every line from the list has the same length, and the length is equal to the specified width value. - /// The number of lines in the list is equal to the specified height value. - /// - /// - /// The size into which the cell must be rendered. - /// If the size is smaller than the content, the content is trimmed. - /// If the size is grater than the content, empty spaces are written. - /// - /// - public IEnumerable Render(Size size) - { - for (int i = 0; i < size.Height; i++) - yield return RenderLine(i, size.Width); - } - - /// - /// Returns a single line from the cell including the paddings. - /// - /// The index of the line to be generated. - /// The width of the cell. - /// A representing a single line from the cell. - private string RenderLine(int lineIndex, int width) - { - int paddingLeftLength = CalculatePaddingLeft(); - int paddingRightLength = CalculatePaddingRight(); - - int cellContentWidth = width - paddingLeftLength - paddingRightLength; - - bool existsContentLine = lineIndex < Content.Size.Height; - if (!existsContentLine) - return new string(' ', width); - - // Build inner content. - - string innerContent = Content.Lines[lineIndex]; - HorizontalAlignment alignment = CalculateHorizontalAlignment(); - - innerContent = AlignedText.QuickAlign(innerContent, alignment, cellContentWidth); - - // Build paddings. - - string paddingLeft = new string(' ', paddingLeftLength); - string paddingRight = new string(' ', paddingRightLength); - - // Concatenate everything. - - return paddingLeft + innerContent + paddingRight; - } - - /// - /// Returns the calculated horizontal alignment for the content of the current instance. - /// The value is calculated based on the property of the current instance, - /// and the values specified by the parents. - /// It should never return . - /// - protected abstract HorizontalAlignment CalculateHorizontalAlignment(); - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Represents a table cell that contains data. + /// + public abstract class CellBase + { + /// + /// Gets or sets the content of the cell. + /// + public MultilineText Content { get; set; } + + /// + /// Gets a value that specified if the cell contains no data. + /// + public bool IsEmpty => Content == null || Content.IsEmpty; + + /// + /// Gets or sets the horizontal alignment of the content displayed in the cell. + /// + public HorizontalAlignment HorizontalAlignment { get; set; } + + /// + /// Initializes a new instance of the class with + /// empty content. + /// + protected CellBase() + { + Content = MultilineText.Empty; + HorizontalAlignment = HorizontalAlignment.Default; + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it and its horizontal alignment. + /// + /// The text displayed in the cell. + /// The horizontal alignment of the content of the new cell. + protected CellBase(string text, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Default) + { + Content = new MultilineText(text); + HorizontalAlignment = horizontalAlignment; + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it and its horizontal alignment. + /// + /// + /// The horizontal alignment of the content of the new cell. + protected CellBase(MultilineText text, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Default) + { + Content = text; + HorizontalAlignment = horizontalAlignment; + } + + /// + /// Initializes a new instance of the class with + /// an object representing the content and its horizontal alignment. + /// + protected CellBase(object content, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Default) + { + Content = new MultilineText(content.ToString()); + HorizontalAlignment = horizontalAlignment; + } + + /// + /// Returns the size of the cell, including the padding. + /// + public Size CalculatePreferedSize() + { + int cellWidth; + int cellHeight; + + int paddingLeft = CalculatePaddingLeft(); + int paddingRight = CalculatePaddingRight(); + + if (IsEmpty) + { + cellWidth = paddingLeft + paddingRight; + cellHeight = 0; + } + else + { + cellWidth = paddingLeft + Content.Size.Width + paddingRight; + cellHeight = Content.Size.Height; + } + + return new Size(cellWidth, cellHeight); + } + + /// + /// Returns the number of spaces representing the left padding. + /// + protected abstract int CalculatePaddingLeft(); + + /// + /// Returns the number of spaces representing the right padding. + /// + protected abstract int CalculatePaddingRight(); + + /// + /// Returns the string representation of the content of the cell. + /// + public override string ToString() + { + return Content?.ToString() ?? string.Empty; + } + + /// + /// Returns a list of text lines that represent the string representation of the cell. + /// Every line from the list has the same length, and the length is equal to the specified width value. + /// The number of lines in the list is equal to the specified height value. + /// + /// + /// The size into which the cell must be rendered. + /// If the size is smaller than the content, the content is trimmed. + /// If the size is grater than the content, empty spaces are written. + /// + /// + public IEnumerable Render(Size size) + { + for (int i = 0; i < size.Height; i++) + yield return RenderLine(i, size.Width); + } + + /// + /// Returns a single line from the cell including the paddings. + /// + /// The index of the line to be generated. + /// The width of the cell. + /// A representing a single line from the cell. + private string RenderLine(int lineIndex, int width) + { + int paddingLeftLength = CalculatePaddingLeft(); + int paddingRightLength = CalculatePaddingRight(); + + int cellContentWidth = width - paddingLeftLength - paddingRightLength; + + bool existsContentLine = lineIndex < Content.Size.Height; + if (!existsContentLine) + return new string(' ', width); + + // Build inner content. + + string innerContent = Content.Lines[lineIndex]; + HorizontalAlignment alignment = CalculateHorizontalAlignment(); + + innerContent = AlignedText.QuickAlign(innerContent, alignment, cellContentWidth); + + // Build paddings. + + string paddingLeft = new string(' ', paddingLeftLength); + string paddingRight = new string(' ', paddingRightLength); + + // Concatenate everything. + + return paddingLeft + innerContent + paddingRight; + } + + /// + /// Returns the calculated horizontal alignment for the content of the current instance. + /// The value is calculated based on the property of the current instance, + /// and the values specified by the parents. + /// It should never return . + /// + protected abstract HorizontalAlignment CalculateHorizontalAlignment(); + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/Column.cs b/sources/ConsoleTools/ConsoleTools.Tables/Column.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/Column.cs rename to sources/ConsoleTools/ConsoleTools.Tables/Column.cs index 90cd2174..bbaa92b9 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/Column.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/Column.cs @@ -1,140 +1,140 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Represents a column in the class. - /// - public class Column - { - /// - /// Gets or sets the cell displayed in the header of the current column. - /// - public HeaderCell HeaderCell { get; } - - /// - /// Gets or sets the horizontal alignment for the content of the cells represented by the current instance of the . - /// - public HorizontalAlignment HorizontalAlignment { get; set; } - - /// - /// Gets or sets the instance that contains the current instance. - /// - public DataGrid ParentDataGrid { get; set; } - - /// - /// Gets or sets the padding applyed to the left side of every cell. - /// - public int? PaddingLeft { get; set; } - - /// - /// Gets or sets the padding applyed to the right side of every cell. - /// - public int? PaddingRight { get; set; } - - /// - /// Initializes a new instance of the class. - /// - public Column() - { - HeaderCell = new HeaderCell - { - ParentColumn = this - }; - HorizontalAlignment = HorizontalAlignment.Default; - } - - /// - /// Initializes a new instance of the class with - /// the a header. - /// - public Column(string header) - { - HeaderCell = new HeaderCell(header) - { - ParentColumn = this - }; - HorizontalAlignment = HorizontalAlignment.Default; - } - - /// - /// Initializes a new instance of the class with - /// the a name and the horizontal alignment applyed to the cells represented by the column. - /// - public Column(string header, HorizontalAlignment horizontalAlignment) - { - HeaderCell = new HeaderCell(header) - { - ParentColumn = this - }; - HorizontalAlignment = horizontalAlignment; - } - - /// - /// Initializes a new instance of the class. - /// - public Column(MultilineText header) - { - HeaderCell = new HeaderCell(header) - { - ParentColumn = this - }; - HorizontalAlignment = HorizontalAlignment.Default; - } - - /// - /// Initializes a new instance of the class. - /// - public Column(MultilineText header, HorizontalAlignment horizontalAlignment) - { - HeaderCell = new HeaderCell(header) - { - ParentColumn = this - }; - HorizontalAlignment = horizontalAlignment; - } - - /// - /// Initializes a new instance of the class. - /// - public Column(object header) - { - HeaderCell = new HeaderCell(header) - { - ParentColumn = this - }; - HorizontalAlignment = HorizontalAlignment.Default; - } - - /// - /// Initializes a new instance of the class. - /// - public Column(object header, HorizontalAlignment horizontalAlignment) - { - HeaderCell = new HeaderCell(header) - { - ParentColumn = this - }; - HorizontalAlignment = horizontalAlignment; - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Represents a column in the class. + /// + public class Column + { + /// + /// Gets or sets the cell displayed in the header of the current column. + /// + public HeaderCell HeaderCell { get; } + + /// + /// Gets or sets the horizontal alignment for the content of the cells represented by the current instance of the . + /// + public HorizontalAlignment HorizontalAlignment { get; set; } + + /// + /// Gets or sets the instance that contains the current instance. + /// + public DataGrid ParentDataGrid { get; set; } + + /// + /// Gets or sets the padding applyed to the left side of every cell. + /// + public int? PaddingLeft { get; set; } + + /// + /// Gets or sets the padding applyed to the right side of every cell. + /// + public int? PaddingRight { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public Column() + { + HeaderCell = new HeaderCell + { + ParentColumn = this + }; + HorizontalAlignment = HorizontalAlignment.Default; + } + + /// + /// Initializes a new instance of the class with + /// the a header. + /// + public Column(string header) + { + HeaderCell = new HeaderCell(header) + { + ParentColumn = this + }; + HorizontalAlignment = HorizontalAlignment.Default; + } + + /// + /// Initializes a new instance of the class with + /// the a name and the horizontal alignment applyed to the cells represented by the column. + /// + public Column(string header, HorizontalAlignment horizontalAlignment) + { + HeaderCell = new HeaderCell(header) + { + ParentColumn = this + }; + HorizontalAlignment = horizontalAlignment; + } + + /// + /// Initializes a new instance of the class. + /// + public Column(MultilineText header) + { + HeaderCell = new HeaderCell(header) + { + ParentColumn = this + }; + HorizontalAlignment = HorizontalAlignment.Default; + } + + /// + /// Initializes a new instance of the class. + /// + public Column(MultilineText header, HorizontalAlignment horizontalAlignment) + { + HeaderCell = new HeaderCell(header) + { + ParentColumn = this + }; + HorizontalAlignment = horizontalAlignment; + } + + /// + /// Initializes a new instance of the class. + /// + public Column(object header) + { + HeaderCell = new HeaderCell(header) + { + ParentColumn = this + }; + HorizontalAlignment = HorizontalAlignment.Default; + } + + /// + /// Initializes a new instance of the class. + /// + public Column(object header, HorizontalAlignment horizontalAlignment) + { + HeaderCell = new HeaderCell(header) + { + ParentColumn = this + }; + HorizontalAlignment = horizontalAlignment; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/ColumnList.cs b/sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/ColumnList.cs rename to sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs index 74ad8f90..22823752 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/ColumnList.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs @@ -1,151 +1,151 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Keeps the information about the columns from a table. - /// It is also responsible to render the column headers. - /// - public class ColumnList : IEnumerable - { - private readonly DataGrid parentDataGrid; - - private readonly List columns = new List(); - - /// - /// Gets the number of columns contained in the current instance. - /// - public int Count => columns.Count; - - /// - /// Gets the at the specified index. - /// If the index is outside of the bounds of the list, null is returned. - /// - /// The index of the to return. - /// The at the specified index. - public Column this[int index] => index >= 0 && index < columns.Count - ? columns[index] - : null; - - /// - /// Initializes a new instance of the class with - /// the table that owns it. - /// - /// The table that owns the new instance. - public ColumnList(DataGrid parentDataGrid) - { - if (parentDataGrid == null) throw new ArgumentNullException(nameof(parentDataGrid)); - this.parentDataGrid = parentDataGrid; - } - - /// - /// Adds a new to the end of the list. - /// - /// The text to be displayed in the header of the column. - public void Add(string columnHeader) - { - Column column = new Column(columnHeader) - { - ParentDataGrid = parentDataGrid - }; - columns.Add(column); - } - - /// - /// Adds a new to the end of the list. - /// - /// The instance to be added. - public void Add(Column column) - { - if (column == null) throw new ArgumentNullException(nameof(column)); - - column.ParentDataGrid = parentDataGrid; - columns.Add(column); - } - - /// - /// Renders the row containing the column headers. - /// - /// The destination where the current instance must be rendered. - /// The widths of each header cell that must be rendered. - /// The height of the row to be rendered. If there are not enough text lines - /// in the content of a cell, spaces are written instead. - public void RenderHeaderRow(ITablePrinter tablePrinter, List cellWidths, int rowHeight) - { - // Get cells content. - List> cellContents = columns - .Select((x, i) => - { - Size size = new Size(cellWidths[i], rowHeight); - return x.HeaderCell.Render(size).ToList(); - }) - .ToList(); - - bool displayBorder = parentDataGrid?.DisplayBorder ?? true; - BorderTemplate borderTemplate = parentDataGrid?.BorderTemplate; - - for (int headerLineIndex = 0; headerLineIndex < rowHeight; headerLineIndex++) - { - // Write left border. - if (displayBorder && borderTemplate != null) - tablePrinter.WriteBorder(borderTemplate.Left); - - for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) - { - // Write cell content. - string content = cellContents[columnIndex][headerLineIndex]; - tablePrinter.WriteHeader(content); - - // Write intermediate or right border. - if (displayBorder && borderTemplate != null) - { - char cellBorderRight = columnIndex < columns.Count - 1 - ? borderTemplate.Vertical - : borderTemplate.Right; - - tablePrinter.WriteBorder(cellBorderRight); - } - } - - tablePrinter.WriteLine(); - } - } - - /// - /// Returns an enumerator that iterates through the s containined by the current instance. - /// - public IEnumerator GetEnumerator() - { - return columns.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Keeps the information about the columns from a table. + /// It is also responsible to render the column headers. + /// + public class ColumnList : IEnumerable + { + private readonly DataGrid parentDataGrid; + + private readonly List columns = new List(); + + /// + /// Gets the number of columns contained in the current instance. + /// + public int Count => columns.Count; + + /// + /// Gets the at the specified index. + /// If the index is outside of the bounds of the list, null is returned. + /// + /// The index of the to return. + /// The at the specified index. + public Column this[int index] => index >= 0 && index < columns.Count + ? columns[index] + : null; + + /// + /// Initializes a new instance of the class with + /// the table that owns it. + /// + /// The table that owns the new instance. + public ColumnList(DataGrid parentDataGrid) + { + if (parentDataGrid == null) throw new ArgumentNullException(nameof(parentDataGrid)); + this.parentDataGrid = parentDataGrid; + } + + /// + /// Adds a new to the end of the list. + /// + /// The text to be displayed in the header of the column. + public void Add(string columnHeader) + { + Column column = new Column(columnHeader) + { + ParentDataGrid = parentDataGrid + }; + columns.Add(column); + } + + /// + /// Adds a new to the end of the list. + /// + /// The instance to be added. + public void Add(Column column) + { + if (column == null) throw new ArgumentNullException(nameof(column)); + + column.ParentDataGrid = parentDataGrid; + columns.Add(column); + } + + /// + /// Renders the row containing the column headers. + /// + /// The destination where the current instance must be rendered. + /// The widths of each header cell that must be rendered. + /// The height of the row to be rendered. If there are not enough text lines + /// in the content of a cell, spaces are written instead. + public void RenderHeaderRow(ITablePrinter tablePrinter, List cellWidths, int rowHeight) + { + // Get cells content. + List> cellContents = columns + .Select((x, i) => + { + Size size = new Size(cellWidths[i], rowHeight); + return x.HeaderCell.Render(size).ToList(); + }) + .ToList(); + + bool displayBorder = parentDataGrid?.DisplayBorder ?? true; + BorderTemplate borderTemplate = parentDataGrid?.BorderTemplate; + + for (int headerLineIndex = 0; headerLineIndex < rowHeight; headerLineIndex++) + { + // Write left border. + if (displayBorder && borderTemplate != null) + tablePrinter.WriteBorder(borderTemplate.Left); + + for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) + { + // Write cell content. + string content = cellContents[columnIndex][headerLineIndex]; + tablePrinter.WriteHeader(content); + + // Write intermediate or right border. + if (displayBorder && borderTemplate != null) + { + char cellBorderRight = columnIndex < columns.Count - 1 + ? borderTemplate.Vertical + : borderTemplate.Right; + + tablePrinter.WriteBorder(cellBorderRight); + } + } + + tablePrinter.WriteLine(); + } + } + + /// + /// Returns an enumerator that iterates through the s containined by the current instance. + /// + public IEnumerator GetEnumerator() + { + return columns.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj b/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj new file mode 100644 index 00000000..35b55981 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj @@ -0,0 +1,13 @@ + + + + netstandard2.0 + DustInTheWind.ConsoleTools.TabularData + DustInTheWind.ConsoleTools.Tables + + + + + + + diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/DataCell.cs rename to sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs index f3d0688c..27a08297 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs @@ -1,248 +1,248 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Represents a cell that contains data. - /// - public class DataCell : CellBase - { - /// - /// Gets the default horizontal alignment for a data cell. - /// - public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; - - /// - /// Gets or sets the row that contains the current cell. - /// - public DataRow ParentRow { get; internal set; } - - /// - /// Gets or sets the padding applyed to the left side of the cell. - /// - public int? PaddingLeft { get; set; } - - /// - /// Gets or sets the padding applyed to the right side of the cell. - /// - public int? PaddingRight { get; set; } - - /// - /// Initializes a new instance of the class with - /// empty content. - /// - public DataCell() - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it. - /// - /// The text displayed in the cell. - public DataCell(string text) - : base(text) - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it and its horizontal alignment. - /// - /// The text displayed in the cell. - /// The horizontal alignment of the content of the new cell. - public DataCell(string text, HorizontalAlignment horizontalAlignment) - : base(text, horizontalAlignment) - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it. - /// - /// - public DataCell(MultilineText text) - : base(text) - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it and its horizontal alignment. - /// - /// - /// The horizontal alignment of the content of the new cell. - public DataCell(MultilineText text, HorizontalAlignment horizontalAlignment) - : base(text, horizontalAlignment) - { - } - - /// - /// Initializes a new instance of the class with - /// an object representing the content. - /// - public DataCell(object content) - : base(content) - { - } - - /// - /// Initializes a new instance of the class with - /// an object representing the content and its horizontal alignment. - /// - public DataCell(object content, HorizontalAlignment horizontalAlignment) - : base(content, horizontalAlignment) - { - } - - /// - /// Calculates and returns the left padding for the content displayed in the cell. - /// The value is calculated taking into account also the parent row, parent column and parent table. - /// - protected override int CalculatePaddingLeft() - { - if (PaddingLeft.HasValue) - return PaddingLeft.Value; - - if (ParentRow != null) - { - if (ParentRow.PaddingLeft.HasValue) - return ParentRow.PaddingLeft.Value; - - if (ParentRow.ParentDataGrid != null) - { - Column column = GetColumn(); - - if (column?.PaddingLeft != null) - return column.PaddingLeft.Value; - - if (ParentRow.ParentDataGrid.PaddingLeft.HasValue) - return ParentRow.ParentDataGrid.PaddingLeft.Value; - } - } - - return 0; - } - - /// - /// Calculates and returns the right padding for the content displayed in the cell. - /// The value is calculated taking into account also the parent row, parent column and parent table. - /// - protected override int CalculatePaddingRight() - { - if (PaddingRight.HasValue) - return PaddingRight.Value; - - if (ParentRow != null) - { - if (ParentRow.PaddingRight.HasValue) - return ParentRow.PaddingRight.Value; - - - if (ParentRow.ParentDataGrid != null) - { - Column column = GetColumn(); - - if (column?.PaddingRight != null) - return column.PaddingRight.Value; - - if (ParentRow.ParentDataGrid.PaddingRight.HasValue) - return ParentRow.ParentDataGrid.PaddingRight.Value; - } - } - - return 0; - } - - /// - /// Returns the calculated horizontal alignment for the content of the current data cell. - /// The value is calculated based on the property of the current data cell, - /// and the values specified by the parent row, parent column and parent table. - /// It never returns . - /// - protected override HorizontalAlignment CalculateHorizontalAlignment() - { - HorizontalAlignment alignment = HorizontalAlignment; - - if (alignment == HorizontalAlignment.Default) - alignment = CalculateHorizontalAlignmentAtRowLevel(); - - if (alignment == HorizontalAlignment.Default) - alignment = CalculateHorizontalAlignmentAtColumnLevel(); - - if (alignment == HorizontalAlignment.Default) - alignment = CalculateHorizontalAlignmentAtTableLevel(); - - if (alignment == HorizontalAlignment.Default) - alignment = DefaultHorizontalAlignment; - - return alignment; - } - - private HorizontalAlignment CalculateHorizontalAlignmentAtRowLevel() - { - DataRow row = ParentRow; - return row?.CellHorizontalAlignment ?? HorizontalAlignment.Default; - } - - private HorizontalAlignment CalculateHorizontalAlignmentAtColumnLevel() - { - Column column = GetColumn(); - return column?.HorizontalAlignment ?? HorizontalAlignment.Default; - } - - private Column GetColumn() - { - ColumnList columns = ParentRow?.ParentDataGrid?.Columns; - int? columnIndex = ParentRow?.IndexOfCell(this); - - return columns != null && columnIndex.HasValue - ? ParentRow?.ParentDataGrid?.Columns[columnIndex.Value] - : null; - } - - private HorizontalAlignment CalculateHorizontalAlignmentAtTableLevel() - { - DataGrid dataGrid = ParentRow?.ParentDataGrid; - return dataGrid?.CellHorizontalAlignment ?? HorizontalAlignment.Default; - } - - /// - /// Converts a into a instance. - /// - /// The text to be converted. - public static implicit operator DataCell(string text) - { - MultilineText multilineText = new MultilineText(text); - return new DataCell(multilineText); - } - - /// - /// Converts a into its representation. - /// - /// The to be converted. - public static implicit operator string(DataCell cell) - { - return cell.Content?.ToString() ?? string.Empty; - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Represents a cell that contains data. + /// + public class DataCell : CellBase + { + /// + /// Gets the default horizontal alignment for a data cell. + /// + public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; + + /// + /// Gets or sets the row that contains the current cell. + /// + public DataRow ParentRow { get; internal set; } + + /// + /// Gets or sets the padding applyed to the left side of the cell. + /// + public int? PaddingLeft { get; set; } + + /// + /// Gets or sets the padding applyed to the right side of the cell. + /// + public int? PaddingRight { get; set; } + + /// + /// Initializes a new instance of the class with + /// empty content. + /// + public DataCell() + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it. + /// + /// The text displayed in the cell. + public DataCell(string text) + : base(text) + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it and its horizontal alignment. + /// + /// The text displayed in the cell. + /// The horizontal alignment of the content of the new cell. + public DataCell(string text, HorizontalAlignment horizontalAlignment) + : base(text, horizontalAlignment) + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it. + /// + /// + public DataCell(MultilineText text) + : base(text) + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it and its horizontal alignment. + /// + /// + /// The horizontal alignment of the content of the new cell. + public DataCell(MultilineText text, HorizontalAlignment horizontalAlignment) + : base(text, horizontalAlignment) + { + } + + /// + /// Initializes a new instance of the class with + /// an object representing the content. + /// + public DataCell(object content) + : base(content) + { + } + + /// + /// Initializes a new instance of the class with + /// an object representing the content and its horizontal alignment. + /// + public DataCell(object content, HorizontalAlignment horizontalAlignment) + : base(content, horizontalAlignment) + { + } + + /// + /// Calculates and returns the left padding for the content displayed in the cell. + /// The value is calculated taking into account also the parent row, parent column and parent table. + /// + protected override int CalculatePaddingLeft() + { + if (PaddingLeft.HasValue) + return PaddingLeft.Value; + + if (ParentRow != null) + { + if (ParentRow.PaddingLeft.HasValue) + return ParentRow.PaddingLeft.Value; + + if (ParentRow.ParentDataGrid != null) + { + Column column = GetColumn(); + + if (column?.PaddingLeft != null) + return column.PaddingLeft.Value; + + if (ParentRow.ParentDataGrid.PaddingLeft.HasValue) + return ParentRow.ParentDataGrid.PaddingLeft.Value; + } + } + + return 0; + } + + /// + /// Calculates and returns the right padding for the content displayed in the cell. + /// The value is calculated taking into account also the parent row, parent column and parent table. + /// + protected override int CalculatePaddingRight() + { + if (PaddingRight.HasValue) + return PaddingRight.Value; + + if (ParentRow != null) + { + if (ParentRow.PaddingRight.HasValue) + return ParentRow.PaddingRight.Value; + + + if (ParentRow.ParentDataGrid != null) + { + Column column = GetColumn(); + + if (column?.PaddingRight != null) + return column.PaddingRight.Value; + + if (ParentRow.ParentDataGrid.PaddingRight.HasValue) + return ParentRow.ParentDataGrid.PaddingRight.Value; + } + } + + return 0; + } + + /// + /// Returns the calculated horizontal alignment for the content of the current data cell. + /// The value is calculated based on the property of the current data cell, + /// and the values specified by the parent row, parent column and parent table. + /// It never returns . + /// + protected override HorizontalAlignment CalculateHorizontalAlignment() + { + HorizontalAlignment alignment = HorizontalAlignment; + + if (alignment == HorizontalAlignment.Default) + alignment = CalculateHorizontalAlignmentAtRowLevel(); + + if (alignment == HorizontalAlignment.Default) + alignment = CalculateHorizontalAlignmentAtColumnLevel(); + + if (alignment == HorizontalAlignment.Default) + alignment = CalculateHorizontalAlignmentAtTableLevel(); + + if (alignment == HorizontalAlignment.Default) + alignment = DefaultHorizontalAlignment; + + return alignment; + } + + private HorizontalAlignment CalculateHorizontalAlignmentAtRowLevel() + { + DataRow row = ParentRow; + return row?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + } + + private HorizontalAlignment CalculateHorizontalAlignmentAtColumnLevel() + { + Column column = GetColumn(); + return column?.HorizontalAlignment ?? HorizontalAlignment.Default; + } + + private Column GetColumn() + { + ColumnList columns = ParentRow?.ParentDataGrid?.Columns; + int? columnIndex = ParentRow?.IndexOfCell(this); + + return columns != null && columnIndex.HasValue + ? ParentRow?.ParentDataGrid?.Columns[columnIndex.Value] + : null; + } + + private HorizontalAlignment CalculateHorizontalAlignmentAtTableLevel() + { + DataGrid dataGrid = ParentRow?.ParentDataGrid; + return dataGrid?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + } + + /// + /// Converts a into a instance. + /// + /// The text to be converted. + public static implicit operator DataCell(string text) + { + MultilineText multilineText = new MultilineText(text); + return new DataCell(multilineText); + } + + /// + /// Converts a into its representation. + /// + /// The to be converted. + public static implicit operator string(DataCell cell) + { + return cell.Content?.ToString() ?? string.Empty; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/DataGrid.cs rename to sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs index 2d45d3bf..b0a4a86b 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs @@ -1,317 +1,317 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Reflection; -using DustInTheWind.ConsoleTools.TabularData.Printers; -using DustInTheWind.ConsoleTools.TabularData.RenderingModel; - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// A control that renders a table with data into the console. - /// - public class DataGrid : BlockControl - { - /// - /// Gets the instance that represents the title row of the table. - /// - public TitleRow TitleRow { get; } - - /// - /// Gets or sets the title of the current instance of the . - /// - public MultilineText Title - { - get => TitleRow.TitleCell.Content; - set => TitleRow.TitleCell.Content = value; - } - - /// - /// Gets or sets a value that specifies if the title is displayed. - /// - public bool DisplayTitle { get; set; } = true; - - /// - /// Gets or sets the padding applyed to the left side of every cell. - /// - public int? PaddingLeft { get; set; } = 1; - - /// - /// Gets or sets the padding applyed to the right side of every cell. - /// - public int? PaddingRight { get; set; } = 1; - - /// - /// Gets a value that specifies if border lines should be drawn between rows. - /// Default value: false - /// - public bool DisplayBorderBetweenRows { get; set; } - - /// - /// Gets or sets the horizontal alignment for the content of the cells contained by the current table. - /// - public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; - - /// - /// Gets the list of columns contained by the current table. - /// - public ColumnList Columns { get; } - - /// - /// The list of rows contained by the current table. - /// - public DataRowList Rows { get; } - - /// - /// Gets or sets the minimum width of the table. - /// - public int MinWidth { get; set; } - - /// - /// Gets or sets a value that specifies if the column headers are displayed. - /// Default value: true - /// - public bool DisplayColumnHeaders { get; set; } = true; - - /// - /// Gets the row at the specified index. - /// - /// The zero-based index of the row to get. - /// The row at the specified index. - public DataRow this[int rowIndex] => Rows[rowIndex]; - - /// - /// Gets the cell at the specified location. - /// - /// The zero-based row index of the cell to get. - /// The zero-based column index of the cell to get. - /// The cell at the specified location. - public DataCell this[int rowIndex, int columnIndex] => Rows[rowIndex][columnIndex]; - - /// - /// Gets or sets a value that specifies if the borders are visible. - /// Default value: true - /// - public bool DisplayBorder { get; set; } = true; - - /// - /// Gets or sets the table borders. - /// - public BorderTemplate BorderTemplate { get; set; } = BorderTemplate.PlusMinusBorderTemplate; - - /// - /// Initializes a new instance of the class. - /// - public DataGrid() - { - Rows = new DataRowList(this); - Columns = new ColumnList(this); - - TitleRow = new TitleRow - { - ParentDataGrid = this - }; - } - - /// - /// Initializes a new instance of the class with - /// the table title. - /// - public DataGrid(string title) - { - Rows = new DataRowList(this); - Columns = new ColumnList(this); - - TitleRow = new TitleRow(title) - { - ParentDataGrid = this - }; - } - - /// - /// Initializes a new instance of the class with - /// the table title. - /// - public DataGrid(MultilineText title) - { - Rows = new DataRowList(this); - Columns = new ColumnList(this); - - TitleRow = new TitleRow(title) - { - ParentDataGrid = this - }; - } - - /// - /// Initializes a new instance of the class with - /// the table title. - /// - public DataGrid(object title) - { - Rows = new DataRowList(this); - Columns = new ColumnList(this); - - TitleRow = new TitleRow(title) - { - ParentDataGrid = this - }; - } - - /// - /// Renders the current instance into the console. - /// - protected override void DoDisplayContent() - { - ConsoleTablePrinter consoleTablePrinter = new ConsoleTablePrinter(); - RenderInternal(consoleTablePrinter); - } - - /// - /// Renders the current instance into the specified . - /// - /// The instacne used to render the data. - public void Render(ITablePrinter tablePrinter) - { - RenderInternal(tablePrinter); - } - - private void RenderInternal(ITablePrinter tablePrinter) - { - DataGridXBuilder dataGridXBuilder = new DataGridXBuilder - { - MinWidth = MinWidth, - TitleRow = TitleRow, - DisplayTitle = DisplayTitle, - Columns = Columns, - DisplayColumnHeaders = DisplayColumnHeaders, - Rows = Rows, - DisplayBorderBetweenRows = DisplayBorderBetweenRows, - BorderTemplate = BorderTemplate, - DisplayBorder = DisplayBorder - }; - - DataGridX dataGridX = dataGridXBuilder.Build(); - - dataGridX.Render(tablePrinter); - } - - /// - /// Returns the string representation of the current instance. - /// - /// The string representation of the current instance. - public override string ToString() - { - StringTablePrinter tablePrinter = new StringTablePrinter(); - RenderInternal(tablePrinter); - - return tablePrinter.ToString(); - } - - /// - /// Creates a new instance containing the data from the specified . - /// - /// The instance that contains the data. - /// The newly created instance. - public static DataGrid BuildFrom(DataTable dataTable) - { - DataGrid dataGrid = new DataGrid(dataTable.TableName); - - foreach (DataColumn dataColumn in dataTable.Columns) - { - string columnHeader = string.IsNullOrEmpty(dataColumn.Caption) - ? dataColumn.ColumnName - : dataColumn.Caption; - - dataGrid.Columns.Add(columnHeader); - } - - foreach (System.Data.DataRow dataRow in dataTable.Rows) - { - DataRow row = new DataRow(dataRow.ItemArray); - dataGrid.Rows.Add(row); - } - - return dataGrid; - } - - public static DataGrid BuildFrom(IEnumerable data) - { - if (data == null) throw new ArgumentNullException(nameof(data)); - - Type type = typeof(T); - - DataGrid dataGrid = new DataGrid(type.Name); - - List members = new List(); - - FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public); - - foreach (FieldInfo fieldInfo in fields) - { - dataGrid.Columns.Add(fieldInfo.Name); - members.Add(fieldInfo); - } - - IEnumerable properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public) - .Where(x => x.CanRead); - - foreach (PropertyInfo propertyInfo in properties) - { - dataGrid.Columns.Add(propertyInfo.Name); - members.Add(propertyInfo); - } - - foreach (T item in data) - { - DataRow dataRow = new DataRow(); - - foreach (MemberInfo memberInfo in members) - { - switch (memberInfo) - { - case FieldInfo fieldInfo: - { - object value = fieldInfo.GetValue(item); - dataRow.AddCell(value); - break; - } - case PropertyInfo propertyInfo: - { - object value = propertyInfo.GetValue(item); - dataRow.AddCell(value); - break; - } - } - } - - dataGrid.Rows.Add(dataRow); - } - - return dataGrid; - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using DustInTheWind.ConsoleTools.TabularData.Printers; +using DustInTheWind.ConsoleTools.TabularData.RenderingModel; + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// A control that renders a table with data into the console. + /// + public class DataGrid : BlockControl + { + /// + /// Gets the instance that represents the title row of the table. + /// + public TitleRow TitleRow { get; } + + /// + /// Gets or sets the title of the current instance of the . + /// + public MultilineText Title + { + get => TitleRow.TitleCell.Content; + set => TitleRow.TitleCell.Content = value; + } + + /// + /// Gets or sets a value that specifies if the title is displayed. + /// + public bool DisplayTitle { get; set; } = true; + + /// + /// Gets or sets the padding applyed to the left side of every cell. + /// + public int? PaddingLeft { get; set; } = 1; + + /// + /// Gets or sets the padding applyed to the right side of every cell. + /// + public int? PaddingRight { get; set; } = 1; + + /// + /// Gets a value that specifies if border lines should be drawn between rows. + /// Default value: false + /// + public bool DisplayBorderBetweenRows { get; set; } + + /// + /// Gets or sets the horizontal alignment for the content of the cells contained by the current table. + /// + public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; + + /// + /// Gets the list of columns contained by the current table. + /// + public ColumnList Columns { get; } + + /// + /// The list of rows contained by the current table. + /// + public DataRowList Rows { get; } + + /// + /// Gets or sets the minimum width of the table. + /// + public int MinWidth { get; set; } + + /// + /// Gets or sets a value that specifies if the column headers are displayed. + /// Default value: true + /// + public bool DisplayColumnHeaders { get; set; } = true; + + /// + /// Gets the row at the specified index. + /// + /// The zero-based index of the row to get. + /// The row at the specified index. + public DataRow this[int rowIndex] => Rows[rowIndex]; + + /// + /// Gets the cell at the specified location. + /// + /// The zero-based row index of the cell to get. + /// The zero-based column index of the cell to get. + /// The cell at the specified location. + public DataCell this[int rowIndex, int columnIndex] => Rows[rowIndex][columnIndex]; + + /// + /// Gets or sets a value that specifies if the borders are visible. + /// Default value: true + /// + public bool DisplayBorder { get; set; } = true; + + /// + /// Gets or sets the table borders. + /// + public BorderTemplate BorderTemplate { get; set; } = BorderTemplate.PlusMinusBorderTemplate; + + /// + /// Initializes a new instance of the class. + /// + public DataGrid() + { + Rows = new DataRowList(this); + Columns = new ColumnList(this); + + TitleRow = new TitleRow + { + ParentDataGrid = this + }; + } + + /// + /// Initializes a new instance of the class with + /// the table title. + /// + public DataGrid(string title) + { + Rows = new DataRowList(this); + Columns = new ColumnList(this); + + TitleRow = new TitleRow(title) + { + ParentDataGrid = this + }; + } + + /// + /// Initializes a new instance of the class with + /// the table title. + /// + public DataGrid(MultilineText title) + { + Rows = new DataRowList(this); + Columns = new ColumnList(this); + + TitleRow = new TitleRow(title) + { + ParentDataGrid = this + }; + } + + /// + /// Initializes a new instance of the class with + /// the table title. + /// + public DataGrid(object title) + { + Rows = new DataRowList(this); + Columns = new ColumnList(this); + + TitleRow = new TitleRow(title) + { + ParentDataGrid = this + }; + } + + /// + /// Renders the current instance into the console. + /// + protected override void DoDisplayContent() + { + ConsoleTablePrinter consoleTablePrinter = new ConsoleTablePrinter(); + RenderInternal(consoleTablePrinter); + } + + /// + /// Renders the current instance into the specified . + /// + /// The instacne used to render the data. + public void Render(ITablePrinter tablePrinter) + { + RenderInternal(tablePrinter); + } + + private void RenderInternal(ITablePrinter tablePrinter) + { + DataGridXBuilder dataGridXBuilder = new DataGridXBuilder + { + MinWidth = MinWidth, + TitleRow = TitleRow, + DisplayTitle = DisplayTitle, + Columns = Columns, + DisplayColumnHeaders = DisplayColumnHeaders, + Rows = Rows, + DisplayBorderBetweenRows = DisplayBorderBetweenRows, + BorderTemplate = BorderTemplate, + DisplayBorder = DisplayBorder + }; + + DataGridX dataGridX = dataGridXBuilder.Build(); + + dataGridX.Render(tablePrinter); + } + + /// + /// Returns the string representation of the current instance. + /// + /// The string representation of the current instance. + public override string ToString() + { + StringTablePrinter tablePrinter = new StringTablePrinter(); + RenderInternal(tablePrinter); + + return tablePrinter.ToString(); + } + + /// + /// Creates a new instance containing the data from the specified . + /// + /// The instance that contains the data. + /// The newly created instance. + public static DataGrid BuildFrom(DataTable dataTable) + { + DataGrid dataGrid = new DataGrid(dataTable.TableName); + + foreach (DataColumn dataColumn in dataTable.Columns) + { + string columnHeader = string.IsNullOrEmpty(dataColumn.Caption) + ? dataColumn.ColumnName + : dataColumn.Caption; + + dataGrid.Columns.Add(columnHeader); + } + + foreach (System.Data.DataRow dataRow in dataTable.Rows) + { + DataRow row = new DataRow(dataRow.ItemArray); + dataGrid.Rows.Add(row); + } + + return dataGrid; + } + + public static DataGrid BuildFrom(IEnumerable data) + { + if (data == null) throw new ArgumentNullException(nameof(data)); + + Type type = typeof(T); + + DataGrid dataGrid = new DataGrid(type.Name); + + List members = new List(); + + FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public); + + foreach (FieldInfo fieldInfo in fields) + { + dataGrid.Columns.Add(fieldInfo.Name); + members.Add(fieldInfo); + } + + IEnumerable properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public) + .Where(x => x.CanRead); + + foreach (PropertyInfo propertyInfo in properties) + { + dataGrid.Columns.Add(propertyInfo.Name); + members.Add(propertyInfo); + } + + foreach (T item in data) + { + DataRow dataRow = new DataRow(); + + foreach (MemberInfo memberInfo in members) + { + switch (memberInfo) + { + case FieldInfo fieldInfo: + { + object value = fieldInfo.GetValue(item); + dataRow.AddCell(value); + break; + } + case PropertyInfo propertyInfo: + { + object value = propertyInfo.GetValue(item); + dataRow.AddCell(value); + break; + } + } + } + + dataGrid.Rows.Add(dataRow); + } + + return dataGrid; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/DataRow.cs rename to sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs index 018443c6..3fa6fbf5 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs @@ -1,318 +1,318 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Represents a row in the class. - /// - public class DataRow - { - /// - /// Gets the list of cells contained by the row. - /// - private readonly List cells = new List(); - - /// - /// Gets or sets the instance that contains the current instance. - /// - public DataGrid ParentDataGrid { get; internal set; } - - /// - /// Gets the number of cells contained by the current instance. - /// - public int CellCount => cells.Count; - - /// - /// Gets or sets the horizontal alignment for the content of the cells contained by the current instance of the . - /// - public HorizontalAlignment CellHorizontalAlignment { get; set; } - - /// - /// Gets or sets the padding applyed to the left side of every cell. - /// - public int? PaddingLeft { get; set; } - - /// - /// Gets or sets the padding applyed to the right side of every cell. - /// - public int? PaddingRight { get; set; } - - /// - /// Initializes a new instance of the class with default values. - /// - public DataRow() - { - } - - /// - /// Initializes a new instance of the class with - /// the list of cells. - /// - /// The list of cells that will be contained by the new row. - public DataRow(IEnumerable cells) - { - if (cells == null) - return; - - foreach (DataCell cell in cells) - AddCell(cell); - } - - /// - /// Initializes a new instance of the class with - /// the list of cells. - /// - /// The list of cells that will be contained by the new row. - public DataRow(params DataCell[] cells) - { - if (cells == null) - return; - - foreach (DataCell cell in cells) - AddCell(cell); - } - - /// - /// Initializes a new instance of the class with - /// the list of texts representing the cells content. - /// - /// The list of texts that will be placed in cells. - public DataRow(IEnumerable cellContents) - { - if (cellContents == null) - return; - - foreach (string cell in cellContents) - AddCell(cell); - } - - /// - /// Initializes a new instance of the class with - /// the list of texts representing the cells content. - /// - /// The list of texts that will be placed in cells. - public DataRow(params string[] cellContents) - { - if (cellContents == null) - return; - - foreach (string cell in cellContents) - AddCell(cell); - } - - /// - /// Initializes a new instance of the class with - /// the list of ojects representing the cells content. - /// - /// The list of objects that will be placed in cells. - public DataRow(IEnumerable cellContents) - { - if (cellContents == null) - return; - - foreach (MultilineText cell in cellContents) - AddCell(cell); - } - - /// - /// Initializes a new instance of the class with - /// the list of ojects representing the cells content. - /// - /// The list of objects that will be placed in cells. - public DataRow(params MultilineText[] cellContents) - { - if (cellContents == null) - return; - - foreach (MultilineText cell in cellContents) - AddCell(cell); - } - - /// - /// Initializes a new instance of the class with - /// the list of objects representing the cells content. - /// - /// The list of objects that will be placed in cells. - public DataRow(IEnumerable cellContents) - { - if (cellContents == null) - return; - - foreach (object cell in cellContents) - AddCell(cell); - } - - /// - /// Initializes a new instance of the class with - /// the list of objects representing the cells content. - /// - /// The list of objects that will be placed in cells. - public DataRow(params object[] cellContents) - { - if (cellContents == null) - return; - - foreach (object cell in cellContents) - AddCell(cell); - } - - /// - /// Adds a new cell to the current instace of . - /// - public void AddCell(DataCell cell) - { - if (cell == null) - { - DataCell newCell = new DataCell - { - ParentRow = this - }; - cells.Add(newCell); - } - else - { - cell.ParentRow = this; - cells.Add(cell); - } - } - - /// - /// Adds a new cell to the current instace of . - /// - public void AddCell(string cellContent) - { - DataCell newCell = new DataCell - { - ParentRow = this - }; - - if (cellContent != null) - newCell.Content = new MultilineText(cellContent); - - cells.Add(newCell); - } - - /// - /// Adds a new cell to the current instace of . - /// - public void AddCell(MultilineText cellContent) - { - DataCell newCell = new DataCell - { - ParentRow = this - }; - - if (cellContent != null) - newCell.Content = cellContent; - - cells.Add(newCell); - } - - /// - /// Adds a new cell to the current instace of . - /// - public void AddCell(object cellContent) - { - DataCell newCell = new DataCell - { - ParentRow = this - }; - - if (cellContent != null) - newCell.Content = new MultilineText(cellContent.ToString()); - - cells.Add(newCell); - } - - /// - /// Gets or sets the cell at the specified index. - /// - /// The zero-based index of the cell to get or set. - /// The cell at the specified index. - /// - public DataCell this[int index] - { - get { return cells[index]; } - set { cells[index] = value; } - } - - /// - /// Returns the index of the specified cell or null if the instance - /// is not found in the current instance. - /// - public int? IndexOfCell(DataCell cell) - { - int indexOfCell = cells.IndexOf(cell); - return indexOfCell == -1 ? (int?) null : indexOfCell; - } - - /// - /// Renders the row current row. - /// - /// The destination where the current instance must be rendered. - /// The widths of each cell that must be rendered. - /// The height of the row to be rendered. If there are not enough text lines - /// in the content of a cell, spaces are written instead. - public void Render(ITablePrinter tablePrinter, List cellWidths, int height) - { - List> cellContents = cells - .Select((x, i) => - { - Size size = new Size(cellWidths[i], height); - return x.Render(size).ToList(); - }) - .ToList(); - - BorderTemplate borderTemplate = ParentDataGrid?.BorderTemplate; - - bool displayBorder = borderTemplate != null && ParentDataGrid?.DisplayBorder == true; - - for (int rowLineIndex = 0; rowLineIndex < height; rowLineIndex++) - { - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Left); - - for (int columnIndex = 0; columnIndex < cells.Count; columnIndex++) - { - string content = cellContents[columnIndex][rowLineIndex]; - tablePrinter.WriteNormal(content); - - if (displayBorder) - { - char cellBorderRight = columnIndex < cells.Count - 1 - ? borderTemplate.Vertical - : borderTemplate.Right; - - tablePrinter.WriteBorder(cellBorderRight); - } - } - - tablePrinter.WriteLine(); - } - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Represents a row in the class. + /// + public class DataRow + { + /// + /// Gets the list of cells contained by the row. + /// + private readonly List cells = new List(); + + /// + /// Gets or sets the instance that contains the current instance. + /// + public DataGrid ParentDataGrid { get; internal set; } + + /// + /// Gets the number of cells contained by the current instance. + /// + public int CellCount => cells.Count; + + /// + /// Gets or sets the horizontal alignment for the content of the cells contained by the current instance of the . + /// + public HorizontalAlignment CellHorizontalAlignment { get; set; } + + /// + /// Gets or sets the padding applyed to the left side of every cell. + /// + public int? PaddingLeft { get; set; } + + /// + /// Gets or sets the padding applyed to the right side of every cell. + /// + public int? PaddingRight { get; set; } + + /// + /// Initializes a new instance of the class with default values. + /// + public DataRow() + { + } + + /// + /// Initializes a new instance of the class with + /// the list of cells. + /// + /// The list of cells that will be contained by the new row. + public DataRow(IEnumerable cells) + { + if (cells == null) + return; + + foreach (DataCell cell in cells) + AddCell(cell); + } + + /// + /// Initializes a new instance of the class with + /// the list of cells. + /// + /// The list of cells that will be contained by the new row. + public DataRow(params DataCell[] cells) + { + if (cells == null) + return; + + foreach (DataCell cell in cells) + AddCell(cell); + } + + /// + /// Initializes a new instance of the class with + /// the list of texts representing the cells content. + /// + /// The list of texts that will be placed in cells. + public DataRow(IEnumerable cellContents) + { + if (cellContents == null) + return; + + foreach (string cell in cellContents) + AddCell(cell); + } + + /// + /// Initializes a new instance of the class with + /// the list of texts representing the cells content. + /// + /// The list of texts that will be placed in cells. + public DataRow(params string[] cellContents) + { + if (cellContents == null) + return; + + foreach (string cell in cellContents) + AddCell(cell); + } + + /// + /// Initializes a new instance of the class with + /// the list of ojects representing the cells content. + /// + /// The list of objects that will be placed in cells. + public DataRow(IEnumerable cellContents) + { + if (cellContents == null) + return; + + foreach (MultilineText cell in cellContents) + AddCell(cell); + } + + /// + /// Initializes a new instance of the class with + /// the list of ojects representing the cells content. + /// + /// The list of objects that will be placed in cells. + public DataRow(params MultilineText[] cellContents) + { + if (cellContents == null) + return; + + foreach (MultilineText cell in cellContents) + AddCell(cell); + } + + /// + /// Initializes a new instance of the class with + /// the list of objects representing the cells content. + /// + /// The list of objects that will be placed in cells. + public DataRow(IEnumerable cellContents) + { + if (cellContents == null) + return; + + foreach (object cell in cellContents) + AddCell(cell); + } + + /// + /// Initializes a new instance of the class with + /// the list of objects representing the cells content. + /// + /// The list of objects that will be placed in cells. + public DataRow(params object[] cellContents) + { + if (cellContents == null) + return; + + foreach (object cell in cellContents) + AddCell(cell); + } + + /// + /// Adds a new cell to the current instace of . + /// + public void AddCell(DataCell cell) + { + if (cell == null) + { + DataCell newCell = new DataCell + { + ParentRow = this + }; + cells.Add(newCell); + } + else + { + cell.ParentRow = this; + cells.Add(cell); + } + } + + /// + /// Adds a new cell to the current instace of . + /// + public void AddCell(string cellContent) + { + DataCell newCell = new DataCell + { + ParentRow = this + }; + + if (cellContent != null) + newCell.Content = new MultilineText(cellContent); + + cells.Add(newCell); + } + + /// + /// Adds a new cell to the current instace of . + /// + public void AddCell(MultilineText cellContent) + { + DataCell newCell = new DataCell + { + ParentRow = this + }; + + if (cellContent != null) + newCell.Content = cellContent; + + cells.Add(newCell); + } + + /// + /// Adds a new cell to the current instace of . + /// + public void AddCell(object cellContent) + { + DataCell newCell = new DataCell + { + ParentRow = this + }; + + if (cellContent != null) + newCell.Content = new MultilineText(cellContent.ToString()); + + cells.Add(newCell); + } + + /// + /// Gets or sets the cell at the specified index. + /// + /// The zero-based index of the cell to get or set. + /// The cell at the specified index. + /// + public DataCell this[int index] + { + get { return cells[index]; } + set { cells[index] = value; } + } + + /// + /// Returns the index of the specified cell or null if the instance + /// is not found in the current instance. + /// + public int? IndexOfCell(DataCell cell) + { + int indexOfCell = cells.IndexOf(cell); + return indexOfCell == -1 ? (int?) null : indexOfCell; + } + + /// + /// Renders the row current row. + /// + /// The destination where the current instance must be rendered. + /// The widths of each cell that must be rendered. + /// The height of the row to be rendered. If there are not enough text lines + /// in the content of a cell, spaces are written instead. + public void Render(ITablePrinter tablePrinter, List cellWidths, int height) + { + List> cellContents = cells + .Select((x, i) => + { + Size size = new Size(cellWidths[i], height); + return x.Render(size).ToList(); + }) + .ToList(); + + BorderTemplate borderTemplate = ParentDataGrid?.BorderTemplate; + + bool displayBorder = borderTemplate != null && ParentDataGrid?.DisplayBorder == true; + + for (int rowLineIndex = 0; rowLineIndex < height; rowLineIndex++) + { + if (displayBorder) + tablePrinter.WriteBorder(borderTemplate.Left); + + for (int columnIndex = 0; columnIndex < cells.Count; columnIndex++) + { + string content = cellContents[columnIndex][rowLineIndex]; + tablePrinter.WriteNormal(content); + + if (displayBorder) + { + char cellBorderRight = columnIndex < cells.Count - 1 + ? borderTemplate.Vertical + : borderTemplate.Right; + + tablePrinter.WriteBorder(cellBorderRight); + } + } + + tablePrinter.WriteLine(); + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/DataRowList.cs b/sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/DataRowList.cs rename to sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs index 83aed1ea..3646ec36 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/DataRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs @@ -1,260 +1,260 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Contains the list of s displayed by the table. - /// - public class DataRowList : IEnumerable - { - private readonly DataGrid parentDataGrid; - - private readonly List rows = new List(); - - /// - /// Gets the number of rows contained in the current instance. - /// - public int Count => rows.Count; - - /// - /// Gets the at the specified index. - /// If the index is outside of the bounds of the list, null is returned. - /// - /// The index of the to return. - /// The at the specified index. - public DataRow this[int rowIndex] => rowIndex >= 0 && rowIndex < rows.Count - ? rows[rowIndex] - : null; - - /// - /// Initializes a new instance of the class with - /// the table that owns it. - /// - /// The table that owns the new instance. - public DataRowList(DataGrid parentDataGrid) - { - if (parentDataGrid == null) throw new ArgumentNullException(nameof(parentDataGrid)); - this.parentDataGrid = parentDataGrid; - } - - /// - /// Adds a new row to the current table. - /// - /// The row to be added. - /// - public void Add(DataRow row) - { - if (row == null) throw new ArgumentNullException(nameof(row)); - - row.ParentDataGrid = parentDataGrid; - rows.Add(row); - } - - /// - /// Adds a new row to the current table. - /// - /// The list of cells of the new row. - public void Add(IEnumerable cells) - { - if (cells == null) throw new ArgumentNullException(nameof(cells)); - - DataRow row = new DataRow(cells) - { - ParentDataGrid = parentDataGrid - }; - rows.Add(row); - } - - /// - /// Adds a new row to the current table. - /// - /// The list of cells of the new row. - public void Add(params DataCell[] cells) - { - if (cells == null) throw new ArgumentNullException(nameof(cells)); - - DataRow row = new DataRow(cells) - { - ParentDataGrid = parentDataGrid - }; - rows.Add(row); - } - - /// - /// Adds a new row to the current table. - /// - /// The list of cell contents of the new row. - public void Add(IEnumerable cellContents) - { - if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - - DataRow row = new DataRow - { - ParentDataGrid = parentDataGrid - }; - - foreach (string text in cellContents) - row.AddCell(new DataCell(text)); - - rows.Add(row); - } - - /// - /// Adds a new row to the current table. - /// - /// The list of cell contents of the new row. - public void Add(params string[] cellContents) - { - if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - - DataRow row = new DataRow - { - ParentDataGrid = parentDataGrid - }; - - foreach (string text in cellContents) - row.AddCell(new DataCell(text)); - - rows.Add(row); - } - - /// - /// Adds a new row to the current table. - /// - /// The list of cell contents of the new row. - public void Add(IEnumerable cellContents) - { - if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - - DataRow row = new DataRow - { - ParentDataGrid = parentDataGrid - }; - - foreach (MultilineText text in cellContents) - row.AddCell(new DataCell(text)); - - rows.Add(row); - } - - /// - /// Adds a new row to the current table. - /// - /// The list of cell contents of the new row. - public void Add(params MultilineText[] cellContents) - { - if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - - DataRow row = new DataRow - { - ParentDataGrid = parentDataGrid - }; - - foreach (MultilineText text in cellContents) - row.AddCell(new DataCell(text)); - - rows.Add(row); - } - - /// - /// Adds a new row to the current table. - /// - /// The list of cell contents of the new row. - public void Add(IEnumerable cellContents) - { - if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - - DataRow row = new DataRow - { - ParentDataGrid = parentDataGrid - }; - - foreach (object cellContent in cellContents) - row.AddCell(new DataCell(cellContent)); - - rows.Add(row); - } - - /// - /// Adds a new row to the current table. - /// - /// The list of cell contents of the new row. - public void Add(params object[] cellContents) - { - if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - - DataRow row = new DataRow - { - ParentDataGrid = parentDataGrid - }; - - foreach (object cellContent in cellContents) - row.AddCell(new DataCell(cellContent)); - - rows.Add(row); - } - - /// - /// Removes the row at the specified index. - /// - /// index is less than 0.-or-index is equal to or greater than the number of rows. - public void RemoveAt(int index) - { - rows.RemoveAt(index); - } - - /// - /// Removes the first occurrence of the instance from the list. - /// - /// true if item is successfully removed; otherwise, false. - /// This method also returns false if item was not found in the list. - public bool Remove(DataRow row) - { - return rows.Remove(row); - } - - /// - /// Removes all the rows from the current instance. - /// - public void Clear() - { - rows.Clear(); - } - - /// - /// Returns an enumerator that iterates through the s containined by the current instance. - /// - public IEnumerator GetEnumerator() - { - return rows.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Contains the list of s displayed by the table. + /// + public class DataRowList : IEnumerable + { + private readonly DataGrid parentDataGrid; + + private readonly List rows = new List(); + + /// + /// Gets the number of rows contained in the current instance. + /// + public int Count => rows.Count; + + /// + /// Gets the at the specified index. + /// If the index is outside of the bounds of the list, null is returned. + /// + /// The index of the to return. + /// The at the specified index. + public DataRow this[int rowIndex] => rowIndex >= 0 && rowIndex < rows.Count + ? rows[rowIndex] + : null; + + /// + /// Initializes a new instance of the class with + /// the table that owns it. + /// + /// The table that owns the new instance. + public DataRowList(DataGrid parentDataGrid) + { + if (parentDataGrid == null) throw new ArgumentNullException(nameof(parentDataGrid)); + this.parentDataGrid = parentDataGrid; + } + + /// + /// Adds a new row to the current table. + /// + /// The row to be added. + /// + public void Add(DataRow row) + { + if (row == null) throw new ArgumentNullException(nameof(row)); + + row.ParentDataGrid = parentDataGrid; + rows.Add(row); + } + + /// + /// Adds a new row to the current table. + /// + /// The list of cells of the new row. + public void Add(IEnumerable cells) + { + if (cells == null) throw new ArgumentNullException(nameof(cells)); + + DataRow row = new DataRow(cells) + { + ParentDataGrid = parentDataGrid + }; + rows.Add(row); + } + + /// + /// Adds a new row to the current table. + /// + /// The list of cells of the new row. + public void Add(params DataCell[] cells) + { + if (cells == null) throw new ArgumentNullException(nameof(cells)); + + DataRow row = new DataRow(cells) + { + ParentDataGrid = parentDataGrid + }; + rows.Add(row); + } + + /// + /// Adds a new row to the current table. + /// + /// The list of cell contents of the new row. + public void Add(IEnumerable cellContents) + { + if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); + + DataRow row = new DataRow + { + ParentDataGrid = parentDataGrid + }; + + foreach (string text in cellContents) + row.AddCell(new DataCell(text)); + + rows.Add(row); + } + + /// + /// Adds a new row to the current table. + /// + /// The list of cell contents of the new row. + public void Add(params string[] cellContents) + { + if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); + + DataRow row = new DataRow + { + ParentDataGrid = parentDataGrid + }; + + foreach (string text in cellContents) + row.AddCell(new DataCell(text)); + + rows.Add(row); + } + + /// + /// Adds a new row to the current table. + /// + /// The list of cell contents of the new row. + public void Add(IEnumerable cellContents) + { + if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); + + DataRow row = new DataRow + { + ParentDataGrid = parentDataGrid + }; + + foreach (MultilineText text in cellContents) + row.AddCell(new DataCell(text)); + + rows.Add(row); + } + + /// + /// Adds a new row to the current table. + /// + /// The list of cell contents of the new row. + public void Add(params MultilineText[] cellContents) + { + if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); + + DataRow row = new DataRow + { + ParentDataGrid = parentDataGrid + }; + + foreach (MultilineText text in cellContents) + row.AddCell(new DataCell(text)); + + rows.Add(row); + } + + /// + /// Adds a new row to the current table. + /// + /// The list of cell contents of the new row. + public void Add(IEnumerable cellContents) + { + if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); + + DataRow row = new DataRow + { + ParentDataGrid = parentDataGrid + }; + + foreach (object cellContent in cellContents) + row.AddCell(new DataCell(cellContent)); + + rows.Add(row); + } + + /// + /// Adds a new row to the current table. + /// + /// The list of cell contents of the new row. + public void Add(params object[] cellContents) + { + if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); + + DataRow row = new DataRow + { + ParentDataGrid = parentDataGrid + }; + + foreach (object cellContent in cellContents) + row.AddCell(new DataCell(cellContent)); + + rows.Add(row); + } + + /// + /// Removes the row at the specified index. + /// + /// index is less than 0.-or-index is equal to or greater than the number of rows. + public void RemoveAt(int index) + { + rows.RemoveAt(index); + } + + /// + /// Removes the first occurrence of the instance from the list. + /// + /// true if item is successfully removed; otherwise, false. + /// This method also returns false if item was not found in the list. + public bool Remove(DataRow row) + { + return rows.Remove(row); + } + + /// + /// Removes all the rows from the current instance. + /// + public void Clear() + { + rows.Clear(); + } + + /// + /// Returns an enumerator that iterates through the s containined by the current instance. + /// + public IEnumerator GetEnumerator() + { + return rows.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/HeaderCell.cs rename to sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs index 825ad6b9..44a527c0 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs @@ -1,198 +1,198 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Represents the cell that contains a column header. - /// - public class HeaderCell : CellBase - { - /// - /// Gets the default horizontal alignment for a column header cell. - /// - public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; - - /// - /// Gets or sets the column that contains the current cell. - /// - public Column ParentColumn { get; internal set; } - - /// - /// Gets or sets the padding applyed to the left side of the cell. - /// - public int? PaddingLeft { get; set; } - - /// - /// Gets or sets the padding applyed to the right side of the cell. - /// - public int? PaddingRight { get; set; } - - /// - /// Initializes a new instance of the class with - /// empty content. - /// - public HeaderCell() - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it. - /// - /// The text displayed in the cell. - public HeaderCell(string text) - : base(text) - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it and its horizontal alignment. - /// - /// The text displayed in the cell. - /// The horizontal alignment of the content of the new cell. - public HeaderCell(string text, HorizontalAlignment horizontalAlignment) - : base(text, horizontalAlignment) - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it. - /// - /// - public HeaderCell(MultilineText text) - : base(text) - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it and its horizontal alignment. - /// - /// - /// The horizontal alignment of the content of the new cell. - public HeaderCell(MultilineText text, HorizontalAlignment horizontalAlignment) - : base(text, horizontalAlignment) - { - } - - /// - /// Initializes a new instance of the class with - /// an object representing the content. - /// - public HeaderCell(object content) - : base(content) - { - } - - /// - /// Initializes a new instance of the class with - /// an object representing the content and its horizontal alignment. - /// - protected HeaderCell(object content, HorizontalAlignment horizontalAlignment) - : base(content, horizontalAlignment) - { - } - - /// - /// Calculates and returns the left padding for the content displayed in the cell. - /// The value is calculated taking into account also the parent column and parent table. - /// - protected override int CalculatePaddingLeft() - { - if (PaddingLeft.HasValue) - return PaddingLeft.Value; - - if (ParentColumn != null) - { - if (ParentColumn.PaddingLeft.HasValue) - return ParentColumn.PaddingLeft.Value; - - if (ParentColumn.ParentDataGrid?.PaddingLeft != null) - return ParentColumn.ParentDataGrid.PaddingLeft.Value; - } - - return 0; - } - - /// - /// Calculates and returns the right padding for the content displayed in the cell. - /// The value is calculated taking into account also the parent column and parent table. - /// - protected override int CalculatePaddingRight() - { - if (PaddingRight.HasValue) - return PaddingRight.Value; - - if (ParentColumn != null) - { - if (ParentColumn.PaddingRight.HasValue) - return ParentColumn.PaddingRight.Value; - - if (ParentColumn.ParentDataGrid?.PaddingRight != null) - return ParentColumn.ParentDataGrid.PaddingRight.Value; - } - - return 0; - } - - /// - /// Calculates and returns the horizontal alignment of the content displayed in the cell. - /// The value is calculated taking into account also the parent row and parent table. - /// - protected override HorizontalAlignment CalculateHorizontalAlignment() - { - HorizontalAlignment alignment = HorizontalAlignment; - - if (alignment == HorizontalAlignment.Default) - alignment = ParentColumn?.HorizontalAlignment ?? HorizontalAlignment.Default; - - if (alignment == HorizontalAlignment.Default) - alignment = ParentColumn?.ParentDataGrid?.CellHorizontalAlignment ?? HorizontalAlignment.Default; - - if (alignment == HorizontalAlignment.Default) - alignment = DefaultHorizontalAlignment; - - return alignment; - } - - /// - /// Converts the specified text into a instance. - /// The text is used as the content for the cell. - /// - public static implicit operator HeaderCell(string text) - { - MultilineText multilineText = new MultilineText(text); - return new HeaderCell(multilineText); - } - - /// - /// Converts the specified instance into a text. - /// The text representation of the content is returned. - /// - public static implicit operator string(HeaderCell cell) - { - return cell.Content?.ToString() ?? string.Empty; - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Represents the cell that contains a column header. + /// + public class HeaderCell : CellBase + { + /// + /// Gets the default horizontal alignment for a column header cell. + /// + public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; + + /// + /// Gets or sets the column that contains the current cell. + /// + public Column ParentColumn { get; internal set; } + + /// + /// Gets or sets the padding applyed to the left side of the cell. + /// + public int? PaddingLeft { get; set; } + + /// + /// Gets or sets the padding applyed to the right side of the cell. + /// + public int? PaddingRight { get; set; } + + /// + /// Initializes a new instance of the class with + /// empty content. + /// + public HeaderCell() + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it. + /// + /// The text displayed in the cell. + public HeaderCell(string text) + : base(text) + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it and its horizontal alignment. + /// + /// The text displayed in the cell. + /// The horizontal alignment of the content of the new cell. + public HeaderCell(string text, HorizontalAlignment horizontalAlignment) + : base(text, horizontalAlignment) + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it. + /// + /// + public HeaderCell(MultilineText text) + : base(text) + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it and its horizontal alignment. + /// + /// + /// The horizontal alignment of the content of the new cell. + public HeaderCell(MultilineText text, HorizontalAlignment horizontalAlignment) + : base(text, horizontalAlignment) + { + } + + /// + /// Initializes a new instance of the class with + /// an object representing the content. + /// + public HeaderCell(object content) + : base(content) + { + } + + /// + /// Initializes a new instance of the class with + /// an object representing the content and its horizontal alignment. + /// + protected HeaderCell(object content, HorizontalAlignment horizontalAlignment) + : base(content, horizontalAlignment) + { + } + + /// + /// Calculates and returns the left padding for the content displayed in the cell. + /// The value is calculated taking into account also the parent column and parent table. + /// + protected override int CalculatePaddingLeft() + { + if (PaddingLeft.HasValue) + return PaddingLeft.Value; + + if (ParentColumn != null) + { + if (ParentColumn.PaddingLeft.HasValue) + return ParentColumn.PaddingLeft.Value; + + if (ParentColumn.ParentDataGrid?.PaddingLeft != null) + return ParentColumn.ParentDataGrid.PaddingLeft.Value; + } + + return 0; + } + + /// + /// Calculates and returns the right padding for the content displayed in the cell. + /// The value is calculated taking into account also the parent column and parent table. + /// + protected override int CalculatePaddingRight() + { + if (PaddingRight.HasValue) + return PaddingRight.Value; + + if (ParentColumn != null) + { + if (ParentColumn.PaddingRight.HasValue) + return ParentColumn.PaddingRight.Value; + + if (ParentColumn.ParentDataGrid?.PaddingRight != null) + return ParentColumn.ParentDataGrid.PaddingRight.Value; + } + + return 0; + } + + /// + /// Calculates and returns the horizontal alignment of the content displayed in the cell. + /// The value is calculated taking into account also the parent row and parent table. + /// + protected override HorizontalAlignment CalculateHorizontalAlignment() + { + HorizontalAlignment alignment = HorizontalAlignment; + + if (alignment == HorizontalAlignment.Default) + alignment = ParentColumn?.HorizontalAlignment ?? HorizontalAlignment.Default; + + if (alignment == HorizontalAlignment.Default) + alignment = ParentColumn?.ParentDataGrid?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + + if (alignment == HorizontalAlignment.Default) + alignment = DefaultHorizontalAlignment; + + return alignment; + } + + /// + /// Converts the specified text into a instance. + /// The text is used as the content for the cell. + /// + public static implicit operator HeaderCell(string text) + { + MultilineText multilineText = new MultilineText(text); + return new HeaderCell(multilineText); + } + + /// + /// Converts the specified instance into a text. + /// The text representation of the content is returned. + /// + public static implicit operator string(HeaderCell cell) + { + return cell.Content?.ToString() ?? string.Empty; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/HorizontalSeparatorBuilder.cs b/sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/TabularData/HorizontalSeparatorBuilder.cs rename to sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs index 5066ed52..8691efa7 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/HorizontalSeparatorBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs @@ -1,231 +1,231 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Builds the border that separates two rows. - /// - internal class HorizontalSeparatorBuilder - { - private StringBuilder sb; - - private int topIndex; - private int bottomIndex; - - private int topWidth; - private int bottomWidth; - - private bool topWidthEnded; - private bool bottomWidthEnded; - - /// - /// Gets the character used to render an internal horizontal border. - /// - public char Horizontal { get; set; } - - /// - /// Gets the character used to render the intersection between the top outer border and an internal vertical border. - /// - public char TopIntersection { get; set; } - - /// - /// Gets the character used to render the intersection between the right outer border and an internal horizontal border. - /// - public char RightIntersection { get; set; } - - /// - /// Gets the character used to render the intersection between the bottom outer border and an internal vertical border. - /// - public char BottomIntersection { get; set; } - - /// - /// Gets the character used to render the intersection between the left outer border and an internal horizontal border. - /// - public char LeftIntersection { get; set; } - - /// - /// Gets the character used to render the intersection between two internal borders: a vertical and a horizontal one. - /// - public char MiddleIntersection { get; set; } - - /// - /// Gets the character used to render the top right corner. - /// - public char TopRight { get; set; } - - /// - /// Gets the character used to render the bottom right corner. - /// - public char BottomRight { get; set; } - - public IList TopCellWidths { get; set; } - public IList BottomCellWidths { get; set; } - - public string Build() - { - if (TopCellWidths == null) - throw new ApplicationException("TopCellWidths must be provided."); - - if (BottomCellWidths == null) - throw new ApplicationException("BottomCellWidths must be provided."); - - if (TopCellWidths.Count == 0 && BottomCellWidths.Count == 0) - return string.Empty; - - Start(); - - while (true) - { - if (topWidthEnded) - AddBottomCell(); - else if (bottomWidthEnded) - AddTopCell(); - else if (topWidth < bottomWidth) - AddTopCell(); - else if (bottomWidth < topWidth) - AddBottomCell(); - else - AddBothCells(); - - if (topWidth == 0 && bottomWidth == 0) - break; - } - - return sb.ToString(); - } - - private void Start() - { - sb = new StringBuilder(); - - topIndex = -1; - bottomIndex = -1; - - topWidthEnded = false; - bottomWidthEnded = false; - - sb.Append(LeftIntersection); - - NextTopWidth(); - NextBottomWidth(); - } - - private void AddTopCell() - { - sb.Append(new string(Horizontal, topWidth)); - - if (bottomWidthEnded) - { - sb.Append(BottomRight); - } - else - { - sb.Append(BottomIntersection); - DecreaseBottom(topWidth + 1); - } - - NextTopWidth(); - } - - private void DecreaseBottom(int value) - { - bottomWidth = Math.Max(bottomWidth - value, 0); - } - - private void AddBottomCell() - { - sb.Append(new string(Horizontal, bottomWidth)); - - if (topWidthEnded) - { - sb.Append(TopRight); - } - else - { - sb.Append(TopIntersection); - DecreaseTop(bottomWidth + 1); - } - - NextBottomWidth(); - } - - private void DecreaseTop(int value) - { - topWidth = Math.Max(topWidth - value, 0); - } - - private void AddBothCells() - { - sb.Append(new string(Horizontal, topWidth)); - - if (IsLastTop() && IsLastBottom()) - sb.Append(RightIntersection); - else - sb.Append(MiddleIntersection); - - NextTopWidth(); - NextBottomWidth(); - } - - private bool IsLastTop() - { - return topIndex + 1 == TopCellWidths.Count; - } - - private bool IsLastBottom() - { - return bottomIndex + 1 == BottomCellWidths.Count; - } - - private void NextTopWidth() - { - if (topIndex + 1 < TopCellWidths.Count) - { - topIndex++; - topWidth = TopCellWidths[topIndex]; - } - else - { - topWidth = 0; - topWidthEnded = true; - } - } - - private void NextBottomWidth() - { - if (bottomIndex + 1 < BottomCellWidths.Count) - { - bottomIndex++; - bottomWidth = BottomCellWidths[bottomIndex]; - } - else - { - bottomWidth = 0; - bottomWidthEnded = true; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Builds the border that separates two rows. + /// + internal class HorizontalSeparatorBuilder + { + private StringBuilder sb; + + private int topIndex; + private int bottomIndex; + + private int topWidth; + private int bottomWidth; + + private bool topWidthEnded; + private bool bottomWidthEnded; + + /// + /// Gets the character used to render an internal horizontal border. + /// + public char Horizontal { get; set; } + + /// + /// Gets the character used to render the intersection between the top outer border and an internal vertical border. + /// + public char TopIntersection { get; set; } + + /// + /// Gets the character used to render the intersection between the right outer border and an internal horizontal border. + /// + public char RightIntersection { get; set; } + + /// + /// Gets the character used to render the intersection between the bottom outer border and an internal vertical border. + /// + public char BottomIntersection { get; set; } + + /// + /// Gets the character used to render the intersection between the left outer border and an internal horizontal border. + /// + public char LeftIntersection { get; set; } + + /// + /// Gets the character used to render the intersection between two internal borders: a vertical and a horizontal one. + /// + public char MiddleIntersection { get; set; } + + /// + /// Gets the character used to render the top right corner. + /// + public char TopRight { get; set; } + + /// + /// Gets the character used to render the bottom right corner. + /// + public char BottomRight { get; set; } + + public IList TopCellWidths { get; set; } + public IList BottomCellWidths { get; set; } + + public string Build() + { + if (TopCellWidths == null) + throw new ApplicationException("TopCellWidths must be provided."); + + if (BottomCellWidths == null) + throw new ApplicationException("BottomCellWidths must be provided."); + + if (TopCellWidths.Count == 0 && BottomCellWidths.Count == 0) + return string.Empty; + + Start(); + + while (true) + { + if (topWidthEnded) + AddBottomCell(); + else if (bottomWidthEnded) + AddTopCell(); + else if (topWidth < bottomWidth) + AddTopCell(); + else if (bottomWidth < topWidth) + AddBottomCell(); + else + AddBothCells(); + + if (topWidth == 0 && bottomWidth == 0) + break; + } + + return sb.ToString(); + } + + private void Start() + { + sb = new StringBuilder(); + + topIndex = -1; + bottomIndex = -1; + + topWidthEnded = false; + bottomWidthEnded = false; + + sb.Append(LeftIntersection); + + NextTopWidth(); + NextBottomWidth(); + } + + private void AddTopCell() + { + sb.Append(new string(Horizontal, topWidth)); + + if (bottomWidthEnded) + { + sb.Append(BottomRight); + } + else + { + sb.Append(BottomIntersection); + DecreaseBottom(topWidth + 1); + } + + NextTopWidth(); + } + + private void DecreaseBottom(int value) + { + bottomWidth = Math.Max(bottomWidth - value, 0); + } + + private void AddBottomCell() + { + sb.Append(new string(Horizontal, bottomWidth)); + + if (topWidthEnded) + { + sb.Append(TopRight); + } + else + { + sb.Append(TopIntersection); + DecreaseTop(bottomWidth + 1); + } + + NextBottomWidth(); + } + + private void DecreaseTop(int value) + { + topWidth = Math.Max(topWidth - value, 0); + } + + private void AddBothCells() + { + sb.Append(new string(Horizontal, topWidth)); + + if (IsLastTop() && IsLastBottom()) + sb.Append(RightIntersection); + else + sb.Append(MiddleIntersection); + + NextTopWidth(); + NextBottomWidth(); + } + + private bool IsLastTop() + { + return topIndex + 1 == TopCellWidths.Count; + } + + private bool IsLastBottom() + { + return bottomIndex + 1 == BottomCellWidths.Count; + } + + private void NextTopWidth() + { + if (topIndex + 1 < TopCellWidths.Count) + { + topIndex++; + topWidth = TopCellWidths[topIndex]; + } + else + { + topWidth = 0; + topWidthEnded = true; + } + } + + private void NextBottomWidth() + { + if (bottomIndex + 1 < BottomCellWidths.Count) + { + bottomIndex++; + bottomWidth = BottomCellWidths[bottomIndex]; + } + else + { + bottomWidth = 0; + bottomWidthEnded = true; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/ITablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/ITablePrinter.cs rename to sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs index 2c063b20..e0326cc0 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/ITablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs @@ -1,72 +1,72 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// The implementors of this interface represent the target where a is rendered. - /// They provide methods to sequentially render the parts of the instance. - /// - public interface ITablePrinter - { - /// - /// Writes the specified text, applying the formatting specific for a border. - /// - void WriteBorder(string text); - - /// - /// Writes the specified text, applying the formatting specific for a border, - /// followed by the current line terminator. - /// - void WriteLineBorder(string text); - - /// - /// Writes the specified character, applying the formatting specific for a border. - /// - void WriteBorder(char c); - - /// - /// Writes the specified character, applying the formatting specific for a border, - /// followed by the current line terminator. - /// - void WriteLineBorder(char c); - - /// - /// Writes the specified text, applying the formatting specific for the title. - /// - void WriteTitle(string text); - - /// - /// Writes the specified text, applying the formatting specific for the column headers. - /// - void WriteHeader(string text); - - /// - /// Writes the specified text, applying the default formatting. - /// - void WriteNormal(string text); - - /// - /// Writes the current line terminator. - /// - void WriteLine(); - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// The implementors of this interface represent the target where a is rendered. + /// They provide methods to sequentially render the parts of the instance. + /// + public interface ITablePrinter + { + /// + /// Writes the specified text, applying the formatting specific for a border. + /// + void WriteBorder(string text); + + /// + /// Writes the specified text, applying the formatting specific for a border, + /// followed by the current line terminator. + /// + void WriteLineBorder(string text); + + /// + /// Writes the specified character, applying the formatting specific for a border. + /// + void WriteBorder(char c); + + /// + /// Writes the specified character, applying the formatting specific for a border, + /// followed by the current line terminator. + /// + void WriteLineBorder(char c); + + /// + /// Writes the specified text, applying the formatting specific for the title. + /// + void WriteTitle(string text); + + /// + /// Writes the specified text, applying the formatting specific for the column headers. + /// + void WriteHeader(string text); + + /// + /// Writes the specified text, applying the default formatting. + /// + void WriteNormal(string text); + + /// + /// Writes the current line terminator. + /// + void WriteLine(); + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/Printers/ConsoleTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/Printers/ConsoleTablePrinter.cs rename to sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs index 37318521..315cf6a9 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/Printers/ConsoleTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs @@ -1,133 +1,133 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools.TabularData.Printers -{ - /// - /// Writes the parts of a instance to the , - /// using different colors for each type of part. - /// - public class ConsoleTablePrinter : ITablePrinter - { - /// - /// Gets or sets the foreground color for the borders. - /// Default value: Gray - /// - public ConsoleColor BorderColor { get; set; } - - /// - /// Gets or sets the foreground color for the title. - /// Default value: White - /// - public ConsoleColor TitleColor { get; set; } - - /// - /// Gets or sets the foreground color for the column headers. - /// Default value: White - /// - public ConsoleColor HeaderColor { get; set; } - - /// - /// Gets or sets the default foreground color. - /// Default value: Gray - /// - public ConsoleColor NormalColor { get; set; } - - /// - /// Initializes a new instance of the class. - /// - public ConsoleTablePrinter() - { - BorderColor = ConsoleColor.Gray; - TitleColor = ConsoleColor.White; - HeaderColor = ConsoleColor.White; - NormalColor = ConsoleColor.Gray; - } - - /// - /// Writes the specified text to the using the . - /// - public void WriteBorder(string text) - { - CustomConsole.Write(BorderColor, text); - } - - /// - /// Writes the specified character to the using the . - /// - public void WriteBorder(char c) - { - CustomConsole.Write(BorderColor, c); - } - - /// - /// Writes the specified text to the using the , - /// followed by a line terminator. - /// - public void WriteLineBorder(string text) - { - CustomConsole.WriteLine(BorderColor, text); - } - - /// - /// Writes the specified character to the using the , - /// followed by a line terminator. - /// - public void WriteLineBorder(char c) - { - CustomConsole.WriteLine(BorderColor, c); - } - - /// - /// Writes the specified text to the using the . - /// - public void WriteTitle(string text) - { - CustomConsole.Write(TitleColor, text); - } - - /// - /// Writes the specified text to the using the . - /// - public void WriteHeader(string text) - { - CustomConsole.Write(HeaderColor, text); - } - - /// - /// Writes the specified text to the using the . - /// - public void WriteNormal(string text) - { - CustomConsole.Write(NormalColor, text); - } - - /// - /// Writes the line terminator to the . - /// - public void WriteLine() - { - Console.WriteLine(); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools.TabularData.Printers +{ + /// + /// Writes the parts of a instance to the , + /// using different colors for each type of part. + /// + public class ConsoleTablePrinter : ITablePrinter + { + /// + /// Gets or sets the foreground color for the borders. + /// Default value: Gray + /// + public ConsoleColor BorderColor { get; set; } + + /// + /// Gets or sets the foreground color for the title. + /// Default value: White + /// + public ConsoleColor TitleColor { get; set; } + + /// + /// Gets or sets the foreground color for the column headers. + /// Default value: White + /// + public ConsoleColor HeaderColor { get; set; } + + /// + /// Gets or sets the default foreground color. + /// Default value: Gray + /// + public ConsoleColor NormalColor { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public ConsoleTablePrinter() + { + BorderColor = ConsoleColor.Gray; + TitleColor = ConsoleColor.White; + HeaderColor = ConsoleColor.White; + NormalColor = ConsoleColor.Gray; + } + + /// + /// Writes the specified text to the using the . + /// + public void WriteBorder(string text) + { + CustomConsole.Write(BorderColor, text); + } + + /// + /// Writes the specified character to the using the . + /// + public void WriteBorder(char c) + { + CustomConsole.Write(BorderColor, c); + } + + /// + /// Writes the specified text to the using the , + /// followed by a line terminator. + /// + public void WriteLineBorder(string text) + { + CustomConsole.WriteLine(BorderColor, text); + } + + /// + /// Writes the specified character to the using the , + /// followed by a line terminator. + /// + public void WriteLineBorder(char c) + { + CustomConsole.WriteLine(BorderColor, c); + } + + /// + /// Writes the specified text to the using the . + /// + public void WriteTitle(string text) + { + CustomConsole.Write(TitleColor, text); + } + + /// + /// Writes the specified text to the using the . + /// + public void WriteHeader(string text) + { + CustomConsole.Write(HeaderColor, text); + } + + /// + /// Writes the specified text to the using the . + /// + public void WriteNormal(string text) + { + CustomConsole.Write(NormalColor, text); + } + + /// + /// Writes the line terminator to the . + /// + public void WriteLine() + { + Console.WriteLine(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/Printers/StreamTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/Printers/StreamTablePrinter.cs rename to sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs index a87634b0..783f511b 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/Printers/StreamTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs @@ -1,127 +1,127 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.IO; - -namespace DustInTheWind.ConsoleTools.TabularData.Printers -{ - /// - /// Stores the rendered parts of a instance in a . - /// - public class StreamTablePrinter : ITablePrinter, IDisposable - { - private bool isDisposed; - - private readonly Stream stream; - private readonly StreamWriter streamWriter; - - /// - /// Initializes a new instance of the class with - /// the into which the table will be written. - /// - public StreamTablePrinter(Stream stream) - { - if (stream == null) throw new ArgumentNullException(nameof(stream)); - this.stream = stream; - - streamWriter = new StreamWriter(stream); - } - - /// - /// Writes the specified text in the underlying . - /// - public void WriteBorder(string text) - { - streamWriter.Write(text); - } - - /// - /// Writes the specified character in the underlying . - /// - public void WriteBorder(char c) - { - streamWriter.Write(c); - } - - /// - /// Writes the specified text in the underlying , followed by a line terminator. - /// - public void WriteLineBorder(string text) - { - streamWriter.WriteLine(text); - } - - /// - /// Writes the specified text in the underlying , followed by a line terminator. - /// - public void WriteLineBorder(char c) - { - streamWriter.WriteLine(c.ToString()); - } - - /// - /// Writes the specified text in the underlying . - /// - public void WriteTitle(string text) - { - streamWriter.Write(text); - } - - /// - /// Writes the specified text in the underlying . - /// - public void WriteHeader(string text) - { - streamWriter.Write(text); - } - - /// - /// Writes the specified text in the underlying . - /// - public void WriteNormal(string text) - { - streamWriter.Write(text); - } - - /// - /// Writes the line teminator in the underlying . - /// - public void WriteLine() - { - streamWriter.WriteLine(); - } - - /// - /// Disposes the underlying . - /// - public void Dispose() - { - if (isDisposed) - return; - - stream?.Dispose(); - streamWriter?.Dispose(); - - isDisposed = true; - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.IO; + +namespace DustInTheWind.ConsoleTools.TabularData.Printers +{ + /// + /// Stores the rendered parts of a instance in a . + /// + public class StreamTablePrinter : ITablePrinter, IDisposable + { + private bool isDisposed; + + private readonly Stream stream; + private readonly StreamWriter streamWriter; + + /// + /// Initializes a new instance of the class with + /// the into which the table will be written. + /// + public StreamTablePrinter(Stream stream) + { + if (stream == null) throw new ArgumentNullException(nameof(stream)); + this.stream = stream; + + streamWriter = new StreamWriter(stream); + } + + /// + /// Writes the specified text in the underlying . + /// + public void WriteBorder(string text) + { + streamWriter.Write(text); + } + + /// + /// Writes the specified character in the underlying . + /// + public void WriteBorder(char c) + { + streamWriter.Write(c); + } + + /// + /// Writes the specified text in the underlying , followed by a line terminator. + /// + public void WriteLineBorder(string text) + { + streamWriter.WriteLine(text); + } + + /// + /// Writes the specified text in the underlying , followed by a line terminator. + /// + public void WriteLineBorder(char c) + { + streamWriter.WriteLine(c.ToString()); + } + + /// + /// Writes the specified text in the underlying . + /// + public void WriteTitle(string text) + { + streamWriter.Write(text); + } + + /// + /// Writes the specified text in the underlying . + /// + public void WriteHeader(string text) + { + streamWriter.Write(text); + } + + /// + /// Writes the specified text in the underlying . + /// + public void WriteNormal(string text) + { + streamWriter.Write(text); + } + + /// + /// Writes the line teminator in the underlying . + /// + public void WriteLine() + { + streamWriter.WriteLine(); + } + + /// + /// Disposes the underlying . + /// + public void Dispose() + { + if (isDisposed) + return; + + stream?.Dispose(); + streamWriter?.Dispose(); + + isDisposed = true; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/Printers/StringTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/Printers/StringTablePrinter.cs rename to sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs index e4d706bf..b009c99a 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/Printers/StringTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs @@ -1,125 +1,125 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData.Printers -{ - /// - /// Collects the rendered parts of a instance as a plain text that is later - /// returnd by the method. - /// - public class StringTablePrinter : ITablePrinter - { - private readonly StringBuilder sb; - - /// - /// Initializes a new instance of the class. - /// - public StringTablePrinter() - { - sb = new StringBuilder(); - } - - /// - /// Initializes a new instance of the class with - /// the into which tp store the texts. - /// - public StringTablePrinter(StringBuilder sb) - { - if (sb == null) throw new ArgumentNullException(nameof(sb)); - this.sb = sb; - } - - /// - /// Stores the specified text in the internal . - /// - public void WriteBorder(string text) - { - sb.Append(text); - } - - /// - /// Stores the specified character in the internal . - /// - public void WriteBorder(char c) - { - sb.Append(c); - } - - /// - /// Stores the specified text in the internal , followed by a line terminator. - /// - public void WriteLineBorder(string text) - { - sb.AppendLine(text); - } - - /// - /// Stores the specified character in the internal , followed by a line terminator. - /// - public void WriteLineBorder(char c) - { - sb.AppendLine(c.ToString()); - } - - /// - /// Stores the specified text in the internal . - /// - public void WriteTitle(string text) - { - sb.Append(text); - } - - /// - /// Stores the specified text in the internal . - /// - public void WriteHeader(string text) - { - sb.Append(text); - } - - /// - /// Stores the specified text in the internal . - /// - public void WriteNormal(string text) - { - sb.Append(text); - } - - /// - /// Stores the line terminator in the internal . - /// - public void WriteLine() - { - sb.AppendLine(); - } - - /// - /// Returns the built until now. - /// - public override string ToString() - { - return sb.ToString(); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData.Printers +{ + /// + /// Collects the rendered parts of a instance as a plain text that is later + /// returnd by the method. + /// + public class StringTablePrinter : ITablePrinter + { + private readonly StringBuilder sb; + + /// + /// Initializes a new instance of the class. + /// + public StringTablePrinter() + { + sb = new StringBuilder(); + } + + /// + /// Initializes a new instance of the class with + /// the into which tp store the texts. + /// + public StringTablePrinter(StringBuilder sb) + { + if (sb == null) throw new ArgumentNullException(nameof(sb)); + this.sb = sb; + } + + /// + /// Stores the specified text in the internal . + /// + public void WriteBorder(string text) + { + sb.Append(text); + } + + /// + /// Stores the specified character in the internal . + /// + public void WriteBorder(char c) + { + sb.Append(c); + } + + /// + /// Stores the specified text in the internal , followed by a line terminator. + /// + public void WriteLineBorder(string text) + { + sb.AppendLine(text); + } + + /// + /// Stores the specified character in the internal , followed by a line terminator. + /// + public void WriteLineBorder(char c) + { + sb.AppendLine(c.ToString()); + } + + /// + /// Stores the specified text in the internal . + /// + public void WriteTitle(string text) + { + sb.Append(text); + } + + /// + /// Stores the specified text in the internal . + /// + public void WriteHeader(string text) + { + sb.Append(text); + } + + /// + /// Stores the specified text in the internal . + /// + public void WriteNormal(string text) + { + sb.Append(text); + } + + /// + /// Stores the line terminator in the internal . + /// + public void WriteLine() + { + sb.AppendLine(); + } + + /// + /// Returns the built until now. + /// + public override string ToString() + { + return sb.ToString(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/BottomBorderData.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/BottomBorderData.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs index cb372c6c..ba6cb181 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/BottomBorderData.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs @@ -1,60 +1,60 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class BottomBorderData - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get { return columnsWidths; } - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } - - public BottomBorderData(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = borderTemplate.GenerateBottomBorder(columnsWidths); - - tablePrinter.WriteLineBorder(borderText); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class BottomBorderData + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private List columnsWidths; + + public List ColumnsWidths + { + get { return columnsWidths; } + set + { + if (value == columnsWidths) + return; + + columnsWidths = value; + borderText = null; + } + } + + public BottomBorderData(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = borderTemplate.GenerateBottomBorder(columnsWidths); + + tablePrinter.WriteLineBorder(borderText); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataCellX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataCellX.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs index 34cfa459..a40798c7 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataCellX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs @@ -1,28 +1,28 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class DataCellX - { - public Size Size { get; set; } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class DataCellX + { + public Size Size { get; set; } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataDataSeparator.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs index d4d89088..99ef490a 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs @@ -1,82 +1,82 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class DataDataSeparator - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get { return columnsWidths; } - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } - - public DataDataSeparator(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = GenerateDataRowSeparatorBorder(); - - tablePrinter.WriteLineBorder(borderText); - } - - private string GenerateDataRowSeparatorBorder() - { - StringBuilder sb = new StringBuilder(); - - sb.Append(borderTemplate.LeftIntersection); - - for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) - { - int columnWidth = columnsWidths[columnIndex]; - sb.Append(new string(borderTemplate.Horizontal, columnWidth)); - - char columnBorderRight = columnIndex < columnsWidths.Count - 1 - ? borderTemplate.MiddleIntersection - : borderTemplate.RightIntersection; - - sb.Append(columnBorderRight); - } - - return sb.ToString(); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class DataDataSeparator + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private List columnsWidths; + + public List ColumnsWidths + { + get { return columnsWidths; } + set + { + if (value == columnsWidths) + return; + + columnsWidths = value; + borderText = null; + } + } + + public DataDataSeparator(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = GenerateDataRowSeparatorBorder(); + + tablePrinter.WriteLineBorder(borderText); + } + + private string GenerateDataRowSeparatorBorder() + { + StringBuilder sb = new StringBuilder(); + + sb.Append(borderTemplate.LeftIntersection); + + for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) + { + int columnWidth = columnsWidths[columnIndex]; + sb.Append(new string(borderTemplate.Horizontal, columnWidth)); + + char columnBorderRight = columnIndex < columnsWidths.Count - 1 + ? borderTemplate.MiddleIntersection + : borderTemplate.RightIntersection; + + sb.Append(columnBorderRight); + } + + return sb.ToString(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataGridX.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs index 4cb3b473..59a37e03 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs @@ -1,183 +1,183 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System.Collections.Generic; -using System.Linq; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class DataGridX - { - private readonly bool displayBorder; - - private TitleRowX titleRowX; - private HeaderRowX headerRowX; - private readonly List dataRowXs = new List(); - private readonly List columnsWidths = new List(); - - public int MinWidth { get; set; } - - public TitleTopBorder TitleTopBorder { get; set; } - public HeaderTopBorder HeaderTopBorder { get; set; } - public DataTopBorder DataTopBorder { get; set; } - - public TitleHeaderSeparator TitleHeaderSeparator { get; set; } - public TitleDataSeparator TitleDataSeparator { get; set; } - public TitleBottomBorder TitleBottomBorder { get; set; } - - public HeaderDataSeparator HeaderDataSeparator { get; set; } - public HeaderBottomBorder HeaderBottomBorder { get; set; } - - public DataDataSeparator DataDataSeparator { get; set; } - public BottomBorderData DataBottomBorder { get; set; } - - public DataGridX(bool displayBorder) - { - this.displayBorder = displayBorder; - } - - public void AddTitleRow(TitleRowX titleRowX) - { - this.titleRowX = titleRowX; - } - - public void AddHeaderRow(HeaderRowX headerRowX) - { - this.headerRowX = headerRowX; - headerRowX.UpdateColumnsWidths(columnsWidths); - } - - public void AddDataRow(DataRowX dataRowX) - { - dataRowX.UpdateColumnsWidths(columnsWidths); - dataRowXs.Add(dataRowX); - } - - public void Clear() - { - titleRowX = null; - headerRowX = null; - dataRowXs.Clear(); - columnsWidths.Clear(); - - MinWidth = 0; - - TitleTopBorder = null; - HeaderTopBorder = null; - DataTopBorder = null; - - TitleHeaderSeparator = null; - TitleDataSeparator = null; - TitleBottomBorder = null; - - HeaderDataSeparator = null; - HeaderBottomBorder = null; - - DataDataSeparator = null; - DataBottomBorder = null; - } - - public void MakeFinalAdjustments() - { - int totalWidth = MinWidth; - - if (titleRowX?.Size.Width > totalWidth) - totalWidth = titleRowX.Size.Width; - - if (columnsWidths.Count > 0) - { - int columnsTotalWidth = columnsWidths.Sum(); - - if (displayBorder) - columnsTotalWidth += columnsWidths.Count + 1; - - if (columnsTotalWidth < totalWidth) - { - int diff = totalWidth - columnsTotalWidth; - int colCount = columnsWidths.Count; - - for (int i = 0; i < diff; i++) - columnsWidths[i % colCount]++; - } - else if (columnsTotalWidth > totalWidth) - { - totalWidth = columnsTotalWidth; - } - } - - if (titleRowX?.Size.Width < totalWidth) - titleRowX.Size = new Size(totalWidth, titleRowX.Size.Height); - - if (TitleTopBorder != null) TitleTopBorder.Width = totalWidth; - - if (HeaderTopBorder != null) HeaderTopBorder.ColumnsWidths = columnsWidths; - if (DataTopBorder != null) DataTopBorder.ColumnsWidths = columnsWidths; - - if (TitleHeaderSeparator != null) TitleHeaderSeparator.ColumnsWidths = columnsWidths; - if (TitleDataSeparator != null) TitleDataSeparator.ColumnsWidths = columnsWidths; - if (TitleBottomBorder != null) TitleBottomBorder.Width = totalWidth; - - if (HeaderDataSeparator != null) HeaderDataSeparator.ColumnsWidths = columnsWidths; - if (HeaderBottomBorder != null) HeaderBottomBorder.ColumnsWidths = columnsWidths; - - if (DataDataSeparator != null) DataDataSeparator.ColumnsWidths = columnsWidths; - if (DataBottomBorder != null) DataBottomBorder.ColumnsWidths = columnsWidths; - } - - public void Render(ITablePrinter tablePrinter) - { - TitleTopBorder?.Render(tablePrinter); - HeaderTopBorder?.Render(tablePrinter); - DataTopBorder?.Render(tablePrinter); - - titleRowX?.Render(tablePrinter); - - TitleHeaderSeparator?.Render(tablePrinter); - TitleDataSeparator?.Render(tablePrinter); - TitleBottomBorder?.Render(tablePrinter); - - headerRowX?.Render(tablePrinter, columnsWidths); - - HeaderDataSeparator?.Render(tablePrinter); - HeaderBottomBorder?.Render(tablePrinter); - - RenderDataRows(tablePrinter); - - DataBottomBorder?.Render(tablePrinter); - } - - public void RenderDataRows(ITablePrinter tablePrinter) - { - List cellWidths = columnsWidths; - - for (int rowIndex = 0; rowIndex < dataRowXs.Count; rowIndex++) - { - DataRowX row = dataRowXs[rowIndex]; - row.Render(tablePrinter, cellWidths); - - bool isLastRow = rowIndex == dataRowXs.Count - 1; - - if (!isLastRow) - DataDataSeparator?.Render(tablePrinter); - } - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Collections.Generic; +using System.Linq; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class DataGridX + { + private readonly bool displayBorder; + + private TitleRowX titleRowX; + private HeaderRowX headerRowX; + private readonly List dataRowXs = new List(); + private readonly List columnsWidths = new List(); + + public int MinWidth { get; set; } + + public TitleTopBorder TitleTopBorder { get; set; } + public HeaderTopBorder HeaderTopBorder { get; set; } + public DataTopBorder DataTopBorder { get; set; } + + public TitleHeaderSeparator TitleHeaderSeparator { get; set; } + public TitleDataSeparator TitleDataSeparator { get; set; } + public TitleBottomBorder TitleBottomBorder { get; set; } + + public HeaderDataSeparator HeaderDataSeparator { get; set; } + public HeaderBottomBorder HeaderBottomBorder { get; set; } + + public DataDataSeparator DataDataSeparator { get; set; } + public BottomBorderData DataBottomBorder { get; set; } + + public DataGridX(bool displayBorder) + { + this.displayBorder = displayBorder; + } + + public void AddTitleRow(TitleRowX titleRowX) + { + this.titleRowX = titleRowX; + } + + public void AddHeaderRow(HeaderRowX headerRowX) + { + this.headerRowX = headerRowX; + headerRowX.UpdateColumnsWidths(columnsWidths); + } + + public void AddDataRow(DataRowX dataRowX) + { + dataRowX.UpdateColumnsWidths(columnsWidths); + dataRowXs.Add(dataRowX); + } + + public void Clear() + { + titleRowX = null; + headerRowX = null; + dataRowXs.Clear(); + columnsWidths.Clear(); + + MinWidth = 0; + + TitleTopBorder = null; + HeaderTopBorder = null; + DataTopBorder = null; + + TitleHeaderSeparator = null; + TitleDataSeparator = null; + TitleBottomBorder = null; + + HeaderDataSeparator = null; + HeaderBottomBorder = null; + + DataDataSeparator = null; + DataBottomBorder = null; + } + + public void MakeFinalAdjustments() + { + int totalWidth = MinWidth; + + if (titleRowX?.Size.Width > totalWidth) + totalWidth = titleRowX.Size.Width; + + if (columnsWidths.Count > 0) + { + int columnsTotalWidth = columnsWidths.Sum(); + + if (displayBorder) + columnsTotalWidth += columnsWidths.Count + 1; + + if (columnsTotalWidth < totalWidth) + { + int diff = totalWidth - columnsTotalWidth; + int colCount = columnsWidths.Count; + + for (int i = 0; i < diff; i++) + columnsWidths[i % colCount]++; + } + else if (columnsTotalWidth > totalWidth) + { + totalWidth = columnsTotalWidth; + } + } + + if (titleRowX?.Size.Width < totalWidth) + titleRowX.Size = new Size(totalWidth, titleRowX.Size.Height); + + if (TitleTopBorder != null) TitleTopBorder.Width = totalWidth; + + if (HeaderTopBorder != null) HeaderTopBorder.ColumnsWidths = columnsWidths; + if (DataTopBorder != null) DataTopBorder.ColumnsWidths = columnsWidths; + + if (TitleHeaderSeparator != null) TitleHeaderSeparator.ColumnsWidths = columnsWidths; + if (TitleDataSeparator != null) TitleDataSeparator.ColumnsWidths = columnsWidths; + if (TitleBottomBorder != null) TitleBottomBorder.Width = totalWidth; + + if (HeaderDataSeparator != null) HeaderDataSeparator.ColumnsWidths = columnsWidths; + if (HeaderBottomBorder != null) HeaderBottomBorder.ColumnsWidths = columnsWidths; + + if (DataDataSeparator != null) DataDataSeparator.ColumnsWidths = columnsWidths; + if (DataBottomBorder != null) DataBottomBorder.ColumnsWidths = columnsWidths; + } + + public void Render(ITablePrinter tablePrinter) + { + TitleTopBorder?.Render(tablePrinter); + HeaderTopBorder?.Render(tablePrinter); + DataTopBorder?.Render(tablePrinter); + + titleRowX?.Render(tablePrinter); + + TitleHeaderSeparator?.Render(tablePrinter); + TitleDataSeparator?.Render(tablePrinter); + TitleBottomBorder?.Render(tablePrinter); + + headerRowX?.Render(tablePrinter, columnsWidths); + + HeaderDataSeparator?.Render(tablePrinter); + HeaderBottomBorder?.Render(tablePrinter); + + RenderDataRows(tablePrinter); + + DataBottomBorder?.Render(tablePrinter); + } + + public void RenderDataRows(ITablePrinter tablePrinter) + { + List cellWidths = columnsWidths; + + for (int rowIndex = 0; rowIndex < dataRowXs.Count; rowIndex++) + { + DataRowX row = dataRowXs[rowIndex]; + row.Render(tablePrinter, cellWidths); + + bool isLastRow = rowIndex == dataRowXs.Count - 1; + + if (!isLastRow) + DataDataSeparator?.Render(tablePrinter); + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataGridXBuilder.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs index 19ec8d92..44da1221 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs @@ -1,133 +1,133 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System.Collections.Generic; -using System.Linq; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class DataGridXBuilder - { - private DataGridX dataGridX; - private bool isTitleVisible; - private bool isColumnHeaderRowVisible; - private bool areDataRowsVisible; - - public TitleRow TitleRow { get; set; } - public bool DisplayTitle { get; set; } - - public ColumnList Columns { get; set; } - public bool DisplayColumnHeaders { get; set; } - - public DataRowList Rows { get; set; } - - public BorderTemplate BorderTemplate { get; set; } - public bool DisplayBorder { get; set; } - public bool DisplayBorderBetweenRows { get; set; } - - public int MinWidth { get; set; } - - public DataGridX Build() - { - dataGridX = new DataGridX(DisplayBorder) - { - MinWidth = MinWidth - }; - - isTitleVisible = DisplayTitle && TitleRow != null && TitleRow.HasContent; - isColumnHeaderRowVisible = DisplayColumnHeaders && Columns != null && Columns.Count > 0 && Columns.Any(x => x?.HeaderCell?.IsEmpty == false); - areDataRowsVisible = Rows.Count > 0; - - if (isTitleVisible) - AddTitle(); - - if (isColumnHeaderRowVisible) - AddHeader(); - - if (areDataRowsVisible) - AddRows(); - - if (DisplayBorder) - AddHorizontalBorders(); - - dataGridX.MakeFinalAdjustments(); - - return dataGridX; - } - - private void AddTitle() - { - TitleRowX titleRowX = new TitleRowX(TitleRow); - dataGridX.AddTitleRow(titleRowX); - } - - private void AddHeader() - { - HeaderRowX headerRowX = new HeaderRowX(Columns, DisplayBorder); - dataGridX.AddHeaderRow(headerRowX); - } - - private void AddRows() - { - IEnumerable rows = Rows - .Select(x => new DataRowX(x, DisplayBorder)); - - foreach (DataRowX row in rows) - dataGridX.AddDataRow(row); - } - - private void AddHorizontalBorders() - { - if (isTitleVisible) - dataGridX.TitleTopBorder = new TitleTopBorder(BorderTemplate); - else if (isColumnHeaderRowVisible) - dataGridX.HeaderTopBorder = new HeaderTopBorder(BorderTemplate); - else if (areDataRowsVisible) - dataGridX.DataTopBorder = new DataTopBorder(BorderTemplate); - - if (isTitleVisible) - { - if (isColumnHeaderRowVisible) - dataGridX.TitleHeaderSeparator = new TitleHeaderSeparator(BorderTemplate); - else if (areDataRowsVisible) - dataGridX.TitleDataSeparator = new TitleDataSeparator(BorderTemplate); - else - dataGridX.TitleBottomBorder = new TitleBottomBorder(BorderTemplate); - } - - if (isColumnHeaderRowVisible) - { - if (areDataRowsVisible) - dataGridX.HeaderDataSeparator = new HeaderDataSeparator(BorderTemplate); - else - dataGridX.HeaderBottomBorder = new HeaderBottomBorder(BorderTemplate); - } - - if (areDataRowsVisible) - { - if (DisplayBorderBetweenRows) - dataGridX.DataDataSeparator = new DataDataSeparator(BorderTemplate); - - dataGridX.DataBottomBorder = new BottomBorderData(BorderTemplate); - } - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Collections.Generic; +using System.Linq; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class DataGridXBuilder + { + private DataGridX dataGridX; + private bool isTitleVisible; + private bool isColumnHeaderRowVisible; + private bool areDataRowsVisible; + + public TitleRow TitleRow { get; set; } + public bool DisplayTitle { get; set; } + + public ColumnList Columns { get; set; } + public bool DisplayColumnHeaders { get; set; } + + public DataRowList Rows { get; set; } + + public BorderTemplate BorderTemplate { get; set; } + public bool DisplayBorder { get; set; } + public bool DisplayBorderBetweenRows { get; set; } + + public int MinWidth { get; set; } + + public DataGridX Build() + { + dataGridX = new DataGridX(DisplayBorder) + { + MinWidth = MinWidth + }; + + isTitleVisible = DisplayTitle && TitleRow != null && TitleRow.HasContent; + isColumnHeaderRowVisible = DisplayColumnHeaders && Columns != null && Columns.Count > 0 && Columns.Any(x => x?.HeaderCell?.IsEmpty == false); + areDataRowsVisible = Rows.Count > 0; + + if (isTitleVisible) + AddTitle(); + + if (isColumnHeaderRowVisible) + AddHeader(); + + if (areDataRowsVisible) + AddRows(); + + if (DisplayBorder) + AddHorizontalBorders(); + + dataGridX.MakeFinalAdjustments(); + + return dataGridX; + } + + private void AddTitle() + { + TitleRowX titleRowX = new TitleRowX(TitleRow); + dataGridX.AddTitleRow(titleRowX); + } + + private void AddHeader() + { + HeaderRowX headerRowX = new HeaderRowX(Columns, DisplayBorder); + dataGridX.AddHeaderRow(headerRowX); + } + + private void AddRows() + { + IEnumerable rows = Rows + .Select(x => new DataRowX(x, DisplayBorder)); + + foreach (DataRowX row in rows) + dataGridX.AddDataRow(row); + } + + private void AddHorizontalBorders() + { + if (isTitleVisible) + dataGridX.TitleTopBorder = new TitleTopBorder(BorderTemplate); + else if (isColumnHeaderRowVisible) + dataGridX.HeaderTopBorder = new HeaderTopBorder(BorderTemplate); + else if (areDataRowsVisible) + dataGridX.DataTopBorder = new DataTopBorder(BorderTemplate); + + if (isTitleVisible) + { + if (isColumnHeaderRowVisible) + dataGridX.TitleHeaderSeparator = new TitleHeaderSeparator(BorderTemplate); + else if (areDataRowsVisible) + dataGridX.TitleDataSeparator = new TitleDataSeparator(BorderTemplate); + else + dataGridX.TitleBottomBorder = new TitleBottomBorder(BorderTemplate); + } + + if (isColumnHeaderRowVisible) + { + if (areDataRowsVisible) + dataGridX.HeaderDataSeparator = new HeaderDataSeparator(BorderTemplate); + else + dataGridX.HeaderBottomBorder = new HeaderBottomBorder(BorderTemplate); + } + + if (areDataRowsVisible) + { + if (DisplayBorderBetweenRows) + dataGridX.DataDataSeparator = new DataDataSeparator(BorderTemplate); + + dataGridX.DataBottomBorder = new BottomBorderData(BorderTemplate); + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataRowX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataRowX.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs index 4d708bdd..20057d0b 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs @@ -1,101 +1,101 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class DataRowX - { - private readonly bool hasBorder; - private readonly DataRow dataRow; - private readonly List cells = new List(); - - public Size Size { get; private set; } - - public DataRowX(DataRow dataRow, bool hasBorder) - { - if (dataRow == null) throw new ArgumentNullException(nameof(dataRow)); - - this.dataRow = dataRow; - this.hasBorder = hasBorder; - - CreateCells(); - } - - private void CreateCells() - { - cells.Clear(); - - for (int i = 0; i < dataRow.CellCount; i++) - { - DataCellX cell = new DataCellX - { - Size = dataRow[i].CalculatePreferedSize() - }; - - AddCellToSize(cell); - - cells.Add(cell); - } - } - - private void AddCellToSize(DataCellX cell) - { - int initialCount = cells.Count; - - int width = initialCount == 0 && hasBorder - ? 1 - : Size.Width; - - width += cell.Size.Width; - - if (hasBorder) - width++; - - int height = Size.Height < cell.Size.Height - ? cell.Size.Height - : Size.Height; - - Size = new Size(width, height); - } - - public void Render(ITablePrinter tablePrinter, List cellWidths) - { - dataRow.Render(tablePrinter, cellWidths, Size.Height); - } - - public void UpdateColumnsWidths(List columnsWidths) - { - for (int i = 0; i < cells.Count; i++) - { - while (columnsWidths.Count <= i) - columnsWidths.Add(0); - - Size cellSize = cells[i].Size; - - if (cellSize.Width > columnsWidths[i]) - columnsWidths[i] = cellSize.Width; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class DataRowX + { + private readonly bool hasBorder; + private readonly DataRow dataRow; + private readonly List cells = new List(); + + public Size Size { get; private set; } + + public DataRowX(DataRow dataRow, bool hasBorder) + { + if (dataRow == null) throw new ArgumentNullException(nameof(dataRow)); + + this.dataRow = dataRow; + this.hasBorder = hasBorder; + + CreateCells(); + } + + private void CreateCells() + { + cells.Clear(); + + for (int i = 0; i < dataRow.CellCount; i++) + { + DataCellX cell = new DataCellX + { + Size = dataRow[i].CalculatePreferedSize() + }; + + AddCellToSize(cell); + + cells.Add(cell); + } + } + + private void AddCellToSize(DataCellX cell) + { + int initialCount = cells.Count; + + int width = initialCount == 0 && hasBorder + ? 1 + : Size.Width; + + width += cell.Size.Width; + + if (hasBorder) + width++; + + int height = Size.Height < cell.Size.Height + ? cell.Size.Height + : Size.Height; + + Size = new Size(width, height); + } + + public void Render(ITablePrinter tablePrinter, List cellWidths) + { + dataRow.Render(tablePrinter, cellWidths, Size.Height); + } + + public void UpdateColumnsWidths(List columnsWidths) + { + for (int i = 0; i < cells.Count; i++) + { + while (columnsWidths.Count <= i) + columnsWidths.Add(0); + + Size cellSize = cells[i].Size; + + if (cellSize.Width > columnsWidths[i]) + columnsWidths[i] = cellSize.Width; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataTopBorder.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs index 62a180b7..4aaf4c48 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/DataTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs @@ -1,60 +1,60 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class DataTopBorder - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get { return columnsWidths; } - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } - - public DataTopBorder(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = borderTemplate.GenerateTopBorder(columnsWidths); - - tablePrinter.WriteLineBorder(borderText); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class DataTopBorder + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private List columnsWidths; + + public List ColumnsWidths + { + get { return columnsWidths; } + set + { + if (value == columnsWidths) + return; + + columnsWidths = value; + borderText = null; + } + } + + public DataTopBorder(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = borderTemplate.GenerateTopBorder(columnsWidths); + + tablePrinter.WriteLineBorder(borderText); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderBottomBorder.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs index 51ff213d..f50a0525 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs @@ -1,61 +1,61 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class HeaderBottomBorder - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get { return columnsWidths; } - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } - - public HeaderBottomBorder(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = borderTemplate.GenerateBottomBorder(columnsWidths); - - tablePrinter.WriteLineBorder(borderText); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class HeaderBottomBorder + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private List columnsWidths; + + public List ColumnsWidths + { + get { return columnsWidths; } + set + { + if (value == columnsWidths) + return; + + columnsWidths = value; + borderText = null; + } + } + + public HeaderBottomBorder(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = borderTemplate.GenerateBottomBorder(columnsWidths); + + tablePrinter.WriteLineBorder(borderText); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderDataSeparator.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs index ea65dda1..009d9c53 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs @@ -1,82 +1,82 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class HeaderDataSeparator - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get { return columnsWidths; } - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } - - public HeaderDataSeparator(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = GenerateDataRowSeparatorBorder(); - - tablePrinter.WriteLineBorder(borderText); - } - - private string GenerateDataRowSeparatorBorder() - { - StringBuilder sb = new StringBuilder(); - - sb.Append(borderTemplate.LeftIntersection); - - for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) - { - int columnWidth = columnsWidths[columnIndex]; - sb.Append(new string(borderTemplate.Horizontal, columnWidth)); - - char columnBorderRight = columnIndex < columnsWidths.Count - 1 - ? borderTemplate.MiddleIntersection - : borderTemplate.RightIntersection; - - sb.Append(columnBorderRight); - } - - return sb.ToString(); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class HeaderDataSeparator + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private List columnsWidths; + + public List ColumnsWidths + { + get { return columnsWidths; } + set + { + if (value == columnsWidths) + return; + + columnsWidths = value; + borderText = null; + } + } + + public HeaderDataSeparator(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = GenerateDataRowSeparatorBorder(); + + tablePrinter.WriteLineBorder(borderText); + } + + private string GenerateDataRowSeparatorBorder() + { + StringBuilder sb = new StringBuilder(); + + sb.Append(borderTemplate.LeftIntersection); + + for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) + { + int columnWidth = columnsWidths[columnIndex]; + sb.Append(new string(borderTemplate.Horizontal, columnWidth)); + + char columnBorderRight = columnIndex < columnsWidths.Count - 1 + ? borderTemplate.MiddleIntersection + : borderTemplate.RightIntersection; + + sb.Append(columnBorderRight); + } + + return sb.ToString(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderRowX.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs index 4e062b73..980ba007 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs @@ -1,97 +1,97 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class HeaderRowX - { - private readonly bool hasBorder; - private readonly ColumnList columns; - private readonly List cells = new List(); - - public Size Size { get; private set; } - - public HeaderRowX(ColumnList columns, bool hasBorder) - { - if (columns == null) throw new ArgumentNullException(nameof(columns)); - - this.columns = columns; - this.hasBorder = hasBorder; - - CreateCells(); - } - - private void CreateCells() - { - foreach (Column column in columns) - { - DataCellX cell = new DataCellX - { - Size = column.HeaderCell.CalculatePreferedSize() - }; - - AddCellToSize(cell); - cells.Add(cell); - } - } - - private void AddCellToSize(DataCellX cell) - { - int width = cells.Count == 0 && hasBorder - ? 1 - : Size.Width; - - width += cell.Size.Width; - - if (hasBorder) - width++; - - int height = Size.Height < cell.Size.Height - ? cell.Size.Height - : Size.Height; - - Size = new Size(width, height); - } - - public void Render(ITablePrinter tablePrinter, List cellWidths) - { - int rowHeight = Size.Height; - columns.RenderHeaderRow(tablePrinter, cellWidths, rowHeight); - } - - public void UpdateColumnsWidths(List columnsWidths) - { - for (int i = 0; i < cells.Count; i++) - { - while (columnsWidths.Count <= i) - columnsWidths.Add(0); - - Size cellSize = cells[i].Size; - - if (cellSize.Width > columnsWidths[i]) - columnsWidths[i] = cellSize.Width; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class HeaderRowX + { + private readonly bool hasBorder; + private readonly ColumnList columns; + private readonly List cells = new List(); + + public Size Size { get; private set; } + + public HeaderRowX(ColumnList columns, bool hasBorder) + { + if (columns == null) throw new ArgumentNullException(nameof(columns)); + + this.columns = columns; + this.hasBorder = hasBorder; + + CreateCells(); + } + + private void CreateCells() + { + foreach (Column column in columns) + { + DataCellX cell = new DataCellX + { + Size = column.HeaderCell.CalculatePreferedSize() + }; + + AddCellToSize(cell); + cells.Add(cell); + } + } + + private void AddCellToSize(DataCellX cell) + { + int width = cells.Count == 0 && hasBorder + ? 1 + : Size.Width; + + width += cell.Size.Width; + + if (hasBorder) + width++; + + int height = Size.Height < cell.Size.Height + ? cell.Size.Height + : Size.Height; + + Size = new Size(width, height); + } + + public void Render(ITablePrinter tablePrinter, List cellWidths) + { + int rowHeight = Size.Height; + columns.RenderHeaderRow(tablePrinter, cellWidths, rowHeight); + } + + public void UpdateColumnsWidths(List columnsWidths) + { + for (int i = 0; i < cells.Count; i++) + { + while (columnsWidths.Count <= i) + columnsWidths.Add(0); + + Size cellSize = cells[i].Size; + + if (cellSize.Width > columnsWidths[i]) + columnsWidths[i] = cellSize.Width; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderTopBorder.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs index 52f62c7b..62d945c8 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/HeaderTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs @@ -1,61 +1,61 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class HeaderTopBorder - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get { return columnsWidths; } - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } - - public HeaderTopBorder(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = borderTemplate.GenerateTopBorder(columnsWidths); - - tablePrinter.WriteLineBorder(borderText); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class HeaderTopBorder + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private List columnsWidths; + + public List ColumnsWidths + { + get { return columnsWidths; } + set + { + if (value == columnsWidths) + return; + + columnsWidths = value; + borderText = null; + } + } + + public HeaderTopBorder(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = borderTemplate.GenerateTopBorder(columnsWidths); + + tablePrinter.WriteLineBorder(borderText); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleBottomBorder.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs index 921c5be4..3a4f679b 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs @@ -1,60 +1,60 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class TitleBottomBorder - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private int width; - - public int Width - { - get { return width; } - set - { - if (value == width) - return; - - width = value; - borderText = null; - } - } - - public TitleBottomBorder(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = borderTemplate.GenerateBottomBorder(width - 2); - - tablePrinter.WriteLineBorder(borderText); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class TitleBottomBorder + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private int width; + + public int Width + { + get { return width; } + set + { + if (value == width) + return; + + width = value; + borderText = null; + } + } + + public TitleBottomBorder(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = borderTemplate.GenerateBottomBorder(width - 2); + + tablePrinter.WriteLineBorder(borderText); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleDataSeparator.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs index d91e5838..c16fcb88 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs @@ -1,92 +1,92 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class TitleDataSeparator - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get { return columnsWidths; } - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } - - public TitleDataSeparator(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = GenerateTitleDataSeparator(); - - //if (borderText == null) - //{ - // int titleCellWidth = columnsWidths.Sum() + columnsWidths.Count - 1; - // borderText = borderTemplate.GenerateHorizontalSeparator(new[] { titleCellWidth }, columnsWidths); - //} - - tablePrinter.WriteLineBorder(borderText); - } - - /// - /// Generates the border displayed between title and the first data row. - /// This border is used only when title is visible, column header row is hidden and there is at least one row of data. - /// - private string GenerateTitleDataSeparator() - { - StringBuilder sb = new StringBuilder(); - - sb.Append(borderTemplate.LeftIntersection); - - for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) - { - int columnWidth = columnsWidths[columnIndex]; - sb.Append(new string(borderTemplate.Horizontal, columnWidth)); - - char columnBorderRight = columnIndex < columnsWidths.Count - 1 - ? borderTemplate.TopIntersection - : borderTemplate.RightIntersection; - - sb.Append(columnBorderRight); - } - - return sb.ToString(); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class TitleDataSeparator + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private List columnsWidths; + + public List ColumnsWidths + { + get { return columnsWidths; } + set + { + if (value == columnsWidths) + return; + + columnsWidths = value; + borderText = null; + } + } + + public TitleDataSeparator(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = GenerateTitleDataSeparator(); + + //if (borderText == null) + //{ + // int titleCellWidth = columnsWidths.Sum() + columnsWidths.Count - 1; + // borderText = borderTemplate.GenerateHorizontalSeparator(new[] { titleCellWidth }, columnsWidths); + //} + + tablePrinter.WriteLineBorder(borderText); + } + + /// + /// Generates the border displayed between title and the first data row. + /// This border is used only when title is visible, column header row is hidden and there is at least one row of data. + /// + private string GenerateTitleDataSeparator() + { + StringBuilder sb = new StringBuilder(); + + sb.Append(borderTemplate.LeftIntersection); + + for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) + { + int columnWidth = columnsWidths[columnIndex]; + sb.Append(new string(borderTemplate.Horizontal, columnWidth)); + + char columnBorderRight = columnIndex < columnsWidths.Count - 1 + ? borderTemplate.TopIntersection + : borderTemplate.RightIntersection; + + sb.Append(columnBorderRight); + } + + return sb.ToString(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleHeaderSeparator.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleHeaderSeparator.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs index f0d503e6..3304dab1 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleHeaderSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs @@ -1,86 +1,86 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; -using System.Text; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class TitleHeaderSeparator - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get { return columnsWidths; } - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } - - public TitleHeaderSeparator(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = GenerateTitleHeaderSeparator(); - - tablePrinter.WriteLineBorder(borderText); - } - - /// - /// Generates the border displayed between title and column header rows. - /// This border is used only when both title and column header rows are visible. - /// - private string GenerateTitleHeaderSeparator() - { - StringBuilder sb = new StringBuilder(); - - sb.Append(borderTemplate.LeftIntersection); - - for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) - { - int columnWidth = columnsWidths[columnIndex]; - sb.Append(new string(borderTemplate.Horizontal, columnWidth)); - - char columnBorderRight = columnIndex < columnsWidths.Count - 1 - ? borderTemplate.TopIntersection - : borderTemplate.RightIntersection; - - sb.Append(columnBorderRight); - } - - return sb.ToString(); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Text; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class TitleHeaderSeparator + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private List columnsWidths; + + public List ColumnsWidths + { + get { return columnsWidths; } + set + { + if (value == columnsWidths) + return; + + columnsWidths = value; + borderText = null; + } + } + + public TitleHeaderSeparator(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = GenerateTitleHeaderSeparator(); + + tablePrinter.WriteLineBorder(borderText); + } + + /// + /// Generates the border displayed between title and column header rows. + /// This border is used only when both title and column header rows are visible. + /// + private string GenerateTitleHeaderSeparator() + { + StringBuilder sb = new StringBuilder(); + + sb.Append(borderTemplate.LeftIntersection); + + for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) + { + int columnWidth = columnsWidths[columnIndex]; + sb.Append(new string(borderTemplate.Horizontal, columnWidth)); + + char columnBorderRight = columnIndex < columnsWidths.Count - 1 + ? borderTemplate.TopIntersection + : borderTemplate.RightIntersection; + + sb.Append(columnBorderRight); + } + + return sb.ToString(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleRowX.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs index 0d4d3ae9..16d92aca 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs @@ -1,41 +1,41 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class TitleRowX - { - public TitleRow TitleRow { get; } - public Size Size { get; set; } - - public TitleRowX(TitleRow titleRow) - { - TitleRow = titleRow; - - Size = titleRow?.CalculatePreferedSize() ?? Size.Empty; - } - - public void Render(ITablePrinter tablePrinter) - { - TitleRow?.Render(tablePrinter, Size); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class TitleRowX + { + public TitleRow TitleRow { get; } + public Size Size { get; set; } + + public TitleRowX(TitleRow titleRow) + { + TitleRow = titleRow; + + Size = titleRow?.CalculatePreferedSize() ?? Size.Empty; + } + + public void Render(ITablePrinter tablePrinter) + { + TitleRow?.Render(tablePrinter, Size); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleTopBorder.cs rename to sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs index d3710e0c..4477a0ca 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/RenderingModel/TitleTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs @@ -1,59 +1,59 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel -{ - internal class TitleTopBorder - { - private readonly BorderTemplate borderTemplate; - private string borderText; - private int width; - - public int Width - { - get { return width; } - set - { - if (value == width) - return; - - width = value; - borderText = null; - } - } - - public TitleTopBorder(BorderTemplate borderTemplate) - { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; - } - - public void Render(ITablePrinter tablePrinter) - { - if (borderText == null) - borderText = borderTemplate.GenerateTopBorder(width - 2); - - tablePrinter.WriteLineBorder(borderText); - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +{ + internal class TitleTopBorder + { + private readonly BorderTemplate borderTemplate; + private string borderText; + private int width; + + public int Width + { + get { return width; } + set + { + if (value == width) + return; + + width = value; + borderText = null; + } + } + + public TitleTopBorder(BorderTemplate borderTemplate) + { + if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); + this.borderTemplate = borderTemplate; + } + + public void Render(ITablePrinter tablePrinter) + { + if (borderText == null) + borderText = borderTemplate.GenerateTopBorder(width - 2); + + tablePrinter.WriteLineBorder(borderText); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/TitleCell.cs rename to sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs index 09af1080..b8d93784 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs @@ -1,155 +1,155 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Represents the single cell displayed in the title row. - /// - public class TitleCell : CellBase - { - /// - /// Gets the default horizontal alignment for a title cell. - /// - public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; - - /// - /// Gets or sets the instance that owns the current instance. - /// - public TitleRow ParentRow { get; internal set; } - - /// - /// Gets or sets the padding applyed to the left side of the cell. - /// - public int? PaddingLeft { get; set; } - - /// - /// Gets or sets the padding applyed to the right side of the cell. - /// - public int? PaddingRight { get; set; } - - /// - /// Initializes a new instance of the class with - /// empty content. - /// - public TitleCell() - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it. - /// - /// The text displayed in the cell. - public TitleCell(string text) - : base(text) - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it and its horizontal alignment. - /// - /// The text displayed in the cell. - /// The horizontal alignment of the content of the new cell. - public TitleCell(string text, HorizontalAlignment horizontalAlignment) - : base(text, horizontalAlignment) - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it. - /// - /// - public TitleCell(MultilineText text) - : base(text) - { - } - - /// - /// Initializes a new instance of the class with - /// the text contained by it and its horizontal alignment. - /// - /// - /// The horizontal alignment of the content of the new cell. - public TitleCell(MultilineText text, HorizontalAlignment horizontalAlignment) - : base(text, horizontalAlignment) - { - } - - /// - /// Initializes a new instance of the class with - /// an object representing the content. - /// - public TitleCell(object content) - : base(content) - { - } - - /// - /// Initializes a new instance of the class with - /// an object representing the content and its horizontal alignment. - /// - public TitleCell(object content, HorizontalAlignment horizontalAlignment) - : base(content, horizontalAlignment) - { - } - - /// - /// Calculates and returns the left padding for the content displayed in the cell. - /// The value is calculated taking into account also the parent row and parent table. - /// - protected override int CalculatePaddingLeft() - { - if (PaddingLeft.HasValue) - return PaddingLeft.Value; - - return ParentRow?.ParentDataGrid?.PaddingLeft ?? 0; - } - - /// - /// Calculates and returns the right padding for the content displayed in the cell. - /// The value is calculated taking into account also the parent row and parent table. - /// - protected override int CalculatePaddingRight() - { - if (PaddingRight.HasValue) - return PaddingRight.Value; - - return ParentRow?.ParentDataGrid?.PaddingRight ?? 0; - } - - /// - /// Calculates and returns the horizontal alignment of the content displayed in the cell. - /// The value is calculated taking into account also the parent row and parent table. - /// - protected override HorizontalAlignment CalculateHorizontalAlignment() - { - HorizontalAlignment alignment = HorizontalAlignment; - - if (alignment == HorizontalAlignment.Default) - alignment = DefaultHorizontalAlignment; - - return alignment; - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Represents the single cell displayed in the title row. + /// + public class TitleCell : CellBase + { + /// + /// Gets the default horizontal alignment for a title cell. + /// + public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; + + /// + /// Gets or sets the instance that owns the current instance. + /// + public TitleRow ParentRow { get; internal set; } + + /// + /// Gets or sets the padding applyed to the left side of the cell. + /// + public int? PaddingLeft { get; set; } + + /// + /// Gets or sets the padding applyed to the right side of the cell. + /// + public int? PaddingRight { get; set; } + + /// + /// Initializes a new instance of the class with + /// empty content. + /// + public TitleCell() + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it. + /// + /// The text displayed in the cell. + public TitleCell(string text) + : base(text) + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it and its horizontal alignment. + /// + /// The text displayed in the cell. + /// The horizontal alignment of the content of the new cell. + public TitleCell(string text, HorizontalAlignment horizontalAlignment) + : base(text, horizontalAlignment) + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it. + /// + /// + public TitleCell(MultilineText text) + : base(text) + { + } + + /// + /// Initializes a new instance of the class with + /// the text contained by it and its horizontal alignment. + /// + /// + /// The horizontal alignment of the content of the new cell. + public TitleCell(MultilineText text, HorizontalAlignment horizontalAlignment) + : base(text, horizontalAlignment) + { + } + + /// + /// Initializes a new instance of the class with + /// an object representing the content. + /// + public TitleCell(object content) + : base(content) + { + } + + /// + /// Initializes a new instance of the class with + /// an object representing the content and its horizontal alignment. + /// + public TitleCell(object content, HorizontalAlignment horizontalAlignment) + : base(content, horizontalAlignment) + { + } + + /// + /// Calculates and returns the left padding for the content displayed in the cell. + /// The value is calculated taking into account also the parent row and parent table. + /// + protected override int CalculatePaddingLeft() + { + if (PaddingLeft.HasValue) + return PaddingLeft.Value; + + return ParentRow?.ParentDataGrid?.PaddingLeft ?? 0; + } + + /// + /// Calculates and returns the right padding for the content displayed in the cell. + /// The value is calculated taking into account also the parent row and parent table. + /// + protected override int CalculatePaddingRight() + { + if (PaddingRight.HasValue) + return PaddingRight.Value; + + return ParentRow?.ParentDataGrid?.PaddingRight ?? 0; + } + + /// + /// Calculates and returns the horizontal alignment of the content displayed in the cell. + /// The value is calculated taking into account also the parent row and parent table. + /// + protected override HorizontalAlignment CalculateHorizontalAlignment() + { + HorizontalAlignment alignment = HorizontalAlignment; + + if (alignment == HorizontalAlignment.Default) + alignment = DefaultHorizontalAlignment; + + return alignment; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TabularData/TitleRow.cs b/sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/TabularData/TitleRow.cs rename to sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs index 3f5b284d..2f5c0917 100644 --- a/sources/ConsoleTools/ConsoleTools/TabularData/TitleRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs @@ -1,163 +1,163 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System.Collections.Generic; - -namespace DustInTheWind.ConsoleTools.TabularData -{ - /// - /// Represents the title row of a table. - /// - public class TitleRow - { - /// - /// Gets or sets the cell displayed in the title row. - /// This is the unique cell of the row. - /// - public TitleCell TitleCell { get; } - - /// - /// Gets or sets the instance that contains the current title. - /// - public DataGrid ParentDataGrid { get; internal set; } - - /// - /// Gets or sets the content alignment. - /// - public HorizontalAlignment HorizontalAlignment - { - get { return TitleCell.HorizontalAlignment; } - set { TitleCell.HorizontalAlignment = value; } - } - - /// - /// Gets a value that specifies if the current instance of the has a content to be displayed. - /// - public bool HasContent => TitleCell?.Content?.IsEmpty == false; - - /// - /// Initializes a new instance of the class with - /// empty content. - /// - public TitleRow() - { - TitleCell = new TitleCell - { - ParentRow = this, - Content = MultilineText.Empty - }; - } - - /// - /// Initializes a new instance of the class with - /// the text content. - /// - public TitleRow(string title) - { - TitleCell = new TitleCell - { - ParentRow = this, - Content = title == null - ? MultilineText.Empty - : new MultilineText(title) - }; - } - - /// - /// Initializes a new instance of the class with - /// a content. - /// - public TitleRow(MultilineText title) - { - TitleCell = new TitleCell - { - ParentRow = this, - Content = title ?? MultilineText.Empty - }; - } - - /// - /// Initializes a new instance of the class with - /// an representing the content. - /// - public TitleRow(object title) - { - TitleCell = new TitleCell - { - ParentRow = this, - Content = title?.ToString() ?? MultilineText.Empty - }; - } - - /// - /// Calculates the space (in characters) the current instance ocupies without other restrictions. - /// - public Size CalculatePreferedSize() - { - bool displayBorder = ParentDataGrid?.DisplayBorder ?? false; - - int titleRowWidth = 0; - - if (displayBorder) - titleRowWidth += 1; - - Size cellSize = TitleCell.CalculatePreferedSize(); - titleRowWidth += cellSize.Width; - - if (displayBorder) - titleRowWidth += 1; - - return new Size(titleRowWidth, cellSize.Height); - } - - /// - /// Renders the current instance in the specified . - /// - /// The instance that will display the rendered title row. - /// The minimum width into which the current instance must be rendered. - public void Render(ITablePrinter tablePrinter, Size size) - { - BorderTemplate borderTemplate = ParentDataGrid?.BorderTemplate; - - bool displayBorder = borderTemplate != null && ParentDataGrid?.DisplayBorder == true; - - Size cellSize = displayBorder - ? size.InflateWidth(-2) - : size; - - IEnumerable cellContents = TitleCell.Render(cellSize); - - // Write title - foreach (string line in cellContents) - { - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Left); - - tablePrinter.WriteTitle(line); - - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Right); - - tablePrinter.WriteLine(); - } - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.TabularData +{ + /// + /// Represents the title row of a table. + /// + public class TitleRow + { + /// + /// Gets or sets the cell displayed in the title row. + /// This is the unique cell of the row. + /// + public TitleCell TitleCell { get; } + + /// + /// Gets or sets the instance that contains the current title. + /// + public DataGrid ParentDataGrid { get; internal set; } + + /// + /// Gets or sets the content alignment. + /// + public HorizontalAlignment HorizontalAlignment + { + get { return TitleCell.HorizontalAlignment; } + set { TitleCell.HorizontalAlignment = value; } + } + + /// + /// Gets a value that specifies if the current instance of the has a content to be displayed. + /// + public bool HasContent => TitleCell?.Content?.IsEmpty == false; + + /// + /// Initializes a new instance of the class with + /// empty content. + /// + public TitleRow() + { + TitleCell = new TitleCell + { + ParentRow = this, + Content = MultilineText.Empty + }; + } + + /// + /// Initializes a new instance of the class with + /// the text content. + /// + public TitleRow(string title) + { + TitleCell = new TitleCell + { + ParentRow = this, + Content = title == null + ? MultilineText.Empty + : new MultilineText(title) + }; + } + + /// + /// Initializes a new instance of the class with + /// a content. + /// + public TitleRow(MultilineText title) + { + TitleCell = new TitleCell + { + ParentRow = this, + Content = title ?? MultilineText.Empty + }; + } + + /// + /// Initializes a new instance of the class with + /// an representing the content. + /// + public TitleRow(object title) + { + TitleCell = new TitleCell + { + ParentRow = this, + Content = title?.ToString() ?? MultilineText.Empty + }; + } + + /// + /// Calculates the space (in characters) the current instance ocupies without other restrictions. + /// + public Size CalculatePreferedSize() + { + bool displayBorder = ParentDataGrid?.DisplayBorder ?? false; + + int titleRowWidth = 0; + + if (displayBorder) + titleRowWidth += 1; + + Size cellSize = TitleCell.CalculatePreferedSize(); + titleRowWidth += cellSize.Width; + + if (displayBorder) + titleRowWidth += 1; + + return new Size(titleRowWidth, cellSize.Height); + } + + /// + /// Renders the current instance in the specified . + /// + /// The instance that will display the rendered title row. + /// The minimum width into which the current instance must be rendered. + public void Render(ITablePrinter tablePrinter, Size size) + { + BorderTemplate borderTemplate = ParentDataGrid?.BorderTemplate; + + bool displayBorder = borderTemplate != null && ParentDataGrid?.DisplayBorder == true; + + Size cellSize = displayBorder + ? size.InflateWidth(-2) + : size; + + IEnumerable cellContents = TitleCell.Render(cellSize); + + // Write title + foreach (string line in cellContents) + { + if (displayBorder) + tablePrinter.WriteBorder(borderTemplate.Left); + + tablePrinter.WriteTitle(line); + + if (displayBorder) + tablePrinter.WriteBorder(borderTemplate.Right); + + tablePrinter.WriteLine(); + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj index 903d0b8c..dca2580b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj @@ -138,6 +138,10 @@ + + {1378eec9-98b1-41ee-bf7e-b7ff7d3f9932} + ConsoleTools.Tables + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/ConsoleTools.Tutorial.csproj b/sources/ConsoleTools/ConsoleTools.Tutorial/ConsoleTools.Tutorial.csproj index f86e3ebd..66891f15 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/ConsoleTools.Tutorial.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/ConsoleTools.Tutorial.csproj @@ -65,6 +65,10 @@ + + {1378eec9-98b1-41ee-bf7e-b7ff7d3f9932} + ConsoleTools.Tables + {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8} ConsoleTools diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index b0580969..6b6d6a5d 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -31,7 +31,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.ProgressB EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.ScrollMenu", "ConsoleTools.Demo.ScrollMenu\ConsoleTools.Demo.ScrollMenu.csproj", "{25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools", "ConsoleTools\ConsoleTools.csproj", "{6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools", "ConsoleTools\ConsoleTools.csproj", "{6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{8706D88B-39F4-4D2C-9700-82FA6C491E3C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Tables", "ConsoleTools.Tables\ConsoleTools.Tables.csproj", "{1378EEC9-98B1-41EE-BF7E-B7FF7D3F9932}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.NetFramework461", "ConsoleTools.Demo.NetFramework461\ConsoleTools.Demo.NetFramework461.csproj", "{0CA815D0-6D4A-4D74-9A30-AC027C321BA1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.NetFramework45", "ConsoleTools.Demo.NetFramework45\ConsoleTools.Demo.NetFramework45.csproj", "{75273E84-51DF-4547-81C0-16C253A2EBB7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.NetCore22", "ConsoleTools.Demo.NetCore22\ConsoleTools.Demo.NetCore22.csproj", "{A58E0776-614D-4FEB-A9CA-64F635B634A3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -161,10 +171,59 @@ Global {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8}.Release-Net45|Any CPU.Build.0 = Release|Any CPU {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU {6E67DE9D-7AB8-4828-8DFA-78E2E9AC59E8}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {1378EEC9-98B1-41EE-BF7E-B7FF7D3F9932}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1378EEC9-98B1-41EE-BF7E-B7FF7D3F9932}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1378EEC9-98B1-41EE-BF7E-B7FF7D3F9932}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1378EEC9-98B1-41EE-BF7E-B7FF7D3F9932}.Release|Any CPU.Build.0 = Release|Any CPU + {1378EEC9-98B1-41EE-BF7E-B7FF7D3F9932}.Release-Net45|Any CPU.ActiveCfg = Release|Any CPU + {1378EEC9-98B1-41EE-BF7E-B7FF7D3F9932}.Release-Net45|Any CPU.Build.0 = Release|Any CPU + {1378EEC9-98B1-41EE-BF7E-B7FF7D3F9932}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {1378EEC9-98B1-41EE-BF7E-B7FF7D3F9932}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1}.Release|Any CPU.Build.0 = Release|Any CPU + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1}.Release-Net45|Any CPU.ActiveCfg = Release|Any CPU + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1}.Release-Net45|Any CPU.Build.0 = Release|Any CPU + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {75273E84-51DF-4547-81C0-16C253A2EBB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {75273E84-51DF-4547-81C0-16C253A2EBB7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75273E84-51DF-4547-81C0-16C253A2EBB7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75273E84-51DF-4547-81C0-16C253A2EBB7}.Release|Any CPU.Build.0 = Release|Any CPU + {75273E84-51DF-4547-81C0-16C253A2EBB7}.Release-Net45|Any CPU.ActiveCfg = Release|Any CPU + {75273E84-51DF-4547-81C0-16C253A2EBB7}.Release-Net45|Any CPU.Build.0 = Release|Any CPU + {75273E84-51DF-4547-81C0-16C253A2EBB7}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {75273E84-51DF-4547-81C0-16C253A2EBB7}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {A58E0776-614D-4FEB-A9CA-64F635B634A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A58E0776-614D-4FEB-A9CA-64F635B634A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A58E0776-614D-4FEB-A9CA-64F635B634A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A58E0776-614D-4FEB-A9CA-64F635B634A3}.Release|Any CPU.Build.0 = Release|Any CPU + {A58E0776-614D-4FEB-A9CA-64F635B634A3}.Release-Net45|Any CPU.ActiveCfg = Release|Any CPU + {A58E0776-614D-4FEB-A9CA-64F635B634A3}.Release-Net45|Any CPU.Build.0 = Release|Any CPU + {A58E0776-614D-4FEB-A9CA-64F635B634A3}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {A58E0776-614D-4FEB-A9CA-64F635B634A3}.Release-Net461|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F4123F22-2503-4DDB-BF04-8CA87C3FACDA} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {64FBFC9E-C9A4-46C6-84ED-6A8A811ECFBC} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {9EC116AF-EF51-49F4-BDB1-921DD586C7CE} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {A76A253F-E01F-4E5B-80F0-DBBC8B257905} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {61AA97AF-A87A-4EB2-AF78-CB4067C80704} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {8DD165BA-78C3-48A0-BF61-9673458A260C} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {03611F6A-F799-4A07-8288-41BD4BD21C1A} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {47D36AC9-80A3-45C5-8DC4-DE804C21ABA9} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {5D585EE9-4B5C-4199-9F05-439B80F6B411} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {45AB806D-5DB0-4EE7-BDCE-CD32B4A313FF} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {099E13DC-313B-4901-9B75-0F400F8E94A3} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {25D924E6-D62A-4F33-9CE4-2E09BA2A4FC2} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {0CA815D0-6D4A-4D74-9A30-AC027C321BA1} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {75273E84-51DF-4547-81C0-16C253A2EBB7} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + {A58E0776-614D-4FEB-A9CA-64F635B634A3} = {8706D88B-39F4-4D2C-9700-82FA6C491E3C} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {369B843F-38E3-4477-A766-F70718E83926} EndGlobalSection diff --git a/sources/ConsoleTools/ConsoleTools/AlignedText.cs b/sources/ConsoleTools/ConsoleTools/AlignedText.cs index 2cf2cda4..032138ff 100644 --- a/sources/ConsoleTools/ConsoleTools/AlignedText.cs +++ b/sources/ConsoleTools/ConsoleTools/AlignedText.cs @@ -29,7 +29,7 @@ public struct AlignmentResult } /// - /// Represents a text that can be horizontaly aligned into a space. + /// Represents a text that can be horizontally aligned into a space. /// public class AlignedText { diff --git a/sources/ConsoleTools/ConsoleTools/BlockControl.cs b/sources/ConsoleTools/ConsoleTools/BlockControl.cs index de69dfa3..8f7ef9f8 100644 --- a/sources/ConsoleTools/ConsoleTools/BlockControl.cs +++ b/sources/ConsoleTools/ConsoleTools/BlockControl.cs @@ -26,7 +26,7 @@ namespace DustInTheWind.ConsoleTools /// /// Provides base functionality for a block control like top/bottom margin. /// A block control does not accept other controls on the same horizontal. - /// It starts from the beginning of the next line if the currsor is not already + /// It starts from the beginning of the next line if the cursor is not already /// at the beginning of the line. /// It also provides a top and a bottom margin. /// diff --git a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj b/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj index 8261400e..d6f32650 100644 --- a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj +++ b/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj @@ -12,6 +12,12 @@ true + + + + + + diff --git a/sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs b/sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs index 184a4784..2c9f676d 100644 --- a/sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs +++ b/sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs @@ -24,7 +24,7 @@ namespace DustInTheWind.ConsoleTools { /// - /// Must be implemented by a control in order to offer additional supoport when used in the . + /// Must be implemented by a control in order to offer additional support when used in the . /// public interface IRepeatableSupport { diff --git a/sources/ConsoleTools/ConsoleTools/Label.cs b/sources/ConsoleTools/ConsoleTools/Label.cs index d007410f..23578f81 100644 --- a/sources/ConsoleTools/ConsoleTools/Label.cs +++ b/sources/ConsoleTools/ConsoleTools/Label.cs @@ -24,7 +24,7 @@ namespace DustInTheWind.ConsoleTools public class Label : InlineTextBlock { /// - /// Initializes a new instacne of the class. + /// Initializes a new instance of the class. /// public Label() { diff --git a/sources/ConsoleTools/ConsoleTools/Location.cs b/sources/ConsoleTools/ConsoleTools/Location.cs index 36ee67b2..8df25214 100644 --- a/sources/ConsoleTools/ConsoleTools/Location.cs +++ b/sources/ConsoleTools/ConsoleTools/Location.cs @@ -25,7 +25,7 @@ namespace DustInTheWind.ConsoleTools { /// /// Represents a location in the 2D plane. - /// Imutable. + /// Immutable. /// public struct Location { From 5d744ef6aea2fab58aaab19e0a287eb93e573db0 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 29 Dec 2019 20:12:05 +0200 Subject: [PATCH 06/57] fixed variable names. --- sources/ConsoleTools/ConsoleTools/Control.cs | 10 +++++----- .../ConsoleTools/ConsoleTools/ControlLayout.cs | 2 +- .../CustomConsole.HorizontalLines.cs | 4 ++-- .../CustomConsole.Write.BackgroundColor.cs | 18 +++++++++--------- .../Templates/SequenceSpinnerTemplate.cs | 3 +-- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/sources/ConsoleTools/ConsoleTools/Control.cs b/sources/ConsoleTools/ConsoleTools/Control.cs index 23b760a4..fb29824d 100644 --- a/sources/ConsoleTools/ConsoleTools/Control.cs +++ b/sources/ConsoleTools/ConsoleTools/Control.cs @@ -28,7 +28,7 @@ namespace DustInTheWind.ConsoleTools /// public abstract class Control { - private bool originalCursorVisility; + private bool originalCursorVisibility; /// /// Gets or sets a value that specifies if the cursor is visible while the control is displayed. @@ -43,7 +43,7 @@ public abstract class Control protected bool RestoreCursorVisibilityAfterDisplay { get; set; } = true; /// - /// Event raised at the begining of the method, before doing anything else. + /// Event raised at the beginning of the method, before doing anything else. /// public virtual event EventHandler BeforeDisplay; @@ -61,7 +61,7 @@ public void Display() if (CursorVisibility.HasValue) { - originalCursorVisility = Console.CursorVisible; + originalCursorVisibility = Console.CursorVisible; Console.CursorVisible = CursorVisibility.Value; try @@ -71,7 +71,7 @@ public void Display() finally { if (RestoreCursorVisibilityAfterDisplay) - Console.CursorVisible = originalCursorVisility; + Console.CursorVisible = originalCursorVisibility; } } else @@ -88,7 +88,7 @@ public void Display() protected abstract void DoDisplay(); /// - /// Method called at the begining of the method, before doing anything else. + /// Method called at the beginning of the method, before doing anything else. /// protected virtual void OnBeforeDisplay() { diff --git a/sources/ConsoleTools/ConsoleTools/ControlLayout.cs b/sources/ConsoleTools/ConsoleTools/ControlLayout.cs index 9e25ff74..c7d55bd6 100644 --- a/sources/ConsoleTools/ConsoleTools/ControlLayout.cs +++ b/sources/ConsoleTools/ConsoleTools/ControlLayout.cs @@ -132,7 +132,7 @@ public class ControlLayout public int OuterEmptySpaceRight { get; private set; } /// - /// Calculates the position and dimentions of all the parts that must be displayed. + /// Calculates the position and dimensions of all the parts that must be displayed. /// public void Calculate() { diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.HorizontalLines.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.HorizontalLines.cs index 77912a56..ff605177 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.HorizontalLines.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.HorizontalLines.cs @@ -29,7 +29,7 @@ namespace DustInTheWind.ConsoleTools public static partial class CustomConsole { /// - /// Builds a string repeating the specified character and having the leangth equal to the width of the console's window. + /// Builds a string repeating the specified character and having the length equal to the width of the console's window. /// public static string BuildHorizontalWindowLine(char c = '-') => new string(c, Console.WindowWidth); @@ -40,7 +40,7 @@ public static void WriteHorizontalWindowLine(char c = '-') } /// - /// Builds a string repeating the specified character and having the leangth equal to the width of the console's buffer. + /// Builds a string repeating the specified character and having the length equal to the width of the console's buffer. /// public static string BuildHorizontalBufferLine(char c = '-') => new string(' ', Console.BufferWidth); diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs index a9f7906f..fc5c8b91 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs @@ -71,12 +71,12 @@ public static void WriteBackgroundColor(ConsoleColor backgroudColor, object o) /// Writes the specified string value, followed by the current line terminator, to the Console. /// An additional parameter can be specified for the background color used to write the text. /// - /// The background color used to write the text. + /// The background color used to write the text. /// The text to write. - public static void WriteLineBackgroundColor(ConsoleColor backgroudColor, string text) + public static void WriteLineBackgroundColor(ConsoleColor backgroundColor, string text) { ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroudColor; + Console.BackgroundColor = backgroundColor; Console.WriteLine(text); Console.BackgroundColor = oldColor; } @@ -86,13 +86,13 @@ public static void WriteLineBackgroundColor(ConsoleColor backgroudColor, string /// followed by the current line terminator, to the Console /// using the specified format information and background color. /// - /// The background color used to write the text. + /// The background color used to write the text. /// A composite format string. /// An array of objects to write using format. - public static void WriteLineBackgroundColor(ConsoleColor backgroudColor, string format, params object[] arg) + public static void WriteLineBackgroundColor(ConsoleColor backgroundColor, string format, params object[] arg) { ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroudColor; + Console.BackgroundColor = backgroundColor; Console.WriteLine(format, arg); Console.BackgroundColor = oldColor; } @@ -101,12 +101,12 @@ public static void WriteLineBackgroundColor(ConsoleColor backgroudColor, string /// Writes the text representation of the specified object, followed by the current line terminator, to the Console. /// An additional parameter can be specified for the background color used to write the text. /// - /// The background color used to write the text. + /// The background color used to write the text. /// The value to write. - public static void WriteLineBackgroundColor(ConsoleColor backgroudColor, object o) + public static void WriteLineBackgroundColor(ConsoleColor backgroundColor, object o) { ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroudColor; + Console.BackgroundColor = backgroundColor; Console.WriteLine(o); Console.BackgroundColor = oldColor; } diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs index dc929d4b..cf30a9d2 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs @@ -40,8 +40,7 @@ public class SequenceSpinnerTemplate : ISpinnerTemplate /// The list of frames. public SequenceSpinnerTemplate(string[] sequence) { - if (sequence == null) throw new ArgumentNullException(nameof(sequence)); - this.sequence = sequence; + this.sequence = sequence ?? throw new ArgumentNullException(nameof(sequence)); } /// From 436932a376091d3ef018cd2cb998c23fc4b2d227 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sat, 4 Jan 2020 22:23:01 +0200 Subject: [PATCH 07/57] started to add themes --- doc/changelog.txt | 4 + .../Program.cs | 4 +- .../Program.cs | 4 +- .../ApplicationHeader.cs | 4 +- .../ConsoleTools.Demo.PrompterDemo/Program.cs | 2 +- .../Program.cs | 2 +- .../ApplicationHeader.cs | 4 +- .../CommandBase.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/Program.cs | 2 +- .../ConsoleTools/ConsoleWrapper/ConsoleX.cs | 16 ++ ...stomConsole.WithoutCursor.cs => Cursor.cs} | 146 +++++++++--------- .../ConsoleTools/CustomConsole.Colors.cs | 8 +- .../CustomConsole.HorizontalLines.cs | 53 ------- .../CustomConsole.WriteEmphasies.cs | 48 +++--- .../ConsoleTools/HorizontalLine.cs | 12 +- .../ConsoleTools/InputControls/ListView.cs | 2 +- .../ConsoleTools/InputControls/ValueView.cs | 2 +- .../InputControls/YesNoQuestion.cs | 2 +- .../ConsoleTools/Menues/TextMenu.cs | 2 +- .../ConsoleTools/Themes/DefaultColorTheme.cs | 27 ++++ .../ConsoleTools/Themes/DefaultTextType.cs | 12 ++ .../ConsoleTools/Themes/IColorTheme.cs | 69 +++++++++ .../ConsoleTools/Themes/TextType.cs | 18 +++ 23 files changed, 275 insertions(+), 170 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools/ConsoleWrapper/ConsoleX.cs rename sources/ConsoleTools/ConsoleTools/{CustomConsole.WithoutCursor.cs => Cursor.cs} (95%) delete mode 100644 sources/ConsoleTools/ConsoleTools/CustomConsole.HorizontalLines.cs create mode 100644 sources/ConsoleTools/ConsoleTools/Themes/DefaultColorTheme.cs create mode 100644 sources/ConsoleTools/ConsoleTools/Themes/DefaultTextType.cs create mode 100644 sources/ConsoleTools/ConsoleTools/Themes/IColorTheme.cs create mode 100644 sources/ConsoleTools/ConsoleTools/Themes/TextType.cs diff --git a/doc/changelog.txt b/doc/changelog.txt index 713fe5b0..0089dced 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -3,6 +3,10 @@ ConsoleTools Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +ver 0.7.0 +--------- +- CustomConsole - removed the methods building and writing a horizontal line. + ver 0.6.0 --------- - Control: Added the DefaultParent property. diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs index a9076b82..70f65a8a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs @@ -52,13 +52,13 @@ private static void DisplayApplicationHeader() TextBlock title = new TextBlock { Text = "ConsoleTools Demo - HorizontalLine", - ForegroundColor = CustomConsole.EmphasiesColor + ForegroundColor = CustomConsole.EmphasizedColor }; HorizontalLine horizontalLine = new HorizontalLine { Character = '=', - ForegroundColor = CustomConsole.EmphasiesColor, + ForegroundColor = CustomConsole.EmphasizedColor, Margin = 0 }; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs index e3494b45..cec7004e 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs @@ -46,12 +46,12 @@ private static void DisplayApplicationHeader() // new InlineTextBlock // { // Text = "ConsoleTools Demo - InputControls", - // ForegroundColor = CustomConsole.EmphasiesColor + // ForegroundColor = CustomConsole.EmphasizedColor // }, // new TextBlock // { // Text = CustomConsole.HorizontalWindowLine, - // ForegroundColor = CustomConsole.EmphasiesColor, + // ForegroundColor = CustomConsole.EmphasizedColor, // MarginBottom = 1 // }, // new TextBlock diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs index 115e0732..a1940c15 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs @@ -35,13 +35,13 @@ private void InitializeControls() { titleBlock = new TextBlock { - ForegroundColor = CustomConsole.EmphasiesColor + ForegroundColor = CustomConsole.EmphasizedColor }; horizontalLine = new HorizontalLine { Character = '=', - ForegroundColor = CustomConsole.EmphasiesColor, + ForegroundColor = CustomConsole.EmphasizedColor, Margin = "0 0 0 1" }; } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs index ed61adf6..545657c1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs @@ -53,7 +53,7 @@ private static void DisplayGoodby() TextBlock goodbyText = new TextBlock { Text = "Bye!", - ForegroundColor = CustomConsole.EmphasiesColor, + ForegroundColor = CustomConsole.EmphasizedColor, Margin = "0 1 0 0" }; goodbyText.Display(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs index 3ec7f473..de470b6d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs @@ -93,7 +93,7 @@ private static void DisplayGoodby() TextBlock goodbyText = new TextBlock { Text = "Bye!", - ForegroundColor = CustomConsole.EmphasiesColor, + ForegroundColor = CustomConsole.EmphasizedColor, Margin = "0 1 0 0" }; goodbyText.Display(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs index 95830f43..b342696f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs @@ -35,13 +35,13 @@ private void InitializeControls() { titleBlock = new TextBlock { - ForegroundColor = CustomConsole.EmphasiesColor + ForegroundColor = CustomConsole.EmphasizedColor }; horizontalLine = new HorizontalLine { Character = '=', - ForegroundColor = CustomConsole.EmphasiesColor, + ForegroundColor = CustomConsole.EmphasizedColor, Margin = "0 0 0 1" }; } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs index c2719c16..a06f12ed 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs @@ -29,7 +29,7 @@ public void Execute() TextBlock textBlock = new TextBlock { Text = $"- {Title}:", - ForegroundColor = CustomConsole.EmphasiesColor, + ForegroundColor = CustomConsole.EmphasizedColor, Margin = "0 2 0 1" }; textBlock.Display(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs index 73fabb9e..0733bd47 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs @@ -85,7 +85,7 @@ private static void DisplayGoodby() TextBlock goodbyText = new TextBlock { Text = "Bye!", - ForegroundColor = CustomConsole.EmphasiesColor, + ForegroundColor = CustomConsole.EmphasizedColor, Margin = "0 1 0 0" }; goodbyText.Display(); diff --git a/sources/ConsoleTools/ConsoleTools/ConsoleWrapper/ConsoleX.cs b/sources/ConsoleTools/ConsoleTools/ConsoleWrapper/ConsoleX.cs new file mode 100644 index 00000000..ca3701ff --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools/ConsoleWrapper/ConsoleX.cs @@ -0,0 +1,16 @@ +using System; +using DustInTheWind.ConsoleTools.Themes; + +namespace DustInTheWind.ConsoleTools +{ + internal class ConsoleX + { + private IColorTheme colorTheme = new DefaultColorTheme(); + + public IColorTheme ColorTheme + { + get => colorTheme; + set => colorTheme = value ?? throw new ArgumentNullException(nameof(ColorTheme)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WithoutCursor.cs b/sources/ConsoleTools/ConsoleTools/Cursor.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WithoutCursor.cs rename to sources/ConsoleTools/ConsoleTools/Cursor.cs index 236030f6..543c38eb 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WithoutCursor.cs +++ b/sources/ConsoleTools/ConsoleTools/Cursor.cs @@ -1,73 +1,75 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Contains a set of methods that help to write text to the Console. - /// - public static partial class CustomConsole - { - /// - /// Executes the specified action while hiding the cursor. - /// - /// The action to be executed. - public static void RunWithoutCursor(Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - bool initialCursorVisible = Console.CursorVisible; - Console.CursorVisible = false; - - try - { - action(); - } - finally - { - Console.CursorVisible = initialCursorVisible; - } - } - - /// - /// Executes the specified function while hiding the cursor. - /// - /// The type of the value to be returned. - /// The function to be executed. - /// - public static T RunWithoutCursor(Func action) - { - bool initialCursorVisible = Console.CursorVisible; - Console.CursorVisible = false; - - try - { - return action(); - } - finally - { - Console.CursorVisible = initialCursorVisible; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Contains a set of methods that help to write text to the Console. + /// + public static class Cursor + { + /// + /// Executes the specified action while hiding the cursor. + /// + /// The action to be executed. + public static void RunWithoutCursor(Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + bool initialCursorVisible = Console.CursorVisible; + Console.CursorVisible = false; + + try + { + action(); + } + finally + { + Console.CursorVisible = initialCursorVisible; + } + } + + /// + /// Executes the specified function while hiding the cursor. + /// + /// The type of the value to be returned. + /// The function to be executed. + /// + public static T RunWithoutCursor(Func action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + bool initialCursorVisible = Console.CursorVisible; + Console.CursorVisible = false; + + try + { + return action(); + } + finally + { + Console.CursorVisible = initialCursorVisible; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs index 400ce93c..0d6bb9f8 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs @@ -62,14 +62,14 @@ public static partial class CustomConsole public static ConsoleColor? ErrorBackgroundColor { get; set; } /// - /// Gets or sets the color used to write Emphasiesed messages. + /// Gets or sets the color used to write Emphasized messages. /// - public static ConsoleColor EmphasiesColor { get; set; } = ConsoleColor.White; + public static ConsoleColor EmphasizedColor { get; set; } = ConsoleColor.White; /// - /// Gets or sets the background color used to write Emphasies messages. + /// Gets or sets the background color used to write Emphasis messages. /// If the color is null, default background color is used. /// - public static ConsoleColor? EmphasiesBackgroundColor { get; set; } + public static ConsoleColor? EmphasizedBackgroundColor { get; set; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.HorizontalLines.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.HorizontalLines.cs deleted file mode 100644 index ff605177..00000000 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.HorizontalLines.cs +++ /dev/null @@ -1,53 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Contains a set of methods that help to write text to the Console. - /// - public static partial class CustomConsole - { - /// - /// Builds a string repeating the specified character and having the length equal to the width of the console's window. - /// - public static string BuildHorizontalWindowLine(char c = '-') => new string(c, Console.WindowWidth); - - public static void WriteHorizontalWindowLine(char c = '-') - { - string line = new string(c, Console.WindowWidth); - WriteLine(line); - } - - /// - /// Builds a string repeating the specified character and having the length equal to the width of the console's buffer. - /// - public static string BuildHorizontalBufferLine(char c = '-') => new string(' ', Console.BufferWidth); - - public static void WriteHorizontalBufferLine(char c = '-') - { - string line = new string(c, Console.BufferWidth); - WriteLine(line); - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs index 2d0c37b2..131c5d79 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs @@ -30,9 +30,9 @@ public static void WriteEmphasies(string text) ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.ForegroundColor = EmphasiesColor; - if (EmphasiesBackgroundColor.HasValue) - Console.BackgroundColor = EmphasiesBackgroundColor.Value; + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; Console.Write(text); @@ -45,9 +45,9 @@ public static void WriteEmphasies(string format, params object[] arg) ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.ForegroundColor = EmphasiesColor; - if (EmphasiesBackgroundColor.HasValue) - Console.BackgroundColor = EmphasiesBackgroundColor.Value; + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; Console.Write(format, arg); @@ -60,9 +60,9 @@ public static void WriteEmphasies(object o) ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.ForegroundColor = EmphasiesColor; - if (EmphasiesBackgroundColor.HasValue) - Console.BackgroundColor = EmphasiesBackgroundColor.Value; + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; Console.Write(o); @@ -75,9 +75,9 @@ public static void WriteLineEmphasies(string text) ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.ForegroundColor = EmphasiesColor; - if (EmphasiesBackgroundColor.HasValue) - Console.BackgroundColor = EmphasiesBackgroundColor.Value; + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; Console.WriteLine(text); @@ -90,9 +90,9 @@ public static void WriteLineEmphasies(string format, params object[] arg) ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.ForegroundColor = EmphasiesColor; - if (EmphasiesBackgroundColor.HasValue) - Console.BackgroundColor = EmphasiesBackgroundColor.Value; + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; Console.WriteLine(format, arg); @@ -105,9 +105,9 @@ public static void WriteLineEmphasies(object o) ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.ForegroundColor = EmphasiesColor; - if (EmphasiesBackgroundColor.HasValue) - Console.BackgroundColor = EmphasiesBackgroundColor.Value; + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; Console.WriteLine(o); @@ -126,9 +126,9 @@ public static void WithEmphasiesColors(Action action) ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.ForegroundColor = EmphasiesColor; - if (EmphasiesBackgroundColor.HasValue) - Console.BackgroundColor = EmphasiesBackgroundColor.Value; + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; try { @@ -152,10 +152,10 @@ public static T WithEmphasiesColors(Func func) ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.ForegroundColor = EmphasiesColor; + Console.ForegroundColor = EmphasizedColor; - if (EmphasiesBackgroundColor.HasValue) - Console.BackgroundColor = EmphasiesBackgroundColor.Value; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; try { diff --git a/sources/ConsoleTools/ConsoleTools/HorizontalLine.cs b/sources/ConsoleTools/ConsoleTools/HorizontalLine.cs index 4a110e17..dda6d074 100644 --- a/sources/ConsoleTools/ConsoleTools/HorizontalLine.cs +++ b/sources/ConsoleTools/ConsoleTools/HorizontalLine.cs @@ -54,7 +54,7 @@ public HorizontalLine() } /// - /// Displays the horixontal line. + /// Displays the horizontal line. /// protected override void DoDisplayContent(ControlDisplay display) { @@ -97,5 +97,15 @@ public static void QuickDisplay(char character, ConsoleColor foregroundColor) }; horizontalLine.Display(); } + + /// + /// Builds a string repeating the specified character and having the length equal to the width of the console's window. + /// + public static string WindowAsString(char c = '-') => new string(c, Console.WindowWidth); + + /// + /// Builds a string repeating the specified character and having the length equal to the width of the console's buffer. + /// + public static string BufferAsString(char c = '-') => new string(c, Console.BufferWidth); } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs index cc765f2b..f019c8e2 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs @@ -42,7 +42,7 @@ public class ListView : BlockControl public TextBlock Label { get; set; } = new TextBlock { Margin = "0 0 0 1", - ForegroundColor = CustomConsole.EmphasiesColor + ForegroundColor = CustomConsole.EmphasizedColor }; /// diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs index dfae61e6..459e7bca 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs @@ -39,7 +39,7 @@ public class ValueView : BlockControl /// public InlineTextBlock Label { get; set; } = new InlineTextBlock { - ForegroundColor = CustomConsole.EmphasiesColor, + ForegroundColor = CustomConsole.EmphasizedColor, MarginRight = 1 }; diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs index c5ebccc6..f3ce5782 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs @@ -31,7 +31,7 @@ public class YesNoQuestion : BlockControl { private readonly Label labelControl = new Label { - ForegroundColor = CustomConsole.EmphasiesColor + ForegroundColor = CustomConsole.EmphasizedColor }; /// diff --git a/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs b/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs index 656b925d..20f0a133 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs @@ -64,7 +64,7 @@ public class TextMenu : ErasableControl, IRepeatableSupport { Text = TextMenuResources.QuestionText, TextFormat = "{0}:", - ForegroundColor = CustomConsole.EmphasiesColor, + ForegroundColor = CustomConsole.EmphasizedColor, MarginRight = 1 }; diff --git a/sources/ConsoleTools/ConsoleTools/Themes/DefaultColorTheme.cs b/sources/ConsoleTools/ConsoleTools/Themes/DefaultColorTheme.cs new file mode 100644 index 00000000..f31f9f98 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools/Themes/DefaultColorTheme.cs @@ -0,0 +1,27 @@ +using System; +using System.Linq; + +namespace DustInTheWind.ConsoleTools.Themes +{ + public class DefaultColorTheme : IColorTheme + { + private readonly TextType[] textTypes; + + public DefaultColorTheme() + { + textTypes = new[] { + new TextType(DefaultTextType.Normal, Console.ForegroundColor, Console.BackgroundColor), + new TextType(DefaultTextType.Inverted, Console.BackgroundColor, Console.ForegroundColor), + new TextType(DefaultTextType.Emphasized, ConsoleColor.White, null), + new TextType(DefaultTextType.Success, ConsoleColor.Green, null), + new TextType(DefaultTextType.Warning, ConsoleColor.Yellow, null), + new TextType(DefaultTextType.Error, ConsoleColor.Red, null) + }; + } + + public TextType this[string id] + { + get { return textTypes.FirstOrDefault(x => x.Id == id); } + } + } +} diff --git a/sources/ConsoleTools/ConsoleTools/Themes/DefaultTextType.cs b/sources/ConsoleTools/ConsoleTools/Themes/DefaultTextType.cs new file mode 100644 index 00000000..14dd2910 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools/Themes/DefaultTextType.cs @@ -0,0 +1,12 @@ +namespace DustInTheWind.ConsoleTools.Themes +{ + public static class DefaultTextType + { + public const string Normal = "normal"; + public const string Inverted = "inverted"; + public const string Emphasized = "emphasized"; + public const string Success = "success"; + public const string Warning = "warning"; + public const string Error = "error"; + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Themes/IColorTheme.cs b/sources/ConsoleTools/ConsoleTools/Themes/IColorTheme.cs new file mode 100644 index 00000000..c054e9e9 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools/Themes/IColorTheme.cs @@ -0,0 +1,69 @@ +using System; + +namespace DustInTheWind.ConsoleTools.Themes +{ + public interface IColorTheme + { + ///// + ///// Gets or sets the color used to write Normal text. + ///// If the color is null, default color is used. + ///// + //ConsoleColor? NormalColor { get; } + + ///// + ///// Gets the background color used to write Emphasis messages. + ///// If the color is null, default background color is used. + ///// + //ConsoleColor? NormalBackgroundColor { get; } + + ///// + ///// Gets the color used to write Emphasized messages. + ///// If the color is null, default color is used. + ///// + //ConsoleColor? EmphasizedColor { get; } + + ///// + ///// Gets the background color used to write Emphasis messages. + ///// If the color is null, default background color is used. + ///// + //ConsoleColor? EmphasizedBackgroundColor { get; } + + ///// + ///// Gets the color used to write Success messages. + ///// If the color is null, default color is used. + ///// + //ConsoleColor? SuccessColor { get; } + + ///// + ///// Gets the background color used to write Success messages. + ///// If the color is null, default background color is used. + ///// + //ConsoleColor? SuccessBackgroundColor { get; } + + ///// + ///// Gets the color used to write Warning messages. + ///// If the color is null, default color is used. + ///// + //ConsoleColor? WarningColor { get; } + + ///// + ///// Gets the background color used to write Warning messages. + ///// If the color is null, default background color is used. + ///// + //ConsoleColor? WarningBackgroundColor { get; } + + ///// + ///// Gets the color used to write Error messages. + ///// If the color is null, default color is used. + ///// + //ConsoleColor? ErrorColor { get; } + + ///// + ///// Gets the background color used to write Error messages. + ///// If the color is null, default background color is used. + ///// + //ConsoleColor? ErrorBackgroundColor { get; } + + TextType this[string id] { get; } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Themes/TextType.cs b/sources/ConsoleTools/ConsoleTools/Themes/TextType.cs new file mode 100644 index 00000000..91c5d876 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools/Themes/TextType.cs @@ -0,0 +1,18 @@ +using System; + +namespace DustInTheWind.ConsoleTools.Themes +{ + public class TextType + { + public string Id { get; } + public ConsoleColor? ForegroundColor { get; } + public ConsoleColor? BackgroundColor { get; } + + public TextType(string id, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) + { + Id = id ?? throw new ArgumentNullException(nameof(id)); + ForegroundColor = foregroundColor; + BackgroundColor = backgroundColor; + } + } +} \ No newline at end of file From 7157f7d830d8a3c5c16e937172b0740aa295251b Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 5 Jan 2020 00:15:56 +0200 Subject: [PATCH 08/57] updated the version to 0.5.3 --- doc/changelog.txt | 16 ++++++---------- nuget/ConsoleTools.nuspec | 6 +++--- release/build.bat | 2 +- sources/ConsoleTools/AssemblyInfo.Shared.cs | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index fe52f9cd..cf491ed1 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -3,17 +3,13 @@ ConsoleTools Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -ver 0.6.0 +ver 0.5.3 --------- -- Control: Added the DefaultParent property. -- Control: ShowCursor renamed to CursorVisibility and made it nullable. -- BlockControl: Changed the signature of the DoDisplayContent method. -- HorizontalLine: Created the HorizontalLine control. -- TextBlock: Removed the MarginLeft, MarginTop, MarginRight, MarginBottom properties. -- Pause: Implemented left and right margins and paddings. -- LabelMenuItem: Removed the HighlightType property. -- ScrollMenu: Removed the ItemsHighlightType property. -- Prompter: PrompterText was removed. Instead were added Text and TextFormat both of type string. +- YesNoQuestion: Added foreground and background color for the question text in the YesNoQuestion control. + +ver 0.5.2 +--------- +- double target: net core and net framework. ver 0.5.1 --------- diff --git a/nuget/ConsoleTools.nuspec b/nuget/ConsoleTools.nuspec index c3275888..47eab9f4 100644 --- a/nuget/ConsoleTools.nuspec +++ b/nuget/ConsoleTools.nuspec @@ -2,7 +2,7 @@ ConsoleTools - 0.5.1 + 0.5.3 Dust in the Wind ConsoleTools Dust in the Wind @@ -11,8 +11,8 @@ false A set of tools and "controls" for the .net Console. It contains: List Input/Output Controls, Text Input/Output Controls, Progress Bar, Spinner, Data Table, Prompter, Menus, etc. A set of tools and "controls" for the .net Console. - Fixed incorrect throw of out of range exception when setting the MaxValue property. - Copyright 2017-2018 Dust in the Wind + Added foreground and background color for the question text in the YesNoQuestion control. + Copyright 2017-2020 Dust in the Wind console cli prompter menu progressbar spinner table read write textblock inlinetextblock blockcontrol, inlinecontrol diff --git a/release/build.bat b/release/build.bat index cfa81632..bd898ed0 100644 --- a/release/build.bat +++ b/release/build.bat @@ -1,7 +1,7 @@ @echo off set root_directory=.. -set version=0.5.1 +set version=0.5.3 rem ---------------------------------------------------------------------------------------------------- diff --git a/sources/ConsoleTools/AssemblyInfo.Shared.cs b/sources/ConsoleTools/AssemblyInfo.Shared.cs index 531203b1..127403bb 100644 --- a/sources/ConsoleTools/AssemblyInfo.Shared.cs +++ b/sources/ConsoleTools/AssemblyInfo.Shared.cs @@ -39,5 +39,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.5.1.*")] +[assembly: AssemblyVersion("0.5.3.*")] //[assembly: AssemblyFileVersion("1.0.0.*")] \ No newline at end of file From 40b90c2160324a7928adae98eb435c9c5eede540 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Thu, 23 Jan 2020 22:30:58 +0200 Subject: [PATCH 09/57] added a gitattributes file --- .gitattributes | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..1ff0c423 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain From 2aa220942fe6b22058107dc8b72d9eae626469cc Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Fri, 24 Jan 2020 08:13:10 +0200 Subject: [PATCH 10/57] added the application header control. --- .../ConsoleTools/ApplicationHeader.cs | 104 ++++++++++++++++++ .../ConsoleTools/ApplicationInformation.cs | 52 +++++++++ .../InputControls/YesNoQuestion.cs | 2 +- 3 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs create mode 100644 sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs diff --git a/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs new file mode 100644 index 00000000..4450bd08 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs @@ -0,0 +1,104 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Reflection; +using System.Text; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Displays a header containing the application's name and version. + /// + public class ApplicationHeader : BlockControl + { + private readonly ApplicationInformation applicationInformation; + + /// + /// Gets or sets the title to be displayed in the header. + /// If null, the value of the attribute will be displayed + /// taken from the entry assembly. + /// If the attribute is absent, only the version will be displayed. + /// + public string Title { get; set; } + + /// + /// Gets or sets a value that specifies if the version of the application should be displayed + /// after the title. + /// Default value: true + /// + public bool ShowVersion { get; set; } = true; + + /// + /// Gets or sets a value that specifies if a separator line below the title + /// should be displayed. + /// Default value: true + /// + public bool ShowSeparator { get; set; } = true; + + /// + /// Initializes a new instance of the class. + /// + public ApplicationHeader() + : this(null) + { + } + + /// + /// Initializes a new instance of the class + /// with a custom title text. + /// + public ApplicationHeader(string title) + { + applicationInformation = new ApplicationInformation(); + Title = title ?? applicationInformation.GetProductName(); + + Margin = "0 0 0 1"; + } + + protected override void DoDisplayContent(ControlDisplay display) + { + string title = Title ?? applicationInformation.GetProductName(); + Version version = applicationInformation.GetVersion(); + + StringBuilder titleRowText = new StringBuilder(); + + if (title != null) + titleRowText.Append(string.Format("{0} {1}", Title, version.ToString(3))); + + if (ShowVersion) + { + if (titleRowText.Length > 0) + titleRowText.Append(" "); + + titleRowText.Append(version.ToString(3)); + } + + + display.StartRow(); + display.Write(titleRowText.ToString()); + Console.WriteLine(); + + if (ShowSeparator) + display.WriteRow(new string('=', Console.WindowWidth - 1)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs b/sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs new file mode 100644 index 00000000..00d7f785 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs @@ -0,0 +1,52 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Linq; +using System.Reflection; + +namespace DustInTheWind.ConsoleTools +{ + internal class ApplicationInformation + { + private readonly Assembly assembly; + + public ApplicationInformation() + { + assembly = Assembly.GetEntryAssembly(); + } + + public Version GetVersion() + { + AssemblyName assemblyName = assembly.GetName(); + return assemblyName.Version; + } + + public string GetProductName() + { + AssemblyProductAttribute assemblyProductAttribute = assembly.GetCustomAttributes(typeof(AssemblyProductAttribute)) + .Cast() + .FirstOrDefault(); + + return assemblyProductAttribute?.Product; + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs index 43e6d444..15d37297 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs @@ -37,7 +37,7 @@ public class YesNoQuestion : BlockControl /// /// Gets or sets the foreground color used for displaying the question. /// - public ConsoleColor? QuestionForegroundColor { get; set; } = CustomConsole.EmphasiesColor; + public ConsoleColor? QuestionForegroundColor { get; set; } = CustomConsole.EmphasizedColor; /// /// Gets or sets the background color used for displaying the question. From d5c44a9a96473617fab6e973eae413a3cc4a1b77 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Thu, 30 Jan 2020 14:28:21 +0200 Subject: [PATCH 11/57] added the mvc project --- doc/changelog.txt | 4 +- .../ConsoleTools/ConsoleTools.Mvc/Argument.cs | 42 +++++ .../ConsoleTools.Mvc/Arguments.cs | 76 ++++++++ .../ConsoleApplicationBase.cs | 169 ++++++++++++++++++ .../ConsoleFrameworkException.cs | 44 +++++ .../ConsoleTools.Mvc/ConsoleTools.Mvc.csproj | 19 ++ .../ConsoleTools/ConsoleTools.Mvc/IUseCase.cs | 29 +++ .../Properties/AssemblyInfo.cs | 39 ++++ .../ConsoleTools.Mvc/UseCaseCollection.cs | 93 ++++++++++ .../ConsoleTools.Mvc/UseCaseCollectionItem.cs | 37 ++++ .../ConsoleTools.Mvc/UseCases/HelpUseCase.cs | 60 +++++++ .../UserControls/ApplicationFooter.cs | 32 ++++ .../UserControls/UsageControl.cs | 45 +++++ sources/ConsoleTools/ConsoleTools.sln | 18 +- .../ConsoleTools/ApplicationHeader.cs | 31 +++- .../ConsoleTools/TitleDisplayEventArgs.cs | 35 ++++ 16 files changed, 766 insertions(+), 7 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Mvc.csproj create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs create mode 100644 sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs diff --git a/doc/changelog.txt b/doc/changelog.txt index 85acfc98..0681a100 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -5,7 +5,9 @@ Note: For any bug or feature request please add a new issue on GitHub: https://g ver 0.7.0 --------- -- CustomConsole - removed the methods building and writing a horizontal line. +- CustomConsole - removed the methods for building and writing a horizontal line. +- ApplicationHeader: Added new control. +- Added the MVC project. ver 0.6.0 --------- diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs new file mode 100644 index 00000000..3c39f1c2 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs @@ -0,0 +1,42 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools.Mvc +{ + public class Argument + { + public string Name { get; } + public string Value { get; } + + public Argument(string name) + : this(name, null) + { + } + + public Argument(string name, string value) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Value = value; + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs new file mode 100644 index 00000000..5f5faba1 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs @@ -0,0 +1,76 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.Mvc +{ + public class Arguments + { + public string Command { get; } + + public List Values { get; } = new List(); + public int Count => Values.Count; + + public string this[int index] => Values[index]?.Value ?? Values[index]?.Name; + + public Arguments(IReadOnlyList args) + { + if (args == null || args.Count == 0) + return; + + Command = args[0]; + + string previousName = null; + + for (int i = 1; i < args.Count; i++) + { + string arg = args[i]; + + if (arg == null) + continue; + + bool isNewArgument = arg.StartsWith("-"); + + if (isNewArgument) + { + if (previousName != null) + Values.Add(new Argument(previousName, null)); + + previousName = arg.TrimStart('-'); + } + else + { + if (previousName != null) + { + Values.Add(new Argument(previousName, arg)); + + previousName = null; + } + else + { + Values.Add(new Argument(arg, null)); + } + } + } + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs new file mode 100644 index 00000000..c163af84 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs @@ -0,0 +1,169 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using DustInTheWind.ConsoleTools.Mvc.UseCases; +using DustInTheWind.ConsoleTools.Mvc.UserControls; +using DustInTheWind.ConsoleTools.Spinners; + +namespace DustInTheWind.ConsoleTools.Mvc +{ + public abstract class ConsoleApplicationBase + { + private readonly IServiceProvider serviceProvider; + + private readonly ApplicationHeader applicationHeader; + private readonly UseCaseCollection useCases; + private readonly ApplicationFooter applicationFooter; + + public bool ShowHeader { get; set; } = true; + + public bool ShowFooter { get; set; } + + public bool UseSpinner { get; set; } + + public bool PauseOnExit { get; set; } + + protected ConsoleApplicationBase() + { + serviceProvider = CreateServiceProvider(); + + applicationHeader = CreateApplicationHeader(); + ConfigureApplicationHeader(applicationHeader); + + applicationFooter = CreateApplicationFooter(); + ConfigureApplicationFooter(applicationFooter); + + useCases = CreateUseCaseCollection() ?? new UseCaseCollection(); + CreateUseCases(useCases); + } + + protected abstract IServiceProvider CreateServiceProvider(); + + protected virtual ApplicationHeader CreateApplicationHeader() + { + return new ApplicationHeader(); + } + + protected virtual void ConfigureApplicationHeader(ApplicationHeader header) + { + } + + protected virtual ApplicationFooter CreateApplicationFooter() + { + return new ApplicationFooter(); + } + + protected virtual void ConfigureApplicationFooter(ApplicationFooter footer) + { + } + + protected virtual UseCaseCollection CreateUseCaseCollection() + { + return new UseCaseCollection(); + } + + protected virtual void CreateUseCases(UseCaseCollection useCaseCollection) + { + UseCaseCollectionItem helpUseCaseItem = CreateHelpCommand(); + + if (helpUseCaseItem != null) + useCases.Add(helpUseCaseItem); + + Assembly currentAssembly = Assembly.GetExecutingAssembly(); + + IEnumerable assemblies = AppDomain.CurrentDomain.GetAssemblies() + .Where(x => x != currentAssembly); + + foreach (Assembly assembly in assemblies) + { + IEnumerable useCasesTypes = assembly.GetTypes() + .Where(x => typeof(IUseCase).IsAssignableFrom(x) && !x.IsInterface && !x.IsAbstract); + + foreach (Type useCasesType in useCasesTypes) + { + string name = useCasesType.Name.EndsWith("UseCase", StringComparison.InvariantCultureIgnoreCase) + ? useCasesType.Name.Substring(0, useCasesType.Name.Length - "UseCase".Length).ToLower() + : useCasesType.Name; + + IUseCase useCase = serviceProvider.GetService(useCasesType) as IUseCase; + + useCaseCollection.Add(name, useCase); + } + } + } + + protected virtual UseCaseCollectionItem CreateHelpCommand() + { + HelpUseCase helpUseCase = new HelpUseCase(useCases); + return new UseCaseCollectionItem("help", helpUseCase); + } + + public void Run(string[] args) + { + try + { + OnStart(); + + if (ShowHeader) + applicationHeader?.Display(); + + Arguments arguments = new Arguments(args); + IUseCase useCase = useCases.SelectCommand(arguments.Command); + + if (UseSpinner) + Spinner.Run(() => useCase.Execute(arguments)); + else + useCase.Execute(arguments); + } + catch (Exception ex) + { + OnError(ex); + } + finally + { + OnExit(); + + if (ShowFooter) + applicationFooter?.Display(); + + if (PauseOnExit) + Pause.QuickDisplay(); + } + } + + protected virtual void OnStart() + { + } + + protected virtual void OnExit() + { + } + + protected virtual void OnError(Exception ex) + { + CustomConsole.WriteLineError(ex); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs new file mode 100644 index 00000000..9e888a5f --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs @@ -0,0 +1,44 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Runtime.Serialization; + +namespace DustInTheWind.ConsoleTools.Mvc +{ + public class ConsoleFrameworkException : Exception + { + public ConsoleFrameworkException(string message) + : base(message) + { + } + + public ConsoleFrameworkException(string message, Exception innerException) + : base(message, innerException) + { + } + + protected ConsoleFrameworkException(SerializationInfo serializationInfo, StreamingContext streamingContext) + : base(serializationInfo, streamingContext) + { + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Mvc.csproj b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Mvc.csproj new file mode 100644 index 00000000..830615eb --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Mvc.csproj @@ -0,0 +1,19 @@ + + + + netcoreapp2.2;net45 + DustInTheWind.ConsoleTools.Mvc + DustInTheWind.ConsoleTools.Mvc + false + false + + + + + + + + + + + diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs new file mode 100644 index 00000000..844b8f4b --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs @@ -0,0 +1,29 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Mvc +{ + public interface IUseCase + { + string Description { get; } + void Execute(Arguments arguments); + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..faf0871e --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs @@ -0,0 +1,39 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DustInTheWind.ConsoleTools.Mvc")] +[assembly: AssemblyDescription("This is a framework to help you structure the presentation layer of a Console Application. Similar to ASP.NET MVC.")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0D02363D-1057-46C1-B0F5-C9D7E40B3348")] \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs new file mode 100644 index 00000000..9c8827bd --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs @@ -0,0 +1,93 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using DustInTheWind.ConsoleTools.Mvc.UseCases; + +namespace DustInTheWind.ConsoleTools.Mvc +{ + public class UseCaseCollection : Collection + { + public void Add(string key, IUseCase useCase) + { + Add(new UseCaseCollectionItem(key, useCase)); + } + + protected override void InsertItem(int index, UseCaseCollectionItem item) + { + if (this.Any(x => x.Key == item.Key)) + throw new ArgumentException("There is another use case with the same key.", nameof(item.Key)); + + base.InsertItem(index, item); + } + + public bool Contains(string commandKey) + { + return commandKey != null && this.Any(x => x.Key == commandKey); + } + + public bool Contains(IUseCase useCase) + { + return useCase != null && this.Any(x => x.UseCase == useCase); + } + + public IUseCase SelectCommand(string commandName) + { + IUseCase useCase; + + if (string.IsNullOrEmpty(commandName)) + { + useCase = Items + .Select(x => x.UseCase) + .OfType() + .FirstOrDefault(); + + if (useCase == null) + throw new ConsoleFrameworkException("Please provide a use case name to execute."); + } + else + { + if (!Contains(commandName)) + throw new ConsoleFrameworkException("Invalid use case."); + + useCase = this[commandName]; + } + + return useCase; + } + + public IUseCase this[string commandKey] + { + get + { + if (commandKey == null) + return null; + + return Items + .Where(x => x.Key == commandKey) + .Select(x => x.UseCase) + .FirstOrDefault(); + } + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs new file mode 100644 index 00000000..c94aa60b --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs @@ -0,0 +1,37 @@ +// // ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools.Mvc +{ + public class UseCaseCollectionItem + { + public string Key { get; } + public IUseCase UseCase { get; } + + public UseCaseCollectionItem(string key, IUseCase useCase) + { + Key = key ?? throw new ArgumentNullException(nameof(key)); + UseCase = useCase ?? throw new ArgumentNullException(nameof(useCase)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs new file mode 100644 index 00000000..71daa3a4 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs @@ -0,0 +1,60 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; +using System.Linq; +using DustInTheWind.ConsoleTools.Mvc.UserControls; + +namespace DustInTheWind.ConsoleTools.Mvc.UseCases +{ + public class HelpUseCase : IUseCase + { + private readonly UseCaseCollection useCaseCollection; + + public string Description => "Displays information about the available commands."; + + public HelpUseCase(UseCaseCollection useCaseCollection) + { + this.useCaseCollection = useCaseCollection ?? throw new ArgumentNullException(nameof(useCaseCollection)); + } + + public void Execute(Arguments arguments) + { + IEnumerable> commandsGrouped = useCaseCollection.GroupBy(x => x.UseCase); + + UsageControl usageControl = new UsageControl + { + CommandNames = commandsGrouped + .Select(GetCommandNames) + .ToList() + }; + + usageControl.Display(); + } + + private static string GetCommandNames(IEnumerable group) + { + IEnumerable commandNames = group.Select(x => x.Key); + return string.Join(", ", commandNames); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs new file mode 100644 index 00000000..14d7e2f8 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs @@ -0,0 +1,32 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Mvc.UserControls +{ + public class ApplicationFooter + { + public void Display() + { + CustomConsole.WriteLine(); + CustomConsole.WriteLineSuccess("Bye!"); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs new file mode 100644 index 00000000..ae2a10fe --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs @@ -0,0 +1,45 @@ +// // ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.Mvc.UserControls +{ + internal class UsageControl + { + public IList CommandNames { get; set; } + + + public void Display() + { + if (CommandNames == null) + return; + + Console.WriteLine("Usage:"); + + foreach (string commandName in CommandNames) + { + Console.WriteLine(commandName); + } + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index 06133e53..7eb09c65 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27703.2047 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools", "ConsoleTools\ConsoleTools.csproj", "{E43718E9-3B14-4FCB-B47E-34460E817824}" EndProject @@ -37,6 +37,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.WriteText EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Tables", "ConsoleTools.Tables\ConsoleTools.Tables.csproj", "{08C40188-94F1-47EE-AAAA-08A372BCA026}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Mvc", "ConsoleTools.Mvc\ConsoleTools.Mvc.csproj", "{34D944CA-0276-4412-8387-58414E2F5631}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -239,6 +241,18 @@ Global {08C40188-94F1-47EE-AAAA-08A372BCA026}.Release-Net452|Any CPU.Build.0 = Release|Any CPU {08C40188-94F1-47EE-AAAA-08A372BCA026}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU {08C40188-94F1-47EE-AAAA-08A372BCA026}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Debug-Net452|Any CPU.ActiveCfg = Debug|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Debug-Net452|Any CPU.Build.0 = Debug|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Debug-Net461|Any CPU.ActiveCfg = Debug|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Debug-Net461|Any CPU.Build.0 = Debug|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Release|Any CPU.Build.0 = Release|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Release-Net452|Any CPU.ActiveCfg = Release|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Release-Net452|Any CPU.Build.0 = Release|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {34D944CA-0276-4412-8387-58414E2F5631}.Release-Net461|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs index 4450bd08..003612e9 100644 --- a/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs @@ -53,6 +53,12 @@ public class ApplicationHeader : BlockControl /// Default value: true /// public bool ShowSeparator { get; set; } = true; + + /// + /// Event raised before the title is displayed. + /// It allows to alter the title before it is displayed. + /// + public event EventHandler TitleDisplay; /// /// Initializes a new instance of the class. @@ -74,15 +80,20 @@ public ApplicationHeader(string title) Margin = "0 0 0 1"; } + /// + /// This method actually displays the header. + /// Can be overwritten in order to fully control what is displayed. + /// + /// This instance can be used in order to interact with the console. protected override void DoDisplayContent(ControlDisplay display) { - string title = Title ?? applicationInformation.GetProductName(); Version version = applicationInformation.GetVersion(); StringBuilder titleRowText = new StringBuilder(); + string title = BuildTitle(); if (title != null) - titleRowText.Append(string.Format("{0} {1}", Title, version.ToString(3))); + titleRowText.Append(title); if (ShowVersion) { @@ -91,8 +102,7 @@ protected override void DoDisplayContent(ControlDisplay display) titleRowText.Append(version.ToString(3)); } - - + display.StartRow(); display.Write(titleRowText.ToString()); Console.WriteLine(); @@ -100,5 +110,18 @@ protected override void DoDisplayContent(ControlDisplay display) if (ShowSeparator) display.WriteRow(new string('=', Console.WindowWidth - 1)); } + + private string BuildTitle() + { + TitleDisplayEventArgs titleDisplayEventArgs = new TitleDisplayEventArgs(Title); + OnTitleDisplay(titleDisplayEventArgs); + + return titleDisplayEventArgs.Title; + } + + protected virtual void OnTitleDisplay(TitleDisplayEventArgs e) + { + TitleDisplay?.Invoke(this, e); + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs b/sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs new file mode 100644 index 00000000..5caad61d --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs @@ -0,0 +1,35 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/newusing System; + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public class TitleDisplayEventArgs : EventArgs + { + public string Title { get; set; } + + public TitleDisplayEventArgs(string title) + { + Title = title; + } + } +} \ No newline at end of file From 6b6171662e43925815cc38341b54314c73fbfa59 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Fri, 6 Mar 2020 17:59:07 +0200 Subject: [PATCH 12/57] added the ICliCommand interface. --- ...ols.Mvc.csproj => ConsoleTools.Cli.csproj} | 0 .../ConsoleTools.Mvc/UseCases/CliCommand.cs | 30 +++++++++++++++++ .../ConsoleTools.Mvc/UseCases/ICliCommand.cs | 30 +++++++++++++++++ .../ConsoleTools.Mvc/UseCases/RelayUseCase.cs | 32 +++++++++++++++++++ sources/ConsoleTools/ConsoleTools.sln | 2 +- 5 files changed, 93 insertions(+), 1 deletion(-) rename sources/ConsoleTools/ConsoleTools.Mvc/{ConsoleTools.Mvc.csproj => ConsoleTools.Cli.csproj} (100%) create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Mvc.csproj b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Mvc.csproj rename to sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs new file mode 100644 index 00000000..b1d1f01f --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs @@ -0,0 +1,30 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Mvc.UseCases +{ + public class CliCommand : ICliCommand + { + public string Description { get; } + + public IUseCase UseCase { get; set; } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs new file mode 100644 index 00000000..86be9d15 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs @@ -0,0 +1,30 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Mvc.UseCases +{ + public interface ICliCommand + { + string Description { get; } + + IUseCase UseCase { get; set; } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs new file mode 100644 index 00000000..b3512340 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs @@ -0,0 +1,32 @@ +// ConsoleTools +// Copyright (C) 2017-2018 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Mvc.UseCases +{ + public class RelayUseCase : IUseCase + { + public string Description { get; } + + public void Execute(Arguments arguments) + { + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index 7eb09c65..2585d3bf 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -37,7 +37,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.WriteText EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Tables", "ConsoleTools.Tables\ConsoleTools.Tables.csproj", "{08C40188-94F1-47EE-AAAA-08A372BCA026}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Mvc", "ConsoleTools.Mvc\ConsoleTools.Mvc.csproj", "{34D944CA-0276-4412-8387-58414E2F5631}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Cli", "ConsoleTools.Mvc\ConsoleTools.Cli.csproj", "{34D944CA-0276-4412-8387-58414E2F5631}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution From d2e669ab7a5b564fafa9e3bce06aa231bf01a5d7 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sat, 7 Mar 2020 09:29:32 +0200 Subject: [PATCH 13/57] updated the copyright year. --- sources/ConsoleTools/AssemblyInfo.Shared.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs | 2 +- .../ConsoleTools.Demo.Guard/Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Demo.HorizontalLineDemo/CommandBase.cs | 2 +- .../Commands/AlignedCenterCommand.cs | 2 +- .../Commands/AlignedRightCommand.cs | 2 +- .../Commands/CustomBackgroundColorCommand.cs | 2 +- .../Commands/CustomCharCommand.cs | 2 +- .../Commands/CustomForegroundColorCommand.cs | 2 +- .../Commands/CustomMarginCommand.cs | 2 +- .../Commands/CustomPaddingCommand.cs | 2 +- .../Commands/CustomWidthCommand.cs | 2 +- .../Commands/DefaultCommand.cs | 2 +- .../ConsoleTools.Demo.HorizontalLineDemo/Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Demo.InputControlsDemo/Commands/ExitCommand.cs | 2 +- .../Commands/ListReadNumbersCommand.cs | 2 +- .../Commands/ListReadQuickCommand.cs | 2 +- .../Commands/ListReadStringsCommand.cs | 2 +- .../Commands/ListReadWithCustomParserCommand.cs | 2 +- .../Commands/ListWriteCommand.cs | 2 +- .../Commands/ListWriteQuickCommand.cs | 2 +- .../Commands/ValueReadCommand.cs | 2 +- .../Commands/ValueReadNumberCommand.cs | 2 +- .../Commands/ValueReadQuickCommand.cs | 2 +- .../Commands/ValueReadWithDefaultValueCommand.cs | 2 +- .../Commands/ValueWriteCommand.cs | 2 +- .../Commands/ValueWriteQuickCommand.cs | 2 +- .../Commands/YesNoCancelCommand.cs | 2 +- .../Commands/YesNoCommand.cs | 2 +- .../ConsoleTools.Demo.InputControlsDemo/MainMenu.cs | 2 +- .../ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs | 2 +- .../ConsoleTools.Demo.Musical/Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/CommandBase.cs | 2 +- .../Commands/BackgroundColorCommand.cs | 2 +- .../Commands/CustomMarginsCommand.cs | 2 +- .../Commands/CustomPaddingsCommand.cs | 2 +- .../Commands/CustomUnlockKeyCommand.cs | 2 +- .../ConsoleTools.Demo.PauseDemo/Commands/DefaultCommand.cs | 2 +- .../Commands/ErasablePauseCommand.cs | 2 +- .../Commands/ForegroundColorCommand.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/DummyText.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs | 2 +- .../ConsoleTools.Demo.PauseDemo/Properties/AssemblyInfo.cs | 2 +- .../BusinessLayer/DataProcessingJob.cs | 2 +- .../ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobBase.cs | 2 +- .../ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobState.cs | 2 +- .../PresentationLayer/DataProcessingView.cs | 2 +- .../ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs | 2 +- .../ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs | 2 +- .../ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs | 2 +- .../ConsoleTools.Demo.PrompterDemo/Commands/WhaleCommand.cs | 2 +- .../ConsoleTools/ConsoleTools.Demo.PrompterDemo/Ocean/Whale.cs | 2 +- .../ConsoleTools.Demo.PrompterDemo/Ocean/WhaleProvider.cs | 2 +- .../ConsoleTools.Demo.PrompterDemo/OceanPrompter.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs | 2 +- .../ConsoleTools.Demo.PrompterDemo/Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Demo.ScrollMenuDemo/ApplicationBase.cs | 2 +- .../ConsoleTools.Demo.ScrollMenuDemo/Commands/CreditsCommand.cs | 2 +- .../ConsoleTools.Demo.ScrollMenuDemo/Commands/ExitCommand.cs | 2 +- .../Commands/LoadGameCommand.cs | 2 +- .../ConsoleTools.Demo.ScrollMenuDemo/Commands/NewGameCommand.cs | 2 +- .../Commands/SaveGameCommand.cs | 2 +- .../Commands/SettingsCommand.cs | 2 +- .../ConsoleTools.Demo.ScrollMenuDemo/GameApplication.cs | 2 +- .../ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/GameBoard.cs | 2 +- .../ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/MainMenu.cs | 2 +- .../ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs | 2 +- .../ConsoleTools.Demo.ScrollMenuDemo/Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Demo.SpinnerDemo/Commands/BoomerangCommand.cs | 2 +- .../ConsoleTools.Demo.SpinnerDemo/Commands/BubbleCommand.cs | 2 +- .../ConsoleTools.Demo.SpinnerDemo/Commands/ExitCommand.cs | 2 +- .../ConsoleTools.Demo.SpinnerDemo/Commands/FanCommand.cs | 2 +- .../Commands/FillBlock10Command.cs | 2 +- .../Commands/FillEmptyFromEndCommand.cs | 2 +- .../Commands/FillEmptyFromStartCommand.cs | 2 +- .../Commands/FillSuddenEmptyCommand.cs | 2 +- .../Commands/FillWithBordersCommand.cs | 2 +- .../Commands/HalfBlockVerticalCommand.cs | 2 +- .../Commands/HalhBlockSpinCommand.cs | 2 +- .../ConsoleTools.Demo.SpinnerDemo/Commands/StickCommand.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/MainMenu.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs | 2 +- .../ConsoleTools.Demo.SpinnerDemo/Properties/AssemblyInfo.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs | 2 +- .../Commands/CellPaddingCommand.cs | 2 +- .../Commands/DoubleLineBorderCommand.cs | 2 +- .../Commands/DrawLinesBetweenRowsCommand.cs | 2 +- .../ConsoleTools.Demo.TabularData/Commands/ExitDemoCommand.cs | 2 +- .../Commands/LongShortTitleCommand.cs | 2 +- .../Commands/MultilineCellCommand.cs | 2 +- .../Commands/MultilineTitleCommand.cs | 2 +- .../Commands/SimpleBorderCommand.cs | 2 +- .../Commands/SingleLineBorderCommand.cs | 2 +- .../ConsoleTools.Demo.TabularData/DemoApplication.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.TabularData/MainMenu.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.TabularData/Program.cs | 2 +- .../ConsoleTools.Demo.TabularData/Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs | 2 +- .../ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs | 2 +- .../Commands/BackgroundColorCommand.cs | 2 +- .../ConsoleTools.Demo.TextBlockDemo/Commands/DefaultCommand.cs | 2 +- .../Commands/ForegroundColorCommand.cs | 2 +- .../Commands/HorizontalAlignmentCenterCommand.cs | 2 +- .../Commands/HorizontalAlignmentRightCommand.cs | 2 +- .../ConsoleTools.Demo.TextBlockDemo/Commands/MarginsCommand.cs | 2 +- .../ConsoleTools.Demo.TextBlockDemo/Commands/MaxWidthCommand.cs | 2 +- .../ConsoleTools.Demo.TextBlockDemo/Commands/MinWidthCommand.cs | 2 +- .../Commands/MultipleLongLinesCommand.cs | 2 +- .../Commands/MultipleShortLinesCommand.cs | 2 +- .../ConsoleTools.Demo.TextBlockDemo/Commands/PaddingsCommand.cs | 2 +- .../Commands/SingleLongLineCommand.cs | 2 +- .../ConsoleTools.Demo.TextBlockDemo/Commands/WidthCommand.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs | 2 +- .../ConsoleTools.Demo.TextBlockDemo/Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/ApplicationBase.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/Commands/CloseGameCommand.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/Commands/CreditsCommand.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/Commands/ExitCommand.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/Commands/LoadGameCommand.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/Commands/NewGameCommand.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/Commands/SaveGameCommand.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/Commands/SettingsCommand.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/GameApplication.cs | 2 +- .../ConsoleTools/ConsoleTools.Demo.TextMenuDemo/GameBoard.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/MainMenu.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/Properties/AssemblyInfo.cs | 2 +- sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs | 2 +- .../ConsoleTools.Demo.WriteText/Properties/AssemblyInfo.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs | 2 +- .../ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs | 2 +- .../ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs | 2 +- sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs | 2 +- .../ConsoleTools.Mvc/UserControls/ApplicationFooter.cs | 2 +- .../ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/Column.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs | 2 +- .../ConsoleTools.Tables/HorizontalSeparatorBuilder.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs | 2 +- .../ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs | 2 +- .../ConsoleTools.Tables/Printers/StreamTablePrinter.cs | 2 +- .../ConsoleTools.Tables/Printers/StringTablePrinter.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/BottomBorderData.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/DataBottomBorder.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/DataCellX.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/DataGridX.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs | 2 +- .../ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/DataTopBorder.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/HeaderRowX.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/TitleRowX.cs | 2 +- .../ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs | 2 +- .../ConsoleTools.Tests/AlignedTextTests/SpaceLeftTests.cs | 2 +- .../ConsoleTools.Tests/AlignedTextTests/ToStringTests.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tests/ConsoleOutput.cs | 2 +- .../ActualClientWidthTests_NoWidthConstraints.cs | 2 +- .../ActualContentWidthTests_NoWidthConstraints.cs | 2 +- .../ActualFullWidthTests_NoWidthConstraints.cs | 2 +- .../ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs | 2 +- .../ConsoleTools.Tests/ControlLayoutTests/MarginTests.cs | 2 +- .../ConsoleTools.Tests/ControlLayoutTests/PaddingTests.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tests/CustomAssert.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tests/ExpectedOutput.cs | 2 +- .../MultilineTextTests/Constructor_EmptyTests.cs | 2 +- .../MultilineTextTests/Constructor_InitializeLinesTests.cs | 2 +- .../MultilineTextTests/Constructor_InitializeSizeTests.cs | 2 +- .../MultilineTextTests/Constructor_RawTextTests.cs | 2 +- .../ConsoleTools.Tests/MultilineTextTests/GetLinesTest.cs | 2 +- .../ImplicitConversionFromMultilineTextTests.cs | 2 +- .../ImplicitConversionToMultilineTextTests.cs | 2 +- .../ConsoleTools/ConsoleTools.Tests/Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Tests/SizeTests/ConstructorTests.cs | 2 +- .../ConsoleTools.Tests/SizeTests/InflateWithNumberTests.cs | 2 +- .../ConsoleTools/ConsoleTools.Tests/SizeTests/IsEmptyTests.cs | 2 +- .../Spinners/ProgressBarTests/MaxValueTests.cs | 2 +- .../Spinners/ProgressBarTests/MinValueTests.cs | 2 +- .../BorderTemplateTests/GenerateBottomBorderTests.cs | 2 +- .../BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs | 2 +- .../BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs | 2 +- .../TabularData/BorderTemplateTests/GenerateTopBorderTests.cs | 2 +- .../DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs | 2 +- .../TabularData/DataCellTests/ConstructorMultilineTextTests.cs | 2 +- .../TabularData/DataCellTests/ConstructorNoParamsTests.cs | 2 +- .../DataCellTests/ConstructorObjectAndAlignmentTests.cs | 2 +- .../TabularData/DataCellTests/ConstructorObjectTests.cs | 2 +- .../DataCellTests/ConstructorStringAndAlignmentTests.cs | 2 +- .../TabularData/DataCellTests/ConstructorStringTests.cs | 2 +- .../TabularData/DataCellTests/RenderLineTests.cs | 2 +- .../TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs | 2 +- .../TabularData/DataGridTests/BuildFromDataTable/RowTests.cs | 2 +- .../TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs | 2 +- .../TabularData/DataGridTests/BuildFromList/ColumnTests.cs | 2 +- .../TabularData/DataGridTests/BuildFromList/RowTests.cs | 2 +- .../TabularData/DataGridTests/BuildFromList/TitleTests.cs | 2 +- sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs | 2 +- .../TabularData/TableTests/CellAlignmentPerColumnTests.cs | 2 +- .../TabularData/TableTests/CellAlignmentPerTableTests.cs | 2 +- .../TabularData/TableTests/CellAlignmentTests.cs | 2 +- .../TabularData/TableTests/CellMultilineTests.cs | 2 +- .../TabularData/TableTests/ConstructorTests.cs | 2 +- .../TabularData/TableTests/CustomBorderTests.cs | 2 +- .../TabularData/TableTests/HeaderAlignmentTests.cs | 2 +- .../TabularData/TableTests/LinesBetweenRowsTests.cs | 2 +- .../ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs | 2 +- .../TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs | 2 +- .../TableTests/SpecialCaseBorder.ShortTitle.Tests.cs | 2 +- .../TabularData/TableTests/TablePaddingTests.cs | 2 +- .../TabularData/TableTests/TitleAlignmentTests.cs | 2 +- .../ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs | 2 +- .../ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs | 2 +- sources/ConsoleTools/ConsoleTools/AlignedText.cs | 2 +- sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs | 2 +- sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs | 2 +- .../ConsoleTools/BlockControl.MarginsAndPaddings.cs | 2 +- .../ConsoleTools/ConsoleTools/BlockControl.WidthAndAlignment.cs | 2 +- sources/ConsoleTools/ConsoleTools/BlockControl.cs | 2 +- sources/ConsoleTools/ConsoleTools/CommandLine/CliCommand.cs | 2 +- sources/ConsoleTools/ConsoleTools/CommandLine/CliParameter.cs | 2 +- sources/ConsoleTools/ConsoleTools/ConsoleReader.cs | 2 +- sources/ConsoleTools/ConsoleTools/Control.cs | 2 +- sources/ConsoleTools/ConsoleTools/ControlLayout.cs | 2 +- sources/ConsoleTools/ConsoleTools/ControlRepeater.cs | 2 +- sources/ConsoleTools/ConsoleTools/Cursor.cs | 2 +- sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs | 2 +- .../ConsoleTools/CustomConsole.Write.BackgroundColor.cs | 2 +- .../ConsoleTools/ConsoleTools/CustomConsole.Write.BothColors.cs | 2 +- .../ConsoleTools/CustomConsole.Write.ForegroundColor.cs | 2 +- .../ConsoleTools/CustomConsole.WriteAligned.BackgroundColor.cs | 2 +- .../ConsoleTools/CustomConsole.WriteAligned.BothColors.cs | 2 +- .../ConsoleTools/CustomConsole.WriteAligned.DefaultColors.cs | 2 +- .../ConsoleTools/CustomConsole.WriteAligned.ForegroundColor.cs | 2 +- .../ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs | 2 +- sources/ConsoleTools/ConsoleTools/CustomConsole.WriteError.cs | 2 +- .../ConsoleTools/ConsoleTools/CustomConsole.WriteInverted.cs | 2 +- sources/ConsoleTools/ConsoleTools/CustomConsole.WriteNormal.cs | 2 +- sources/ConsoleTools/ConsoleTools/CustomConsole.WriteSuccess.cs | 2 +- sources/ConsoleTools/ConsoleTools/CustomConsole.WriteWarning.cs | 2 +- sources/ConsoleTools/ConsoleTools/DefaultParent.cs | 2 +- sources/ConsoleTools/ConsoleTools/ErasableControl.cs | 2 +- sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs | 2 +- sources/ConsoleTools/ConsoleTools/HorizontalAlignment.cs | 2 +- sources/ConsoleTools/ConsoleTools/HorizontalLine.cs | 2 +- sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs | 2 +- sources/ConsoleTools/ConsoleTools/InlineControl.cs | 2 +- sources/ConsoleTools/ConsoleTools/InlineTextBlock.cs | 2 +- .../ConsoleTools/ConsoleTools/InputControls/DoubleListView.cs | 2 +- sources/ConsoleTools/ConsoleTools/InputControls/DoubleView.cs | 2 +- .../ConsoleTools/ConsoleTools/InputControls/FloatListView.cs | 2 +- sources/ConsoleTools/ConsoleTools/InputControls/FloatView.cs | 2 +- .../ConsoleTools/ConsoleTools/InputControls/Int32ListView.cs | 2 +- sources/ConsoleTools/ConsoleTools/InputControls/Int32View.cs | 2 +- .../ConsoleTools/ConsoleTools/InputControls/Int64ListView.cs | 2 +- sources/ConsoleTools/ConsoleTools/InputControls/Int64View.cs | 2 +- sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs | 2 +- .../ConsoleTools/ConsoleTools/InputControls/ReadWriteMode.cs | 2 +- .../ConsoleTools/ConsoleTools/InputControls/StringListView.cs | 2 +- sources/ConsoleTools/ConsoleTools/InputControls/StringView.cs | 2 +- sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs | 2 +- sources/ConsoleTools/ConsoleTools/InputControls/YesNoAnswer.cs | 2 +- .../ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs | 2 +- sources/ConsoleTools/ConsoleTools/Label.cs | 2 +- sources/ConsoleTools/ConsoleTools/Location.cs | 2 +- sources/ConsoleTools/ConsoleTools/LongRunningControl.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/ActionCommand.cs | 2 +- .../ConsoleTools/Menues/CurrentIndexChangedEventArgs.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/EmptyCommand.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/ICommand.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/IMenuItem.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/IPrompterCommand.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/MenuItemCollection.cs | 2 +- .../ConsoleTools/ConsoleTools/Menues/MenuItems/LabelMenuItem.cs | 2 +- .../ConsoleTools/Menues/MenuItems/SeparatorMenuItem.cs | 2 +- .../ConsoleTools/ConsoleTools/Menues/MenuItems/YesNoMenuItem.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/NewCommandEventArgs.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/Prompter.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/PrompterItem.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/ScrollMenu.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs | 2 +- sources/ConsoleTools/ConsoleTools/Menues/TextMenuItem.cs | 2 +- .../ConsoleTools/Menues/UnhandledCommandEventArgs.cs | 2 +- .../ConsoleTools/ConsoleTools/Menues/UnknownPrompterCommand.cs | 2 +- sources/ConsoleTools/ConsoleTools/MultilineText.cs | 2 +- sources/ConsoleTools/ConsoleTools/Musical/MusicalNote.cs | 2 +- sources/ConsoleTools/ConsoleTools/Musical/MusicalNoteInfo.cs | 2 +- sources/ConsoleTools/ConsoleTools/Musical/Sound.cs | 2 +- sources/ConsoleTools/ConsoleTools/Pause.cs | 2 +- sources/ConsoleTools/ConsoleTools/Properties/AssemblyInfo.cs | 2 +- sources/ConsoleTools/ConsoleTools/Size.cs | 2 +- sources/ConsoleTools/ConsoleTools/Spinners/ISpinnerTemplate.cs | 2 +- sources/ConsoleTools/ConsoleTools/Spinners/ProgressBar.cs | 2 +- sources/ConsoleTools/ConsoleTools/Spinners/Spinner.cs | 2 +- .../ConsoleTools/Spinners/Templates/BoomerangSpinnerTemplate.cs | 2 +- .../ConsoleTools/Spinners/Templates/BubbleSpinnerTemplate.cs | 2 +- .../ConsoleTools/Spinners/Templates/FanSpinnerTemplate.cs | 2 +- .../ConsoleTools/Spinners/Templates/FillSpinnerTemplate.cs | 2 +- .../ConsoleTools/Spinners/Templates/FilledBehavior.cs | 2 +- .../ConsoleTools/Spinners/Templates/HalfBlinkSpinnerTemplate.cs | 2 +- .../Spinners/Templates/HalfRotateSpinnerTemplate.cs | 2 +- .../ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs | 2 +- .../ConsoleTools/Spinners/Templates/StickSpinnerTemplate.cs | 2 +- sources/ConsoleTools/ConsoleTools/Spinners/ValuePosition.cs | 2 +- sources/ConsoleTools/ConsoleTools/TextBlock.cs | 2 +- sources/ConsoleTools/ConsoleTools/Thickness.cs | 2 +- sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs | 2 +- sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs | 2 +- 335 files changed, 335 insertions(+), 335 deletions(-) diff --git a/sources/ConsoleTools/AssemblyInfo.Shared.cs b/sources/ConsoleTools/AssemblyInfo.Shared.cs index 127403bb..91876d5a 100644 --- a/sources/ConsoleTools/AssemblyInfo.Shared.cs +++ b/sources/ConsoleTools/AssemblyInfo.Shared.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs index d0a174b7..486eda32 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Properties/AssemblyInfo.cs index 19658c33..37ca5b76 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/CommandBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/CommandBase.cs index 5cf0e020..56b2ec64 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/CommandBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/CommandBase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedCenterCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedCenterCommand.cs index b887be12..1a325e2d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedCenterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedCenterCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedRightCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedRightCommand.cs index f05f6cdd..f458d814 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedRightCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedRightCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomBackgroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomBackgroundColorCommand.cs index bfe7f424..5644ce1d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomBackgroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomBackgroundColorCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomCharCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomCharCommand.cs index c484b6e1..61dbb305 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomCharCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomCharCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomForegroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomForegroundColorCommand.cs index 387690b1..5c50798e 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomForegroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomForegroundColorCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomMarginCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomMarginCommand.cs index 303e80c0..caa3755a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomMarginCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomMarginCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomPaddingCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomPaddingCommand.cs index 1c802ae9..9bc72e1d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomPaddingCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomPaddingCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomWidthCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomWidthCommand.cs index 3ce20836..61bd67c0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomWidthCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomWidthCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/DefaultCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/DefaultCommand.cs index 920a00d1..8bab59ea 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/DefaultCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/DefaultCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs index 70f65a8a..96384444 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Properties/AssemblyInfo.cs index 1c3f0cff..ee9a7942 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ExitCommand.cs index 8de9aae4..bb34a987 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ExitCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs index d8f29e74..a43cd6eb 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs index fbde29b1..38ce0318 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs index 74b698e0..d7dec60a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs index b4657216..eb1bfb64 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs index f7beea7b..1176fc4c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs index 530068c1..4f30fda1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs index 8817862c..768416f4 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs index a4589c26..02205bab 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs index 701c456c..d0795f1d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs index 2631fe7a..d7291ae8 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs index 52e2f796..f651eab2 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs index 25ee2cdf..3500d19b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs index 6c6e6c7d..c5c4130a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs index 2b09a66d..562197a0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs index a245f550..cb77071c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs index cec7004e..77d15be4 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Properties/AssemblyInfo.cs index 38770398..706e8c1a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs index 91d2f6d2..66e7866d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Musical/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.Musical/Properties/AssemblyInfo.cs index fb464dfc..256f7818 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Musical/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.Musical/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs index a1940c15..d9e0b484 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/CommandBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/CommandBase.cs index 76a0c84f..10e61728 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/CommandBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/CommandBase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/BackgroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/BackgroundColorCommand.cs index d691edcb..b59c4327 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/BackgroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/BackgroundColorCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomMarginsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomMarginsCommand.cs index 00668b62..1e18b15f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomMarginsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomMarginsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomPaddingsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomPaddingsCommand.cs index 6b0c4f41..507ca428 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomPaddingsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomPaddingsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomUnlockKeyCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomUnlockKeyCommand.cs index d783c151..9af09b4a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomUnlockKeyCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomUnlockKeyCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/DefaultCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/DefaultCommand.cs index 9b52ca31..7dc1bb5e 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/DefaultCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/DefaultCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ErasablePauseCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ErasablePauseCommand.cs index d43a8135..caa26914 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ErasablePauseCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ErasablePauseCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ForegroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ForegroundColorCommand.cs index 4bdd7b2d..8c601ff8 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ForegroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ForegroundColorCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/DummyText.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/DummyText.cs index a2d10047..d8e3ed62 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/DummyText.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/DummyText.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs index bc9ec8d6..f71bf754 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Properties/AssemblyInfo.cs index 8d00473b..5658f9cc 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/DataProcessingJob.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/DataProcessingJob.cs index ccd40b03..59e50a60 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/DataProcessingJob.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/DataProcessingJob.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobBase.cs index 18fa93a4..55875f7c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobBase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobState.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobState.cs index 2ad09d53..365b7c55 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobState.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/BusinessLayer/JobState.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs index 2a08a878..0a96079b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs index 16615f89..d69720ed 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Properties/AssemblyInfo.cs index 4a9af6a0..cca8ea75 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs index a1b65541..53a4b3e7 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs index 39298246..4906aa1c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs index 444e1394..c1e052d8 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/WhaleCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/WhaleCommand.cs index f475b9af..367776c3 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/WhaleCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/WhaleCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Ocean/Whale.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Ocean/Whale.cs index 442d9420..dba7ce31 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Ocean/Whale.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Ocean/Whale.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Ocean/WhaleProvider.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Ocean/WhaleProvider.cs index f964a478..348da0d1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Ocean/WhaleProvider.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Ocean/WhaleProvider.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/OceanPrompter.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/OceanPrompter.cs index 8def0f9a..097fee22 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/OceanPrompter.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/OceanPrompter.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs index 545657c1..9c488b54 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Properties/AssemblyInfo.cs index 124be39c..a0d22021 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/ApplicationBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/ApplicationBase.cs index cd61cf18..f72d41fc 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/ApplicationBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/ApplicationBase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/CreditsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/CreditsCommand.cs index e28a7ab2..58ee1ba6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/CreditsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/CreditsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/ExitCommand.cs index a2ca4f5c..ed4d2ec5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/ExitCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/LoadGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/LoadGameCommand.cs index bcbc33d1..d3fbd198 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/LoadGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/LoadGameCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/NewGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/NewGameCommand.cs index f422d259..62a2027c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/NewGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/NewGameCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SaveGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SaveGameCommand.cs index eb84272e..bb6a3e6d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SaveGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SaveGameCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SettingsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SettingsCommand.cs index ff00a7df..2750cbdc 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SettingsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SettingsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/GameApplication.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/GameApplication.cs index f2bebf88..5e1739bc 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/GameApplication.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/GameApplication.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/GameBoard.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/GameBoard.cs index 791757a1..61d367b1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/GameBoard.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/GameBoard.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/MainMenu.cs index edb3b07f..270b3504 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/MainMenu.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs index de470b6d..57895876 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Properties/AssemblyInfo.cs index 0761717d..bff23644 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BoomerangCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BoomerangCommand.cs index d7011263..fc8dafae 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BoomerangCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BoomerangCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BubbleCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BubbleCommand.cs index 3295bdb6..d39e25ae 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BubbleCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BubbleCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/ExitCommand.cs index af13ad59..e8720283 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/ExitCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FanCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FanCommand.cs index cfaae780..8f0f5551 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FanCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FanCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillBlock10Command.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillBlock10Command.cs index efd9c435..a1f41a8f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillBlock10Command.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillBlock10Command.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromEndCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromEndCommand.cs index 0c408f6c..89d4290b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromEndCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromEndCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromStartCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromStartCommand.cs index 2c120281..33258863 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromStartCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromStartCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillSuddenEmptyCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillSuddenEmptyCommand.cs index c538b750..2d462d27 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillSuddenEmptyCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillSuddenEmptyCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillWithBordersCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillWithBordersCommand.cs index ca22d6a9..09feb5b1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillWithBordersCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillWithBordersCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalfBlockVerticalCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalfBlockVerticalCommand.cs index 3221515c..f7c8f86f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalfBlockVerticalCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalfBlockVerticalCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalhBlockSpinCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalhBlockSpinCommand.cs index 190071f6..0cbc1e1c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalhBlockSpinCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalhBlockSpinCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/StickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/StickCommand.cs index fbd633a0..797748d6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/StickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/StickCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/MainMenu.cs index 8a14bf8b..2a527e61 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/MainMenu.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs index d0563dc0..409d4ba2 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Properties/AssemblyInfo.cs index 06406bac..ff43408f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs index 8ef69e8b..aba39db0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs index 6d6341a7..06f85a22 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs index eca4b7a5..d1645eaf 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DrawLinesBetweenRowsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DrawLinesBetweenRowsCommand.cs index aa9bea74..2fcf193f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DrawLinesBetweenRowsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DrawLinesBetweenRowsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ExitDemoCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ExitDemoCommand.cs index 942f2e27..d677c095 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ExitDemoCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ExitDemoCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/LongShortTitleCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/LongShortTitleCommand.cs index 7714792b..8bd2c7dc 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/LongShortTitleCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/LongShortTitleCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineCellCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineCellCommand.cs index 34888053..a1d73545 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineCellCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineCellCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineTitleCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineTitleCommand.cs index 8957398d..327e6d0b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineTitleCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineTitleCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs index c474b00e..2aa1f0e5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs index 721ba051..a528eabb 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/DemoApplication.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/DemoApplication.cs index 1f651709..eb5384d4 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/DemoApplication.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/DemoApplication.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/MainMenu.cs index 9637ce65..0625e6fe 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/MainMenu.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Program.cs index 2af053eb..2f4205ff 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Properties/AssemblyInfo.cs index 505bc2a4..11d3abbc 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs index b342696f..28d42d3e 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs index a06f12ed..a279f9f1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/BackgroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/BackgroundColorCommand.cs index e0c1afcd..d47592e5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/BackgroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/BackgroundColorCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/DefaultCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/DefaultCommand.cs index 57a87885..97bbcdb2 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/DefaultCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/DefaultCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/ForegroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/ForegroundColorCommand.cs index 440cabcf..81dfeda1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/ForegroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/ForegroundColorCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentCenterCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentCenterCommand.cs index bd6d6b50..1504174a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentCenterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentCenterCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentRightCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentRightCommand.cs index 455cf258..19ff6bc2 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentRightCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentRightCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MarginsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MarginsCommand.cs index 636f694d..09d9d12e 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MarginsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MarginsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MaxWidthCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MaxWidthCommand.cs index c8f93ef8..671417d2 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MaxWidthCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MaxWidthCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MinWidthCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MinWidthCommand.cs index 8e634ec5..7f256ec4 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MinWidthCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MinWidthCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleLongLinesCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleLongLinesCommand.cs index 378a5238..c20b80a5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleLongLinesCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleLongLinesCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleShortLinesCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleShortLinesCommand.cs index 582eaa38..edcb5cf0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleShortLinesCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleShortLinesCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/PaddingsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/PaddingsCommand.cs index 35fcb35f..e72db81b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/PaddingsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/PaddingsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/SingleLongLineCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/SingleLongLineCommand.cs index 31c30f5e..cf8dea46 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/SingleLongLineCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/SingleLongLineCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/WidthCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/WidthCommand.cs index 17af4b91..65c37bfd 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/WidthCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/WidthCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs index 01703e1f..6bac2154 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Properties/AssemblyInfo.cs index 92f4bfa7..b9bb751a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/ApplicationBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/ApplicationBase.cs index 7207cc48..6b3557c0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/ApplicationBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/ApplicationBase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CloseGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CloseGameCommand.cs index 1bfbe8c7..57788a05 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CloseGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CloseGameCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CreditsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CreditsCommand.cs index cc53d8e2..40a10af1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CreditsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CreditsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/ExitCommand.cs index 696324b8..94e5e625 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/ExitCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/LoadGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/LoadGameCommand.cs index 38f1d8c9..ada8efb7 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/LoadGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/LoadGameCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/NewGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/NewGameCommand.cs index 3a46e8a3..c2d6f556 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/NewGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/NewGameCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SaveGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SaveGameCommand.cs index f1b66af3..f5ed5c87 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SaveGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SaveGameCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SettingsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SettingsCommand.cs index 5ab869c9..527bbf1d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SettingsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SettingsCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/GameApplication.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/GameApplication.cs index 92b41a8e..4342d2a1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/GameApplication.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/GameApplication.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/GameBoard.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/GameBoard.cs index 66e82dd4..71059f9f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/GameBoard.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/GameBoard.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/MainMenu.cs index 8d123eb9..d7994ab0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/MainMenu.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs index 0733bd47..7dd36338 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Properties/AssemblyInfo.cs index 725818c1..e895a309 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs index b9f36981..63da7268 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Properties/AssemblyInfo.cs index 4f53390d..307d51ca 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs index 3c39f1c2..1875fb88 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs index 5f5faba1..7b88bab3 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs index c163af84..74f68790 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs index 9e888a5f..21488b67 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs index 844b8f4b..9174f3c1 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs index faf0871e..346b034b 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs index 9c8827bd..54fbdca9 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs index c94aa60b..e0cab5c8 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs @@ -1,5 +1,5 @@ // // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs index b1d1f01f..96c22ab1 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs index 71daa3a4..7aa680d5 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs index 86be9d15..ea225a21 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs index b3512340..a2efe185 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs index 14d7e2f8..432747dd 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs index ae2a10fe..96622f31 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs @@ -1,5 +1,5 @@ // // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs b/sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs index e1c08e53..e5067d40 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs b/sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs index a7b73219..7aaa97fd 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/Column.cs b/sources/ConsoleTools/ConsoleTools.Tables/Column.cs index bbaa92b9..1dd80681 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/Column.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/Column.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs b/sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs index 22823752..64bff8c4 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs index 27a08297..137098e1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs index 3887674c..3acb9476 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs index 3fa6fbf5..ce7c88ab 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs b/sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs index 3646ec36..95506219 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs index 44a527c0..16f62951 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs b/sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs index 8691efa7..dcf296e3 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs index e0326cc0..969c2d2a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs index a465fea3..25adb9da 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs index 707cc893..235d62f0 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs index 2c5779eb..86789f8c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs index ba6cb181..cd1560ea 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataBottomBorder.cs index f9f357df..365cd0f5 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataBottomBorder.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs index a40798c7..ac4d11c2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs index 99ef490a..2e24a16c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs index f9dd025f..fcbf6774 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs index 4392878d..86f7e5c1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs index f0f03b8f..c59b19d5 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs index 4aaf4c48..f315093c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs index 79fd0fd1..2487a3c1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs index 009d9c53..b99c5a0d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs index 930b7c70..28bf5e33 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs index c10234aa..70ea7484 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs index 1426c49b..165c856b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs index c16fcb88..99d91249 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs index 3304dab1..2303b687 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs index 3f19fc70..7a93c554 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs index 4477a0ca..db10cfdd 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs index b8d93784..a3e83473 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs b/sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs index f664cd1c..f1124a30 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/SpaceLeftTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/SpaceLeftTests.cs index 936d03da..08bb7cec 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/SpaceLeftTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/SpaceLeftTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/ToStringTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/ToStringTests.cs index c49134ed..38ebebfb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/ToStringTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/ToStringTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleOutput.cs b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleOutput.cs index 136ebb69..1c10d72c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleOutput.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleOutput.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs index 329fca4e..596bcc2c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs index 5360fe57..6c01f69a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs index 5211c282..36c8bed6 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs index 09fd4f62..6a5a79a8 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/MarginTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/MarginTests.cs index 7b500f67..d7b44959 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/MarginTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/MarginTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/PaddingTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/PaddingTests.cs index f5538294..48a26711 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/PaddingTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/PaddingTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/CustomAssert.cs b/sources/ConsoleTools/ConsoleTools.Tests/CustomAssert.cs index 1e21cd8e..50132bc0 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/CustomAssert.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/CustomAssert.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ExpectedOutput.cs b/sources/ConsoleTools/ConsoleTools.Tests/ExpectedOutput.cs index 25b7246f..5405e458 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ExpectedOutput.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ExpectedOutput.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_EmptyTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_EmptyTests.cs index 57fe4a5c..ba2ddc79 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_EmptyTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_EmptyTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeLinesTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeLinesTests.cs index 6d944217..61dd62ec 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeLinesTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeLinesTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeSizeTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeSizeTests.cs index 237cb090..28317a59 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeSizeTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeSizeTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_RawTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_RawTextTests.cs index 56f5234e..7925daec 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_RawTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_RawTextTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/GetLinesTest.cs b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/GetLinesTest.cs index f9dc13d9..d0b73ef9 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/GetLinesTest.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/GetLinesTest.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs index cc345ead..08335b4a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs index 688c684b..e74e39c5 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Tests/Properties/AssemblyInfo.cs index 2e5c3816..90e9e3d1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/ConstructorTests.cs index 9df48938..c9c5577c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/ConstructorTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/InflateWithNumberTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/InflateWithNumberTests.cs index 14781acd..f74e230e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/InflateWithNumberTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/InflateWithNumberTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/IsEmptyTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/IsEmptyTests.cs index 626bcb7f..ab9e3344 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/IsEmptyTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/IsEmptyTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs index b15a633f..e3d08f46 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs index 73e23918..0a9d4cea 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs index 2a124f86..af0c4cc7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs index f491572c..a7faa2d2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs index 35f0cf7d..ca317b4b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs index 77fad62e..5658d228 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs index 1c6b0524..2c30b92e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs index be4d201c..dcb0e8df 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs index 49e8d2a6..cdf56b48 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs index 184e6e7e..4b5c60af 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs index 87746270..73801c9f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs index e8962611..33df3888 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs index 3ab35334..1e15f4f7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs index 4ab8af63..6f0b05ca 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs index c83ba169..61943850 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs index 4d195f03..0b992fbb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs index 5bcd3227..452fe2f5 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs index 5a1bcc81..9e112802 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs index b948edd4..fb5fb230 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs index 36abe10b..9017c3a0 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs index 31f1e0c8..bdb8a82a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs index 8bed8158..5c8b0e83 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs index 2d011f43..2f527578 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs index 81cf14fc..752256b0 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs index 0ec0e4d4..38b35099 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs index 555bd019..eccb9092 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs index 96bce4a2..76314aff 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs index d6cf698b..472238d2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs index 80d488dd..ec6779d1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs index 3133dafb..01b71135 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs index 025c9db4..7c643d2e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs index ac8afbbb..1c31723c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs index 2f829aa2..7df6768e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs index c589dbc9..8b3b67be 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs index 8f1f3636..984e38f4 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs index 96352347..e74f8f45 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/AlignedText.cs b/sources/ConsoleTools/ConsoleTools/AlignedText.cs index 7e2acb34..d30fa695 100644 --- a/sources/ConsoleTools/ConsoleTools/AlignedText.cs +++ b/sources/ConsoleTools/ConsoleTools/AlignedText.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs index 003612e9..2b435562 100644 --- a/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs b/sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs index 00d7f785..261ee09c 100644 --- a/sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs +++ b/sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/BlockControl.MarginsAndPaddings.cs b/sources/ConsoleTools/ConsoleTools/BlockControl.MarginsAndPaddings.cs index c9c3ded5..b20b9174 100644 --- a/sources/ConsoleTools/ConsoleTools/BlockControl.MarginsAndPaddings.cs +++ b/sources/ConsoleTools/ConsoleTools/BlockControl.MarginsAndPaddings.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/BlockControl.WidthAndAlignment.cs b/sources/ConsoleTools/ConsoleTools/BlockControl.WidthAndAlignment.cs index 2d0f2f24..a8d3ef81 100644 --- a/sources/ConsoleTools/ConsoleTools/BlockControl.WidthAndAlignment.cs +++ b/sources/ConsoleTools/ConsoleTools/BlockControl.WidthAndAlignment.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/BlockControl.cs b/sources/ConsoleTools/ConsoleTools/BlockControl.cs index fe907414..a5b9b3ae 100644 --- a/sources/ConsoleTools/ConsoleTools/BlockControl.cs +++ b/sources/ConsoleTools/ConsoleTools/BlockControl.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CommandLine/CliCommand.cs b/sources/ConsoleTools/ConsoleTools/CommandLine/CliCommand.cs index be7bbf62..1613367e 100644 --- a/sources/ConsoleTools/ConsoleTools/CommandLine/CliCommand.cs +++ b/sources/ConsoleTools/ConsoleTools/CommandLine/CliCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CommandLine/CliParameter.cs b/sources/ConsoleTools/ConsoleTools/CommandLine/CliParameter.cs index a92065a0..b1dd773e 100644 --- a/sources/ConsoleTools/ConsoleTools/CommandLine/CliParameter.cs +++ b/sources/ConsoleTools/ConsoleTools/CommandLine/CliParameter.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/ConsoleReader.cs b/sources/ConsoleTools/ConsoleTools/ConsoleReader.cs index b7ed91df..5417447b 100644 --- a/sources/ConsoleTools/ConsoleTools/ConsoleReader.cs +++ b/sources/ConsoleTools/ConsoleTools/ConsoleReader.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Control.cs b/sources/ConsoleTools/ConsoleTools/Control.cs index fb29824d..7c57b82f 100644 --- a/sources/ConsoleTools/ConsoleTools/Control.cs +++ b/sources/ConsoleTools/ConsoleTools/Control.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/ControlLayout.cs b/sources/ConsoleTools/ConsoleTools/ControlLayout.cs index 0f5718d2..07e82c55 100644 --- a/sources/ConsoleTools/ConsoleTools/ControlLayout.cs +++ b/sources/ConsoleTools/ConsoleTools/ControlLayout.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/ControlRepeater.cs b/sources/ConsoleTools/ConsoleTools/ControlRepeater.cs index 941c8216..884ab27b 100644 --- a/sources/ConsoleTools/ConsoleTools/ControlRepeater.cs +++ b/sources/ConsoleTools/ConsoleTools/ControlRepeater.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Cursor.cs b/sources/ConsoleTools/ConsoleTools/Cursor.cs index 543c38eb..caeedf84 100644 --- a/sources/ConsoleTools/ConsoleTools/Cursor.cs +++ b/sources/ConsoleTools/ConsoleTools/Cursor.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs index 0d6bb9f8..f2d03265 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs index fc5c8b91..58ee79ff 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BothColors.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BothColors.cs index 581e3115..ef282769 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BothColors.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BothColors.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.ForegroundColor.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.ForegroundColor.cs index 92ef50c9..74bfb0ce 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.ForegroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.ForegroundColor.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BackgroundColor.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BackgroundColor.cs index 209cc772..5709dd80 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BackgroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BackgroundColor.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BothColors.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BothColors.cs index 2381d07e..e9ec6319 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BothColors.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BothColors.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.DefaultColors.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.DefaultColors.cs index 9fbb8fef..e3f237ae 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.DefaultColors.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.DefaultColors.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.ForegroundColor.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.ForegroundColor.cs index 5568109a..71d1f441 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.ForegroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.ForegroundColor.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs index 131c5d79..44ac1b85 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteError.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteError.cs index dbbfb10d..20d9084e 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteError.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteError.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteInverted.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteInverted.cs index 77124a7b..df4ee25d 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteInverted.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteInverted.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteNormal.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteNormal.cs index 5ba0e393..c51e654d 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteNormal.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteNormal.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteSuccess.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteSuccess.cs index 5b7611f9..3d3f719d 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteSuccess.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteSuccess.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteWarning.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteWarning.cs index aec25411..8c50dccf 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteWarning.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteWarning.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/DefaultParent.cs b/sources/ConsoleTools/ConsoleTools/DefaultParent.cs index 8af0246c..cb2dd6e6 100644 --- a/sources/ConsoleTools/ConsoleTools/DefaultParent.cs +++ b/sources/ConsoleTools/ConsoleTools/DefaultParent.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/ErasableControl.cs b/sources/ConsoleTools/ConsoleTools/ErasableControl.cs index bfaba2eb..d61909f7 100644 --- a/sources/ConsoleTools/ConsoleTools/ErasableControl.cs +++ b/sources/ConsoleTools/ConsoleTools/ErasableControl.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs b/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs index 42b36f87..7c6d6aa6 100644 --- a/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs +++ b/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/HorizontalAlignment.cs b/sources/ConsoleTools/ConsoleTools/HorizontalAlignment.cs index 0621fa11..1d139e54 100644 --- a/sources/ConsoleTools/ConsoleTools/HorizontalAlignment.cs +++ b/sources/ConsoleTools/ConsoleTools/HorizontalAlignment.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/HorizontalLine.cs b/sources/ConsoleTools/ConsoleTools/HorizontalLine.cs index d49a3f34..99e2fee0 100644 --- a/sources/ConsoleTools/ConsoleTools/HorizontalLine.cs +++ b/sources/ConsoleTools/ConsoleTools/HorizontalLine.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs b/sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs index 2c9f676d..7dd9bc94 100644 --- a/sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs +++ b/sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InlineControl.cs b/sources/ConsoleTools/ConsoleTools/InlineControl.cs index 3bacb1ba..e71bbe2b 100644 --- a/sources/ConsoleTools/ConsoleTools/InlineControl.cs +++ b/sources/ConsoleTools/ConsoleTools/InlineControl.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InlineTextBlock.cs b/sources/ConsoleTools/ConsoleTools/InlineTextBlock.cs index 05f73290..dcb99f69 100644 --- a/sources/ConsoleTools/ConsoleTools/InlineTextBlock.cs +++ b/sources/ConsoleTools/ConsoleTools/InlineTextBlock.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/DoubleListView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/DoubleListView.cs index c1b54b5f..9fed5cb6 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/DoubleListView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/DoubleListView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/DoubleView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/DoubleView.cs index 8c2c29f7..fd479cc8 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/DoubleView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/DoubleView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/FloatListView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/FloatListView.cs index 69c49a91..0e9dd2d3 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/FloatListView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/FloatListView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/FloatView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/FloatView.cs index ec769dd4..32eac3be 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/FloatView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/FloatView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int32ListView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/Int32ListView.cs index 1f39b1d7..1c1bd520 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/Int32ListView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/Int32ListView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int32View.cs b/sources/ConsoleTools/ConsoleTools/InputControls/Int32View.cs index e007f21b..2023e185 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/Int32View.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/Int32View.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int64ListView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/Int64ListView.cs index bf84924e..f95645c7 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/Int64ListView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/Int64ListView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int64View.cs b/sources/ConsoleTools/ConsoleTools/InputControls/Int64View.cs index bc016458..b53f9a75 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/Int64View.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/Int64View.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs index f019c8e2..5816aaf9 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ReadWriteMode.cs b/sources/ConsoleTools/ConsoleTools/InputControls/ReadWriteMode.cs index 9bc23417..ad438ccf 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ReadWriteMode.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/ReadWriteMode.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/StringListView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/StringListView.cs index 32d8f431..eec861ec 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/StringListView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/StringListView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/StringView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/StringView.cs index c3bd3542..743fc193 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/StringView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/StringView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs b/sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs index 459e7bca..5dd3a4a6 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoAnswer.cs b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoAnswer.cs index c5be1a5e..0d1e8d58 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoAnswer.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoAnswer.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs index 15d37297..cccc9886 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs +++ b/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Label.cs b/sources/ConsoleTools/ConsoleTools/Label.cs index 23578f81..fca26f3b 100644 --- a/sources/ConsoleTools/ConsoleTools/Label.cs +++ b/sources/ConsoleTools/ConsoleTools/Label.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Location.cs b/sources/ConsoleTools/ConsoleTools/Location.cs index 8df25214..3f9e70cb 100644 --- a/sources/ConsoleTools/ConsoleTools/Location.cs +++ b/sources/ConsoleTools/ConsoleTools/Location.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/LongRunningControl.cs b/sources/ConsoleTools/ConsoleTools/LongRunningControl.cs index 54a980d0..f5ee67a9 100644 --- a/sources/ConsoleTools/ConsoleTools/LongRunningControl.cs +++ b/sources/ConsoleTools/ConsoleTools/LongRunningControl.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/ActionCommand.cs b/sources/ConsoleTools/ConsoleTools/Menues/ActionCommand.cs index 0b651599..76d16997 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/ActionCommand.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/ActionCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/CurrentIndexChangedEventArgs.cs b/sources/ConsoleTools/ConsoleTools/Menues/CurrentIndexChangedEventArgs.cs index b6699db2..7a5415f7 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/CurrentIndexChangedEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/CurrentIndexChangedEventArgs.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/EmptyCommand.cs b/sources/ConsoleTools/ConsoleTools/Menues/EmptyCommand.cs index 78c14aa8..7853f851 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/EmptyCommand.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/EmptyCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/ICommand.cs b/sources/ConsoleTools/ConsoleTools/Menues/ICommand.cs index 084deb07..a87011f9 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/ICommand.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/ICommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/IMenuItem.cs b/sources/ConsoleTools/ConsoleTools/Menues/IMenuItem.cs index d1f9353e..8f6e3897 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/IMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/IMenuItem.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/IPrompterCommand.cs b/sources/ConsoleTools/ConsoleTools/Menues/IPrompterCommand.cs index 87da7502..5a51e461 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/IPrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/IPrompterCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/MenuItemCollection.cs b/sources/ConsoleTools/ConsoleTools/Menues/MenuItemCollection.cs index a2162364..647fd2bc 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/MenuItemCollection.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/MenuItemCollection.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/LabelMenuItem.cs b/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/LabelMenuItem.cs index 1279347c..8db98b8d 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/LabelMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/LabelMenuItem.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/SeparatorMenuItem.cs b/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/SeparatorMenuItem.cs index d1d5be98..d25401c4 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/SeparatorMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/SeparatorMenuItem.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/YesNoMenuItem.cs b/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/YesNoMenuItem.cs index 47574917..48c58c0b 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/YesNoMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/YesNoMenuItem.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/NewCommandEventArgs.cs b/sources/ConsoleTools/ConsoleTools/Menues/NewCommandEventArgs.cs index 0ab3b3bb..0e3e6c9c 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/NewCommandEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/NewCommandEventArgs.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/Prompter.cs b/sources/ConsoleTools/ConsoleTools/Menues/Prompter.cs index 1c584550..b6e9a3fc 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/Prompter.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/Prompter.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/PrompterItem.cs b/sources/ConsoleTools/ConsoleTools/Menues/PrompterItem.cs index 2756a566..262d7bd2 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/PrompterItem.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/PrompterItem.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/ScrollMenu.cs b/sources/ConsoleTools/ConsoleTools/Menues/ScrollMenu.cs index a8f89013..f1b33801 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/ScrollMenu.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/ScrollMenu.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs b/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs index 20f0a133..52197ff3 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/TextMenuItem.cs b/sources/ConsoleTools/ConsoleTools/Menues/TextMenuItem.cs index 21886910..1908e1ce 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/TextMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/TextMenuItem.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/UnhandledCommandEventArgs.cs b/sources/ConsoleTools/ConsoleTools/Menues/UnhandledCommandEventArgs.cs index 43a56a1d..8d164231 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/UnhandledCommandEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/UnhandledCommandEventArgs.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Menues/UnknownPrompterCommand.cs b/sources/ConsoleTools/ConsoleTools/Menues/UnknownPrompterCommand.cs index 4c420e46..eb4fc7db 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/UnknownPrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools/Menues/UnknownPrompterCommand.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/MultilineText.cs b/sources/ConsoleTools/ConsoleTools/MultilineText.cs index 92d7707d..d2cd155f 100644 --- a/sources/ConsoleTools/ConsoleTools/MultilineText.cs +++ b/sources/ConsoleTools/ConsoleTools/MultilineText.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Musical/MusicalNote.cs b/sources/ConsoleTools/ConsoleTools/Musical/MusicalNote.cs index 15fa2f1f..5a795d70 100644 --- a/sources/ConsoleTools/ConsoleTools/Musical/MusicalNote.cs +++ b/sources/ConsoleTools/ConsoleTools/Musical/MusicalNote.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Musical/MusicalNoteInfo.cs b/sources/ConsoleTools/ConsoleTools/Musical/MusicalNoteInfo.cs index 0ade9b81..dc2dd7a4 100644 --- a/sources/ConsoleTools/ConsoleTools/Musical/MusicalNoteInfo.cs +++ b/sources/ConsoleTools/ConsoleTools/Musical/MusicalNoteInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Musical/Sound.cs b/sources/ConsoleTools/ConsoleTools/Musical/Sound.cs index 8210950f..2347fad4 100644 --- a/sources/ConsoleTools/ConsoleTools/Musical/Sound.cs +++ b/sources/ConsoleTools/ConsoleTools/Musical/Sound.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Pause.cs b/sources/ConsoleTools/ConsoleTools/Pause.cs index 01cc5c65..6f606787 100644 --- a/sources/ConsoleTools/ConsoleTools/Pause.cs +++ b/sources/ConsoleTools/ConsoleTools/Pause.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools/Properties/AssemblyInfo.cs index bbd7e6e9..6ec5d84a 100644 --- a/sources/ConsoleTools/ConsoleTools/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Size.cs b/sources/ConsoleTools/ConsoleTools/Size.cs index e07701d2..4f6eecee 100644 --- a/sources/ConsoleTools/ConsoleTools/Size.cs +++ b/sources/ConsoleTools/ConsoleTools/Size.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/ISpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/ISpinnerTemplate.cs index c94ccff9..8c3bb6e7 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/ISpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/ISpinnerTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/ProgressBar.cs b/sources/ConsoleTools/ConsoleTools/Spinners/ProgressBar.cs index 3399ab1a..c5fb37f9 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/ProgressBar.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/ProgressBar.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Spinner.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Spinner.cs index 5cfe837d..396b6e19 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Spinner.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Spinner.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BoomerangSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BoomerangSpinnerTemplate.cs index 1830ed59..6694f704 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BoomerangSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BoomerangSpinnerTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BubbleSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BubbleSpinnerTemplate.cs index d8607e82..143225ca 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BubbleSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BubbleSpinnerTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FanSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FanSpinnerTemplate.cs index 971fca36..439268c3 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FanSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FanSpinnerTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FillSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FillSpinnerTemplate.cs index 1a21563d..ecf2c1b1 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FillSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FillSpinnerTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FilledBehavior.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FilledBehavior.cs index e6ab8495..fd4697c0 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FilledBehavior.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FilledBehavior.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfBlinkSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfBlinkSpinnerTemplate.cs index 1e2665a8..bf18494d 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfBlinkSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfBlinkSpinnerTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfRotateSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfRotateSpinnerTemplate.cs index 8c33b19d..62bea252 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfRotateSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfRotateSpinnerTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs index cf30a9d2..714b9824 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/StickSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/StickSpinnerTemplate.cs index bd605db3..ad295398 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/StickSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/Templates/StickSpinnerTemplate.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/ValuePosition.cs b/sources/ConsoleTools/ConsoleTools/Spinners/ValuePosition.cs index 7d4d5ce4..2ef43554 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/ValuePosition.cs +++ b/sources/ConsoleTools/ConsoleTools/Spinners/ValuePosition.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/TextBlock.cs b/sources/ConsoleTools/ConsoleTools/TextBlock.cs index 2cec892b..edbf2a2d 100644 --- a/sources/ConsoleTools/ConsoleTools/TextBlock.cs +++ b/sources/ConsoleTools/ConsoleTools/TextBlock.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/Thickness.cs b/sources/ConsoleTools/ConsoleTools/Thickness.cs index bed5d673..3f6c02d7 100644 --- a/sources/ConsoleTools/ConsoleTools/Thickness.cs +++ b/sources/ConsoleTools/ConsoleTools/Thickness.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs b/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs index 93b98a3d..3162314d 100644 --- a/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs +++ b/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs b/sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs index 5caad61d..b895ca60 100644 --- a/sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs @@ -1,5 +1,5 @@ // ConsoleTools -// Copyright (C) 2017-2018 Dust in the Wind +// Copyright (C) 2017-2020 Dust in the Wind // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by From 115e0582b97baef759db42bd9986a90c767feabd Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sat, 7 Mar 2020 20:40:25 +0200 Subject: [PATCH 14/57] added the core project --- .../ConsoleTools.Core/ConsoleTools.Core.csproj | 9 +++++++++ .../ConsoleTools.Tables.csproj | 16 ++++++++-------- sources/ConsoleTools/ConsoleTools.sln | 14 ++++++++++++++ .../CustomConsole.Write.BackgroundColor.cs | 18 +++++++++--------- sources/ConsoleTools/ConsoleTools/Size.cs | 2 +- sources/ConsoleTools/ConsoleTools/Thickness.cs | 7 +++++++ .../ConsoleTools/ThreeStageFile.cs | 5 ++--- 7 files changed, 50 insertions(+), 21 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj diff --git a/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj b/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj new file mode 100644 index 00000000..0cc3587d --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj @@ -0,0 +1,9 @@ + + + + netcoreapp2.2;net45 + DustInTheWind.ConsoleTools.Core + DustInTheWind.ConsoleTools.Core + + + diff --git a/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj b/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj index 35b55981..32f76a34 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj @@ -1,13 +1,13 @@ - - netstandard2.0 - DustInTheWind.ConsoleTools.TabularData - DustInTheWind.ConsoleTools.Tables - + + netcoreapp2.2;net45 + DustInTheWind.ConsoleTools.TabularData + DustInTheWind.ConsoleTools.Tables + - - - + + + diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index 2585d3bf..0044b1fa 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -39,6 +39,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Tables", "Cons EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Cli", "ConsoleTools.Mvc\ConsoleTools.Cli.csproj", "{34D944CA-0276-4412-8387-58414E2F5631}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Core", "ConsoleTools.Core\ConsoleTools.Core.csproj", "{975D695D-1FD2-446F-BD7C-0F7839C1559D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -253,6 +255,18 @@ Global {34D944CA-0276-4412-8387-58414E2F5631}.Release-Net452|Any CPU.Build.0 = Release|Any CPU {34D944CA-0276-4412-8387-58414E2F5631}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU {34D944CA-0276-4412-8387-58414E2F5631}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Debug-Net452|Any CPU.ActiveCfg = Debug|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Debug-Net452|Any CPU.Build.0 = Debug|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Debug-Net461|Any CPU.ActiveCfg = Debug|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Debug-Net461|Any CPU.Build.0 = Debug|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Release|Any CPU.Build.0 = Release|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Release-Net452|Any CPU.ActiveCfg = Release|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Release-Net452|Any CPU.Build.0 = Release|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Release-Net461|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs index 58ee79ff..f6897c96 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs @@ -28,12 +28,12 @@ public partial class CustomConsole /// /// Writes the specified text to the Console using the specified background color. /// - /// The background color used to write the text. + /// The background color used to write the text. /// The text to be written to the Console. - public static void WriteBackgroundColor(ConsoleColor backgroudColor, string text) + public static void WriteBackgroundColor(ConsoleColor backgroundColor, string text) { ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroudColor; + Console.BackgroundColor = backgroundColor; Console.Write(text); Console.BackgroundColor = oldColor; } @@ -42,13 +42,13 @@ public static void WriteBackgroundColor(ConsoleColor backgroudColor, string text /// Writes the text representation of the specified array of objects to the Console /// using the specified format information and background color. /// - /// The background color used to write the text. + /// The background color used to write the text. /// A composite format string. /// An array of objects to write using format. - public static void WriteBackgroundColor(ConsoleColor backgroudColor, string format, params object[] arg) + public static void WriteBackgroundColor(ConsoleColor backgroundColor, string format, params object[] arg) { ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroudColor; + Console.BackgroundColor = backgroundColor; Console.Write(format, arg); Console.BackgroundColor = oldColor; } @@ -57,12 +57,12 @@ public static void WriteBackgroundColor(ConsoleColor backgroudColor, string form /// Writes the text representation of the specified object to the Console. /// An additional parameter can be specified for the background color used to write the text. /// - /// The background color used to write the text. + /// The background color used to write the text. /// The value to write. - public static void WriteBackgroundColor(ConsoleColor backgroudColor, object o) + public static void WriteBackgroundColor(ConsoleColor backgroundColor, object o) { ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroudColor; + Console.BackgroundColor = backgroundColor; Console.Write(o); Console.BackgroundColor = oldColor; } diff --git a/sources/ConsoleTools/ConsoleTools/Size.cs b/sources/ConsoleTools/ConsoleTools/Size.cs index 4f6eecee..c2858cf9 100644 --- a/sources/ConsoleTools/ConsoleTools/Size.cs +++ b/sources/ConsoleTools/ConsoleTools/Size.cs @@ -25,7 +25,7 @@ namespace DustInTheWind.ConsoleTools { /// /// Represents the size of a rectangle. - /// Imutable. + /// Immutable. /// public struct Size { diff --git a/sources/ConsoleTools/ConsoleTools/Thickness.cs b/sources/ConsoleTools/ConsoleTools/Thickness.cs index 3f6c02d7..7498336a 100644 --- a/sources/ConsoleTools/ConsoleTools/Thickness.cs +++ b/sources/ConsoleTools/ConsoleTools/Thickness.cs @@ -90,6 +90,13 @@ public Thickness(int uniformLength) Bottom = uniformLength; } + /// + /// Initializes a new instance of the structure + /// using a text representation of the thickness. + /// + /// Must be 4 integer values separated by spaces. + /// Exception thrown if the parameter is null. + /// Exception thrown if the parameter does not have the correct format. public Thickness(string text) { if (text == null) throw new ArgumentNullException(nameof(text)); diff --git a/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs b/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs index 3162314d..ed0e3f02 100644 --- a/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs +++ b/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs @@ -34,9 +34,8 @@ internal abstract class ThreeStageFile : IDisposable protected ThreeStageFile(string fileName) { - if (fileName == null) throw new ArgumentNullException(nameof(fileName)); - - targetFileName = fileName; + targetFileName = fileName ?? throw new ArgumentNullException(nameof(fileName)); + tempFileName = $"{fileName}.tmp"; backupFileName = $"{fileName}.bak"; } From 8f614c6c9839aa97d0c098d0eb4155d55b5412a7 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sat, 7 Mar 2020 22:11:14 +0200 Subject: [PATCH 15/57] added the controls project. --- .../ConsoleTools.Controls.csproj | 9 +++ sources/ConsoleTools/ConsoleTools.sln | 14 ++++ .../ConsoleTools/ConsoleTools/AlignedText.cs | 22 ++++-- .../Guard/MachineLevelGuardian.cs | 10 +-- sources/ConsoleTools/ConsoleTools/Size.cs | 16 ++++ .../ConsoleTools/ConsoleTools/Thickness.cs | 78 ++++++++++--------- 6 files changed, 100 insertions(+), 49 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj new file mode 100644 index 00000000..0cc3587d --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj @@ -0,0 +1,9 @@ + + + + netcoreapp2.2;net45 + DustInTheWind.ConsoleTools.Core + DustInTheWind.ConsoleTools.Core + + + diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index 0044b1fa..866c4c96 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -41,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Cli", "Console EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Core", "ConsoleTools.Core\ConsoleTools.Core.csproj", "{975D695D-1FD2-446F-BD7C-0F7839C1559D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Controls", "ConsoleTools.Controls\ConsoleTools.Controls.csproj", "{94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -267,6 +269,18 @@ Global {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Release-Net452|Any CPU.Build.0 = Release|Any CPU {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU {975D695D-1FD2-446F-BD7C-0F7839C1559D}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Debug-Net452|Any CPU.ActiveCfg = Debug|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Debug-Net452|Any CPU.Build.0 = Debug|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Debug-Net461|Any CPU.ActiveCfg = Debug|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Debug-Net461|Any CPU.Build.0 = Debug|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Release|Any CPU.Build.0 = Release|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Release-Net452|Any CPU.ActiveCfg = Release|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Release-Net452|Any CPU.Build.0 = Release|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Release-Net461|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sources/ConsoleTools/ConsoleTools/AlignedText.cs b/sources/ConsoleTools/ConsoleTools/AlignedText.cs index d30fa695..b5ac01b7 100644 --- a/sources/ConsoleTools/ConsoleTools/AlignedText.cs +++ b/sources/ConsoleTools/ConsoleTools/AlignedText.cs @@ -43,7 +43,7 @@ public class AlignedText /// public string Text { - get { return text; } + get => text; set { text = value; @@ -56,7 +56,7 @@ public string Text /// public int Width { - get { return width; } + get => width; set { width = value; @@ -66,7 +66,7 @@ public int Width /// /// Gets or sets the horizontal alignment to be applied if the property - /// is set on . + /// is set on . /// public HorizontalAlignment DefaultHorizontalAlignment { get; set; } = HorizontalAlignment.Left; @@ -75,7 +75,7 @@ public int Width /// public HorizontalAlignment HorizontalAlignment { - get { return horizontalAlignment; } + get => horizontalAlignment; set { horizontalAlignment = value; @@ -187,7 +187,7 @@ public override string ToString() } /// - /// Aligns a text, in the specified width as is specified by the horizontalAlignemnt value. + /// Aligns a text, in the specified width as is specified by the horizontalAlignment value. /// public static string QuickAlign(string text, HorizontalAlignment horizontalAlignment, int width) { @@ -201,6 +201,12 @@ public static string QuickAlign(string text, HorizontalAlignment horizontalAlign return alignedText.ToString(); } + /// + /// Converts a simple into an instance + /// with default alignment. + /// + /// The text to be converted. + /// An instance of the containing the text. public static implicit operator AlignedText(string text) { return new AlignedText @@ -209,6 +215,12 @@ public static implicit operator AlignedText(string text) }; } + /// + /// Converts a instance into a by + /// extracting the underlying text from the instance. + /// + /// The original instance that contains the test. + /// The extracted from the original instance. public static implicit operator string(AlignedText alignedText) { return alignedText.ToString(); diff --git a/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs b/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs index 7c6d6aa6..d9378743 100644 --- a/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs +++ b/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs @@ -40,16 +40,14 @@ public class MachineLevelGuardian /// /// Initializes a new instance of the class with /// the name that identifies it and - /// the level at which will have efect. + /// the level at which will have effect. /// /// The name that identifies the instance that will be created. /// /// public MachineLevelGuardian(string name) { - if (name == null) throw new ArgumentNullException(nameof(name)); - - Name = name; + Name = name ?? throw new ArgumentNullException(nameof(name)); // Create the mutex. mutex = new Mutex(false, name); @@ -58,7 +56,7 @@ public MachineLevelGuardian(string name) bool access = mutex.WaitOne(0, true); if (!access) - throw new ApplicationException(string.Format("Another instance with the name '{0}' already exists.", name)); + throw new ApplicationException($"Another instance with the name '{name}' already exists."); } private bool isDisposed; @@ -83,10 +81,8 @@ public void Dispose() /// Specifies if the method has been called by a user's code (true) or by the runtime from inside the finalizer (false). private void Dispose(bool disposing) { - // Check to see if Dispose has already been called. if (!isDisposed) { - // If disposing equals true, dispose all managed resources. if (disposing) { // Dispose managed resources. diff --git a/sources/ConsoleTools/ConsoleTools/Size.cs b/sources/ConsoleTools/ConsoleTools/Size.cs index c2858cf9..5f257184 100644 --- a/sources/ConsoleTools/ConsoleTools/Size.cs +++ b/sources/ConsoleTools/ConsoleTools/Size.cs @@ -153,21 +153,37 @@ public override string ToString() return $"{{Width={widthAsString}, Height={heightAsString}}}"; } + /// + /// Creates a new instance having the width and height equal to the sums + /// of the widths and heights of the instances received as parameters. + /// public static Size operator +(Size size1, Size size2) { return new Size(size1.Width + size2.Width, size1.Height + size2.Height); } + /// + /// Creates a new instance having the width and height equal to the difference + /// of the widths and heights of the instances received as parameters. + /// public static Size operator -(Size size1, Size size2) { return new Size(size1.Width - size2.Width, size1.Height - size2.Height); } + /// + /// Creates a new instance having the width and height equal to the original values + /// to which the integer value is added. + /// public static Size operator +(Size size, int value) { return new Size(size.Width + value, size.Height + value); } + /// + /// Creates a new instance having the width and height equal to the original values + /// from which the integer value is subtracted. + /// public static Size operator -(Size size, int value) { return new Size(size.Width - value, size.Height - value); diff --git a/sources/ConsoleTools/ConsoleTools/Thickness.cs b/sources/ConsoleTools/ConsoleTools/Thickness.cs index 7498336a..6192b7e9 100644 --- a/sources/ConsoleTools/ConsoleTools/Thickness.cs +++ b/sources/ConsoleTools/ConsoleTools/Thickness.cs @@ -30,25 +30,25 @@ public struct Thickness : IEquatable /// Gets the number of empty lines displayed before the content. /// Default value: 0 /// - public int Top { get; set; } + public int Top { get; } /// /// Gets the number of empty lines displayed after the content. /// Default value: 0 /// - public int Bottom { get; set; } + public int Bottom { get; } /// /// Gets the number of spaces to be written to the left of the content. /// Default value: 0 /// - public int Left { get; set; } + public int Left { get; } /// /// Gets the number of spaces to be written to the right of the content. /// Default value: 0 /// - public int Right { get; set; } + public int Right { get; } /// /// Initializes a new instance of the structure that has specific lengths applied to each side of the rectangle. @@ -95,44 +95,47 @@ public Thickness(int uniformLength) /// using a text representation of the thickness. /// /// Must be 4 integer values separated by spaces. - /// Exception thrown if the parameter is null. - /// Exception thrown if the parameter does not have the correct format. + /// Exception thrown if the 'text' parameter is null. + /// Exception thrown if the 'text' parameter does not have the correct format. public Thickness(string text) { if (text == null) throw new ArgumentNullException(nameof(text)); string[] chunks = text.Split(' '); - if (chunks.Length == 4) + switch (chunks.Length) { - Left = int.Parse(chunks[0]); - Top = int.Parse(chunks[1]); - Right = int.Parse(chunks[2]); - Bottom = int.Parse(chunks[3]); - } - else if (chunks.Length == 2) - { - int marginHorizontal = int.Parse(chunks[0]); - int marginVertical = int.Parse(chunks[1]); - - Left = marginHorizontal; - Top = marginVertical; - Right = marginHorizontal; - Bottom = marginVertical; - - } - else if (chunks.Length == 1) - { - int margin = int.Parse(chunks[0]); - - Left = margin; - Top = margin; - Right = margin; - Bottom = margin; - } - else - { - throw new ArgumentException("Invalid string representation.", nameof(text)); + case 4: + Left = int.Parse(chunks[0]); + Top = int.Parse(chunks[1]); + Right = int.Parse(chunks[2]); + Bottom = int.Parse(chunks[3]); + + break; + + case 2: + int marginHorizontal = int.Parse(chunks[0]); + int marginVertical = int.Parse(chunks[1]); + + Left = marginHorizontal; + Top = marginVertical; + Right = marginHorizontal; + Bottom = marginVertical; + + break; + + case 1: + int margin = int.Parse(chunks[0]); + + Left = margin; + Top = margin; + Right = margin; + Bottom = margin; + + break; + + default: + throw new ArgumentException("Invalid string representation.", nameof(text)); } } @@ -159,8 +162,9 @@ public override string ToString() /// The object to compare. public override bool Equals(object obj) { - if (obj is Thickness) - return this == (Thickness)obj; + if (obj is Thickness thickness) + return this == thickness; + return false; } From 8ebfb999b8c85bc58e6fb59caa805be8817c99c2 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 8 Mar 2020 09:10:26 +0200 Subject: [PATCH 16/57] split ConsoleTools in multiple projects --- nuget/build.ps1 | 88 +++ .../ActionCommand.cs | 2 +- .../ConsoleTools.Controls.Menus.csproj | 35 + .../CurrentIndexChangedEventArgs.cs | 2 +- .../EmptyCommand.cs | 2 +- .../ICommand.cs | 2 +- .../IMenuItem.cs | 4 +- .../IPrompterCommand.cs | 2 +- .../MenuItemCollection.cs | 2 +- .../MenuItems/LabelMenuItem.cs | 2 +- .../MenuItems/SeparatorMenuItem.cs | 2 +- .../MenuItems/YesNoMenuItem.cs | 2 +- .../NewCommandEventArgs.cs | 2 +- .../Prompter.cs | 2 +- .../PrompterItem.cs | 2 +- .../ScrollMenu.cs | 4 +- .../TextMenu.cs | 2 +- .../TextMenuItem.cs | 2 +- .../TextMenuResources.Designer.cs | 6 +- .../TextMenuResources.fr.resx | 0 .../TextMenuResources.resx | 0 .../TextMenuResources.ro.resx | 0 .../UnhandledCommandEventArgs.cs | 2 +- .../UnknownPrompterCommand.cs | 2 +- .../ConsoleTools.Controls.Spinners.csproj | 35 + .../ISpinnerTemplate.cs | 88 +-- .../ProgressBar.cs | 666 +++++++++--------- .../Spinner.cs | 634 ++++++++--------- .../SpinnerResources.Designer.cs | 180 ++--- .../SpinnerResources.fr.resx | 262 +++---- .../SpinnerResources.resx | 262 +++---- .../SpinnerResources.ro.resx | 262 +++---- .../Templates/BoomerangSpinnerTemplate.cs | 74 +- .../Templates/BubbleSpinnerTemplate.cs | 74 +- .../Templates/FanSpinnerTemplate.cs | 74 +- .../Templates/FillSpinnerTemplate.cs | 332 ++++----- .../Templates/FilledBehavior.cs | 90 +-- .../Templates/HalfBlinkSpinnerTemplate.cs | 76 +- .../Templates/HalfRotateSpinnerTemplate.cs | 76 +- .../Templates/SequenceSpinnerTemplate.cs | 154 ++-- .../Templates/StickSpinnerTemplate.cs | 74 +- .../ValuePosition.cs | 76 +- .../BorderTemplate.cs | 2 +- .../CellBase.cs | 2 +- .../Column.cs | 2 +- .../ColumnList.cs | 2 +- .../ConsoleTools.Controls.Tables.csproj | 20 + .../DataCell.cs | 2 +- .../DataGrid.cs | 6 +- .../DataRow.cs | 2 +- .../DataRowList.cs | 2 +- .../HeaderCell.cs | 2 +- .../HorizontalSeparatorBuilder.cs | 2 +- .../ITablePrinter.cs | 2 +- .../Printers/ConsoleTablePrinter.cs | 2 +- .../Printers/StreamTablePrinter.cs | 2 +- .../Printers/StringTablePrinter.cs | 2 +- .../RenderingModel/BottomBorderData.cs | 2 +- .../RenderingModel/DataBottomBorder.cs | 2 +- .../RenderingModel/DataCellX.cs | 2 +- .../RenderingModel/DataDataSeparator.cs | 2 +- .../RenderingModel/DataGridX.cs | 2 +- .../RenderingModel/DataGridXBuilder.cs | 2 +- .../RenderingModel/DataRowX.cs | 2 +- .../RenderingModel/DataTopBorder.cs | 2 +- .../RenderingModel/HeaderBottomBorder.cs | 2 +- .../RenderingModel/HeaderDataSeparator.cs | 2 +- .../RenderingModel/HeaderRowX.cs | 2 +- .../RenderingModel/HeaderTopBorder.cs | 2 +- .../RenderingModel/TitleBottomBorder.cs | 2 +- .../RenderingModel/TitleDataSeparator.cs | 2 +- .../RenderingModel/TitleHeaderSeparator.cs | 2 +- .../RenderingModel/TitleRowX.cs | 2 +- .../RenderingModel/TitleTopBorder.cs | 2 +- .../TitleCell.cs | 2 +- .../TitleRow.cs | 2 +- .../ApplicationHeader.cs | 0 .../ConsoleTools.Controls.csproj | 57 +- .../ControlRepeater.cs | 0 .../ControlsDiagram.cd | 483 ++++++------- .../HorizontalLine.cs | 0 .../InputControls/DoubleListView.cs | 0 .../InputControls/DoubleView.cs | 0 .../InputControls/FloatListView.cs | 0 .../InputControls/FloatView.cs | 0 .../InputControls/Int32ListView.cs | 0 .../InputControls/Int32View.cs | 0 .../InputControls/Int64ListView.cs | 0 .../InputControls/Int64View.cs | 0 .../ListInputResources.Designer.cs | 144 ++-- .../InputControls/ListInputResources.fr.resx | 248 +++---- .../InputControls/ListInputResources.resx | 248 +++---- .../InputControls/ListInputResources.ro.resx | 248 +++---- .../InputControls/ListView.cs | 0 .../InputControls/ReadWriteMode.cs | 0 .../InputControls/StringListView.cs | 0 .../InputControls/StringView.cs | 0 .../ValueInputResources.Designer.cs | 144 ++-- .../InputControls/ValueInputResources.fr.resx | 248 +++---- .../InputControls/ValueInputResources.resx | 248 +++---- .../InputControls/ValueInputResources.ro.resx | 248 +++---- .../InputControls/ValueView.cs | 0 .../InputControls/YesNoAnswer.cs | 86 +-- .../InputControls/YesNoQuestion.cs | 620 ++++++++-------- .../YesNoQuestionResources.Designer.cs | 144 ++-- .../YesNoQuestionResources.fr.resx | 246 +++---- .../InputControls/YesNoQuestionResources.resx | 246 +++---- .../YesNoQuestionResources.ro.resx | 246 +++---- .../Label.cs | 0 .../MachineLevelGuardian.cs | 218 +++--- .../Musical/MusicalNote.cs | 362 +++++----- .../Musical/MusicalNoteInfo.cs | 76 +- .../Musical/Sound.cs | 434 ++++++------ .../Musical/TextFile1.txt | 78 +- .../Pause.cs | 284 ++++---- .../PauseResources.Designer.cs | 144 ++-- .../PauseResources.fr.resx | 246 +++---- .../PauseResources.resx | 208 +++--- .../PauseResources.ro.resx | 246 +++---- .../TextBlock.cs | 0 .../ThreeStageFile.cs | 146 ++-- .../TitleDisplayEventArgs.cs | 0 .../AlignedText.cs | 456 ++++++------ .../ApplicationInformation.cs | 2 +- .../BlockControl.MarginsAndPaddings.cs | 0 .../BlockControl.WidthAndAlignment.cs | 0 .../BlockControl.cs | 0 .../CommandLine/CliCommand.cs | 1 - .../CommandLine/CliParameter.cs | 0 .../ConsoleReader.cs | 162 ++--- .../ConsoleTools.Core.csproj | 9 +- .../Control.cs | 210 +++--- .../ControlDisplay.cs | 0 .../ControlLayout.cs | 0 .../Cursor.cs | 0 .../CustomConsole.Colors.cs | 148 ++-- .../CustomConsole.Write.BackgroundColor.cs | 306 ++++---- .../CustomConsole.Write.BothColors.cs | 402 +++++------ .../CustomConsole.Write.ForegroundColor.cs | 306 ++++---- ...tomConsole.WriteAligned.BackgroundColor.cs | 232 +++--- .../CustomConsole.WriteAligned.BothColors.cs | 174 ++--- ...ustomConsole.WriteAligned.DefaultColors.cs | 236 +++---- ...tomConsole.WriteAligned.ForegroundColor.cs | 170 ++--- .../CustomConsole.WriteEmphasies.cs | 340 ++++----- .../CustomConsole.WriteError.cs | 370 +++++----- .../CustomConsole.WriteInverted.cs | 322 ++++----- .../CustomConsole.WriteNormal.cs | 186 ++--- .../CustomConsole.WriteSuccess.cs | 340 ++++----- .../CustomConsole.WriteWarning.cs | 406 +++++------ .../DefaultParent.cs | 0 .../ErasableControl.cs | 162 ++--- .../HorizontalAlignment.cs | 106 +-- .../IRepeatableSupport.cs | 0 .../InlineControl.cs | 0 .../InlineTextBlock.cs | 0 .../Location.cs | 196 +++--- .../LongRunningControl.cs | 376 +++++----- .../MultilineText.cs | 656 ++++++++--------- .../Size.cs | 382 +++++----- .../Thickness.cs | 0 .../ConsoleTools.Demo.Guard/App.config | 7 +- .../ConsoleTools.Demo.GuardDemo.csproj | 10 +- .../ConsoleTools.Demo.Guard/Program.cs | 4 +- .../CommandBase.cs | 2 +- ...onsoleTools.Demo.HorizontalLineDemo.csproj | 14 +- .../Program.cs | 2 +- .../App.config | 5 +- .../Commands/ExitCommand.cs | 2 +- .../Commands/ListReadNumbersCommand.cs | 2 +- .../Commands/ListReadQuickCommand.cs | 2 +- .../Commands/ListReadStringsCommand.cs | 2 +- .../ListReadWithCustomParserCommand.cs | 4 +- .../Commands/ListWriteCommand.cs | 2 +- .../Commands/ListWriteQuickCommand.cs | 2 +- .../Commands/ValueReadCommand.cs | 2 +- .../Commands/ValueReadNumberCommand.cs | 2 +- .../Commands/ValueReadQuickCommand.cs | 2 +- .../ValueReadWithDefaultValueCommand.cs | 2 +- .../Commands/ValueWriteCommand.cs | 2 +- .../Commands/ValueWriteQuickCommand.cs | 2 +- .../Commands/YesNoCancelCommand.cs | 2 +- .../Commands/YesNoCommand.cs | 2 +- ...ConsoleTools.Demo.InputControlsDemo.csproj | 14 +- .../MainMenu.cs | 4 +- .../Program.cs | 2 +- .../ConsoleTools.Demo.Musical/App.config | 7 +- .../ConsoleTools.Demo.Musical.csproj | 10 +- .../ConsoleTools.Demo.PauseDemo/App.config | 5 +- .../CommandBase.cs | 2 +- .../ConsoleTools.Demo.PauseDemo.csproj | 14 +- .../ConsoleTools.Demo.PauseDemo/Program.cs | 4 +- .../ConsoleTools.Demo.ProgressBarDemo.csproj | 14 +- .../PresentationLayer/DataProcessingView.cs | 3 +- .../ConsoleTools.Demo.PrompterDemo/App.config | 5 +- .../Commands/ExitCommand.cs | 2 +- .../Commands/HelpCommand.cs | 2 +- .../Commands/PrompterCommand.cs | 2 +- .../Commands/WhaleCommand.cs | 4 +- .../ConsoleTools.Demo.PrompterDemo.csproj | 20 +- .../OceanPrompter.cs | 2 +- .../Commands/CreditsCommand.cs | 2 +- .../Commands/ExitCommand.cs | 2 +- .../Commands/LoadGameCommand.cs | 2 +- .../Commands/NewGameCommand.cs | 2 +- .../Commands/SaveGameCommand.cs | 2 +- .../Commands/SettingsCommand.cs | 2 +- .../ConsoleTools.Demo.ScrollMenuDemo.csproj | 14 +- .../MainMenu.cs | 4 +- .../Commands/BoomerangCommand.cs | 4 +- .../Commands/BubbleCommand.cs | 4 +- .../Commands/ExitCommand.cs | 2 +- .../Commands/FanCommand.cs | 4 +- .../Commands/FillBlock10Command.cs | 4 +- .../Commands/FillEmptyFromEndCommand.cs | 4 +- .../Commands/FillEmptyFromStartCommand.cs | 4 +- .../Commands/FillSuddenEmptyCommand.cs | 4 +- .../Commands/FillWithBordersCommand.cs | 4 +- .../Commands/HalfBlockVerticalCommand.cs | 4 +- .../Commands/HalhBlockSpinCommand.cs | 4 +- .../Commands/StickCommand.cs | 4 +- .../ConsoleTools.Demo.SpinnerDemo.csproj | 24 +- .../ConsoleTools.Demo.SpinnerDemo/MainMenu.cs | 2 +- .../ConsoleTools.Demo.SpinnerDemo/Program.cs | 2 - .../ConsoleTools.Demo.SpinnerDemo/Worker.cs | 2 +- .../Commands/CellPaddingCommand.cs | 4 +- .../Commands/ColorsCommand.cs | 4 +- .../Commands/DoubleLineBorderCommand.cs | 4 +- .../Commands/DrawLinesBetweenRowsCommand.cs | 6 +- .../Commands/ExitDemoCommand.cs | 2 +- .../Commands/LongShortTitleCommand.cs | 4 +- .../Commands/MultilineCellCommand.cs | 8 +- .../Commands/MultilineTitleCommand.cs | 4 +- .../Commands/SimpleBorderCommand.cs | 4 +- .../Commands/SingleLineBorderCommand.cs | 4 +- .../ConsoleTools.Demo.TabularData.csproj | 26 +- .../ConsoleTools.Demo.TabularData/MainMenu.cs | 2 +- .../CommandBase.cs | 2 +- .../ConsoleTools.Demo.TextBlockDemo.csproj | 14 +- .../Program.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo/App.config | 5 +- .../Commands/CloseGameCommand.cs | 2 +- .../Commands/CreditsCommand.cs | 2 +- .../Commands/ExitCommand.cs | 2 +- .../Commands/LoadGameCommand.cs | 2 +- .../Commands/NewGameCommand.cs | 2 +- .../Commands/SaveGameCommand.cs | 2 +- .../Commands/SettingsCommand.cs | 2 +- .../ConsoleTools.Demo.TextMenuDemo.csproj | 14 +- .../MainMenu.cs | 2 +- .../ConsoleTools.Demo.WriteText.csproj | 10 +- .../ConsoleTools.Demo.WriteText/Program.cs | 7 +- .../ConsoleApplicationBase.cs | 2 +- .../ConsoleTools.Mvc/ConsoleTools.Cli.csproj | 2 + .../ConsoleTools.Tables.csproj | 13 - .../ConsoleTools.Tests.csproj | 25 +- ...tualClientWidthTests_NoWidthConstraints.cs | 3 +- ...ualContentWidthTests_NoWidthConstraints.cs | 2 +- ...ActualFullWidthTests_NoWidthConstraints.cs | 2 +- .../ActualWidthTests_NoWidthConstraints.cs | 2 +- .../ConsoleTools.Tests/CustomAssert.cs | 2 +- .../ProgressBarTests/MaxValueTests.cs | 7 +- .../ProgressBarTests/MinValueTests.cs | 7 +- .../GenerateBottomBorderTests.cs | 4 +- .../GenerateHorizontalSeparator1Tests.cs | 4 +- .../GenerateHorizontalSeparator2Tests.cs | 4 +- .../GenerateTopBorderTests.cs | 4 +- ...nstructorMultilineTextAndAlignmentTests.cs | 2 +- .../ConstructorMultilineTextTests.cs | 2 +- .../DataCellTests/ConstructorNoParamsTests.cs | 2 +- .../ConstructorObjectAndAlignmentTests.cs | 2 +- .../DataCellTests/ConstructorObjectTests.cs | 2 +- .../ConstructorStringAndAlignmentTests.cs | 2 +- .../DataCellTests/ConstructorStringTests.cs | 2 +- .../DataCellTests/RenderLineTests.cs | 2 +- .../BuildFromDataTable/ColumnTests.cs | 2 +- .../BuildFromDataTable/RowTests.cs | 2 +- .../BuildFromDataTable/TitleTests.cs | 2 +- .../BuildFromList/ColumnTests.cs | 2 +- .../DataGridTests/BuildFromList/RowTests.cs | 6 +- .../DataGridTests/BuildFromList/TitleTests.cs | 2 +- .../TabularData/RowTests.cs | 2 +- .../TableTests/CellAlignmentPerColumnTests.cs | 2 +- .../TableTests/CellAlignmentPerTableTests.cs | 2 +- .../TableTests/CellAlignmentTests.cs | 2 +- .../TableTests/CellMultilineTests.cs | 2 +- .../TableTests/ConstructorTests.cs | 2 +- .../TableTests/CustomBorderTests.cs | 2 +- .../TableTests/HeaderAlignmentTests.cs | 2 +- .../TableTests/LinesBetweenRowsTests.cs | 2 +- .../TabularData/TableTests/NoBorderTests.cs | 2 +- .../SpecialCaseBorder.LongTitle.Tests.cs | 2 +- .../SpecialCaseBorder.ShortTitle.Tests.cs | 2 +- .../TableTests/TablePaddingTests.cs | 2 +- .../TableTests/TitleAlignmentTests.cs | 2 +- .../TabularData/TableTests/TitleTests.cs | 2 +- .../ConsoleTools.Tests/packages.config | 11 +- sources/ConsoleTools/ConsoleTools.sln | 34 +- .../ConsoleTools/ConsoleTools.csproj | 67 +- 298 files changed, 8861 insertions(+), 8586 deletions(-) create mode 100644 nuget/build.ps1 rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/ActionCommand.cs (98%) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/CurrentIndexChangedEventArgs.cs (97%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/EmptyCommand.cs (97%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/ICommand.cs (96%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/IMenuItem.cs (96%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/IPrompterCommand.cs (96%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/MenuItemCollection.cs (99%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/MenuItems/LabelMenuItem.cs (99%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/MenuItems/SeparatorMenuItem.cs (98%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/MenuItems/YesNoMenuItem.cs (98%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/NewCommandEventArgs.cs (97%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/Prompter.cs (99%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/PrompterItem.cs (97%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/ScrollMenu.cs (99%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/TextMenu.cs (99%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/TextMenuItem.cs (98%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/TextMenuResources.Designer.cs (94%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/TextMenuResources.fr.resx (100%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/TextMenuResources.resx (100%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/TextMenuResources.ro.resx (100%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/UnhandledCommandEventArgs.cs (96%) rename sources/ConsoleTools/{ConsoleTools/Menues => ConsoleTools.Controls.Menus}/UnknownPrompterCommand.cs (96%) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/ISpinnerTemplate.cs (94%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/ProgressBar.cs (92%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Spinner.cs (96%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/SpinnerResources.Designer.cs (92%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/SpinnerResources.fr.resx (97%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/SpinnerResources.resx (97%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/SpinnerResources.ro.resx (97%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Templates/BoomerangSpinnerTemplate.cs (94%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Templates/BubbleSpinnerTemplate.cs (94%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Templates/FanSpinnerTemplate.cs (94%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Templates/FillSpinnerTemplate.cs (96%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Templates/FilledBehavior.cs (94%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Templates/HalfBlinkSpinnerTemplate.cs (94%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Templates/HalfRotateSpinnerTemplate.cs (94%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Templates/SequenceSpinnerTemplate.cs (95%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/Templates/StickSpinnerTemplate.cs (94%) rename sources/ConsoleTools/{ConsoleTools/Spinners => ConsoleTools.Controls.Spinners}/ValuePosition.cs (94%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/BorderTemplate.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/CellBase.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/Column.cs (98%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/ColumnList.cs (99%) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/DataCell.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/DataGrid.cs (98%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/DataRow.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/DataRowList.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/HeaderCell.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/HorizontalSeparatorBuilder.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/ITablePrinter.cs (98%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/Printers/ConsoleTablePrinter.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/Printers/StreamTablePrinter.cs (98%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/Printers/StringTablePrinter.cs (98%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/BottomBorderData.cs (96%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/DataBottomBorder.cs (96%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/DataCellX.cs (94%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/DataDataSeparator.cs (97%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/DataGridX.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/DataGridXBuilder.cs (98%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/DataRowX.cs (97%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/DataTopBorder.cs (96%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/HeaderBottomBorder.cs (96%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/HeaderDataSeparator.cs (97%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/HeaderRowX.cs (97%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/HeaderTopBorder.cs (96%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/TitleBottomBorder.cs (96%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/TitleDataSeparator.cs (97%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/TitleHeaderSeparator.cs (97%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/TitleRowX.cs (95%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/RenderingModel/TitleTopBorder.cs (96%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/TitleCell.cs (99%) rename sources/ConsoleTools/{ConsoleTools.Tables => ConsoleTools.Controls.Tables}/TitleRow.cs (99%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/ApplicationHeader.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/ControlRepeater.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/ControlsDiagram.cd (80%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/HorizontalLine.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/DoubleListView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/DoubleView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/FloatListView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/FloatView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/Int32ListView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/Int32View.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/Int64ListView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/Int64View.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ListInputResources.Designer.cs (95%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ListInputResources.fr.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ListInputResources.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ListInputResources.ro.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ListView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ReadWriteMode.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/StringListView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/StringView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ValueInputResources.Designer.cs (95%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ValueInputResources.fr.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ValueInputResources.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ValueInputResources.ro.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/ValueView.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/YesNoAnswer.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/YesNoQuestion.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/YesNoQuestionResources.Designer.cs (95%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/YesNoQuestionResources.fr.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/YesNoQuestionResources.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/InputControls/YesNoQuestionResources.ro.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/Label.cs (100%) rename sources/ConsoleTools/{ConsoleTools/Guard => ConsoleTools.Controls}/MachineLevelGuardian.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/Musical/MusicalNote.cs (94%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/Musical/MusicalNoteInfo.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/Musical/Sound.cs (98%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/Musical/TextFile1.txt (99%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/Pause.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/PauseResources.Designer.cs (95%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/PauseResources.fr.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/PauseResources.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/PauseResources.ro.resx (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/TextBlock.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/ThreeStageFile.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Controls}/TitleDisplayEventArgs.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/AlignedText.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/ApplicationInformation.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/BlockControl.MarginsAndPaddings.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/BlockControl.WidthAndAlignment.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/BlockControl.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CommandLine/CliCommand.cs (99%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CommandLine/CliParameter.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/ConsoleReader.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Control.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/ControlDisplay.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/ControlLayout.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Cursor.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.Colors.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.Write.BackgroundColor.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.Write.BothColors.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.Write.ForegroundColor.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteAligned.BackgroundColor.cs (98%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteAligned.BothColors.cs (98%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteAligned.DefaultColors.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteAligned.ForegroundColor.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteEmphasies.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteError.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteInverted.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteNormal.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteSuccess.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/CustomConsole.WriteWarning.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/DefaultParent.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/ErasableControl.cs (96%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/HorizontalAlignment.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/IRepeatableSupport.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/InlineControl.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/InlineTextBlock.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Location.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/LongRunningControl.cs (92%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/MultilineText.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Size.cs (97%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Thickness.cs (100%) delete mode 100644 sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj diff --git a/nuget/build.ps1 b/nuget/build.ps1 new file mode 100644 index 00000000..a8ff14ed --- /dev/null +++ b/nuget/build.ps1 @@ -0,0 +1,88 @@ + +$rootDirectory = ".." + + +Write-Output "----------------------------------------------------------------------------------------------------" +Write-Output "Clean up existing files." +Write-Output "----------------------------------------------------------------------------------------------------" + +if (Test-Path "lib") +{ + Remove-Item "lib" -Recurse -Force; +} + +if (Test-Path "*.nupkg") +{ + Remove-Item "*.nupkg" -Recurse -Force; +} + +if (Test-Path "changelog.txt") +{ + Remove-Item "changelog.txt" -Recurse -Force; +} + +if (Test-Path "readme.txt") +{ + Remove-Item "readme.txt" -Recurse -Force; +} + + +Write-Output "----------------------------------------------------------------------------------------------------" +Write-Output "Retrieve all files." +Write-Output "----------------------------------------------------------------------------------------------------" + +Write-Output "---" +Write-Output "--- Retrieve assemblies - net45" +Write-Output "---" + +New-Item -ItemType Directory -Force -Path "lib\net45" +Copy-Item -Path "$rootDirectory\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.dll" -Destination "lib\net45" -Recurse -Container +Copy-Item -Path "$rootDirectory\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.xml" -Destination "lib\net45" -Recurse -Container + +Write-Output "---" +Write-Output "--- Retrieve assemblies - netcoreapp2.2" +Write-Output "---" + +New-Item -ItemType Directory -Force -Path "lib\netcoreapp2.2" +Copy-Item -Path "$rootDirectory\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.dll" -Destination "lib\netcoreapp2.2" -Recurse -Container +Copy-Item -Path "$rootDirectory\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.xml" -Destination "lib\netcoreapp2.2" -Recurse -Container + +Write-Output "---" +Write-Output "--- Retrieve changelog file" +Write-Output "---" + +Copy-Item -Path "$rootDirectory\doc\changelog.txt" -Destination "." -Recurse -Container + +Write-Output "---" +Write-Output "--- Retrieve readme file" +Write-Output "---" + +Copy-Item -Path "$rootDirectory\readme.txt" -Destination "." -Recurse -Container + + +Write-Output "----------------------------------------------------------------------------------------------------" +Write-Output "Create package" +Write-Output "----------------------------------------------------------------------------------------------------" + +nuget pack + + +Write-Output "----------------------------------------------------------------------------------------------------" +Write-Output "Clean up files." +Write-Output "----------------------------------------------------------------------------------------------------" + + +if (Test-Path "lib") +{ + Remove-Item "lib" -Recurse -Force; +} + +if (Test-Path "changelog.txt") +{ + Remove-Item "changelog.txt" -Recurse -Force; +} + +if (Test-Path "readme.txt") +{ + Remove-Item "readme.txt" -Recurse -Force; +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Menues/ActionCommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ActionCommand.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools/Menues/ActionCommand.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/ActionCommand.cs index 76d16997..021971c1 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/ActionCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ActionCommand.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Represents a command that executes an action. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj new file mode 100644 index 00000000..95d6a160 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj @@ -0,0 +1,35 @@ + + + + netcoreapp2.2;net45 + DustInTheWind.ConsoleTools.Controls.Menus + DustInTheWind.ConsoleTools.Constorls.Menus + true + false + false + + + + + + + + + + + + + TextMenuResources.resx + True + True + + + + + + TextMenuResources.Designer.cs + ResXFileCodeGenerator + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Menues/CurrentIndexChangedEventArgs.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/CurrentIndexChangedEventArgs.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Menues/CurrentIndexChangedEventArgs.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/CurrentIndexChangedEventArgs.cs index 7a5415f7..807e792d 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/CurrentIndexChangedEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/CurrentIndexChangedEventArgs.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Contains the data for the event. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/EmptyCommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/EmptyCommand.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Menues/EmptyCommand.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/EmptyCommand.cs index 7853f851..0d7d476f 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/EmptyCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/EmptyCommand.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// A command that does nothing. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/ICommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ICommand.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/Menues/ICommand.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/ICommand.cs index a87011f9..ff7388f2 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/ICommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ICommand.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Represents a command that can be executed. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/IMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/IMenuItem.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/Menues/IMenuItem.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/IMenuItem.cs index 8f6e3897..d81b3fb0 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/IMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/IMenuItem.cs @@ -22,7 +22,7 @@ using System; using System.ComponentModel; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Represent a menu item displayed by the . @@ -89,7 +89,7 @@ public interface IMenuItem /// /// Event raised before the current instance is selected. - /// It gives the oportunity for a subscriber to cancel the selection of the menu item. + /// It gives the opportunity for a subscriber to cancel the selection of the menu item. /// event EventHandler BeforeSelect; diff --git a/sources/ConsoleTools/ConsoleTools/Menues/IPrompterCommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/IPrompterCommand.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/Menues/IPrompterCommand.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/IPrompterCommand.cs index 5a51e461..5b3c99db 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/IPrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/IPrompterCommand.cs @@ -21,7 +21,7 @@ using DustInTheWind.ConsoleTools.CommandLine; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// A command class used by the . diff --git a/sources/ConsoleTools/ConsoleTools/Menues/MenuItemCollection.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools/Menues/MenuItemCollection.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs index 647fd2bc..2f94f6e6 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/MenuItemCollection.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Linq; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// A collection of instances that implements the concept of a current item. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/LabelMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools/Menues/MenuItems/LabelMenuItem.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs index 8db98b8d..88a1e858 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/LabelMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs @@ -22,7 +22,7 @@ using System; using System.ComponentModel; -namespace DustInTheWind.ConsoleTools.Menues.MenuItems +namespace DustInTheWind.ConsoleTools.Controls.Menus.MenuItems { /// /// Represents a menu item that displays a text. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/SeparatorMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools/Menues/MenuItems/SeparatorMenuItem.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs index d25401c4..a229d015 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/SeparatorMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs @@ -22,7 +22,7 @@ using System; using System.ComponentModel; -namespace DustInTheWind.ConsoleTools.Menues.MenuItems +namespace DustInTheWind.ConsoleTools.Controls.Menus.MenuItems { /// /// Represents a separator used to create a spae between groups of menu items in a menu. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/YesNoMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools/Menues/MenuItems/YesNoMenuItem.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs index 48c58c0b..5ca04f98 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/MenuItems/YesNoMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs @@ -22,7 +22,7 @@ using System; using System.ComponentModel; -namespace DustInTheWind.ConsoleTools.Menues.MenuItems +namespace DustInTheWind.ConsoleTools.Controls.Menus.MenuItems { /// /// Displays a yes/no question at the right of the menu item. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/NewCommandEventArgs.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/NewCommandEventArgs.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Menues/NewCommandEventArgs.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/NewCommandEventArgs.cs index 0e3e6c9c..602f87cc 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/NewCommandEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/NewCommandEventArgs.cs @@ -22,7 +22,7 @@ using System; using DustInTheWind.ConsoleTools.CommandLine; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Provides data for NewCommand event. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/Prompter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools/Menues/Prompter.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs index b6e9a3fc..e749ad27 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/Prompter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs @@ -24,7 +24,7 @@ using System.Linq; using DustInTheWind.ConsoleTools.CommandLine; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Provides a way for the user to type a command at the console. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/PrompterItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/PrompterItem.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Menues/PrompterItem.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/PrompterItem.cs index 262d7bd2..ae1f4f40 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/PrompterItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/PrompterItem.cs @@ -21,7 +21,7 @@ using DustInTheWind.ConsoleTools.CommandLine; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Contains information about a cli command that the prompter can handle. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/ScrollMenu.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ScrollMenu.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools/Menues/ScrollMenu.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/ScrollMenu.cs index f1b33801..f3db6b22 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/ScrollMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ScrollMenu.cs @@ -24,7 +24,7 @@ using System.Linq; using System.Threading; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// A menu in which the user can navigate by using the up/down arrow keys. @@ -100,7 +100,7 @@ public ScrollMenu() /// /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of items. /// /// The list of items to be displayed by the menu. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenu.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenu.cs index 52197ff3..23b8badd 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/TextMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenu.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Linq; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Displays a menu that asks the user to select an item by typing its id and executes the command associated with the item. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/TextMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuItem.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools/Menues/TextMenuItem.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuItem.cs index 1908e1ce..fc86734e 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/TextMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuItem.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Represent a menu item displayed by the . diff --git a/sources/ConsoleTools/ConsoleTools/Menues/TextMenuResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuResources.Designer.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Menues/TextMenuResources.Designer.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuResources.Designer.cs index 87344707..51918f5a 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/TextMenuResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuResources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace DustInTheWind.ConsoleTools.Menues { +namespace DustInTheWind.ConsoleTools.Controls.Menus { using System; @@ -19,7 +19,7 @@ namespace DustInTheWind.ConsoleTools.Menues { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class TextMenuResources { @@ -39,7 +39,7 @@ internal TextMenuResources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.Menues.TextMenuResources", typeof(TextMenuResources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.Controls.Menus.TextMenuResources", typeof(TextMenuResources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/sources/ConsoleTools/ConsoleTools/Menues/TextMenuResources.fr.resx b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuResources.fr.resx similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Menues/TextMenuResources.fr.resx rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuResources.fr.resx diff --git a/sources/ConsoleTools/ConsoleTools/Menues/TextMenuResources.resx b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuResources.resx similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Menues/TextMenuResources.resx rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuResources.resx diff --git a/sources/ConsoleTools/ConsoleTools/Menues/TextMenuResources.ro.resx b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuResources.ro.resx similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Menues/TextMenuResources.ro.resx rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuResources.ro.resx diff --git a/sources/ConsoleTools/ConsoleTools/Menues/UnhandledCommandEventArgs.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnhandledCommandEventArgs.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/Menues/UnhandledCommandEventArgs.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/UnhandledCommandEventArgs.cs index 8d164231..c323cea1 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/UnhandledCommandEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnhandledCommandEventArgs.cs @@ -22,7 +22,7 @@ using System; using DustInTheWind.ConsoleTools.CommandLine; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { /// /// Provides data for UnhandledCommand event. diff --git a/sources/ConsoleTools/ConsoleTools/Menues/UnknownPrompterCommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnknownPrompterCommand.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/Menues/UnknownPrompterCommand.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Menus/UnknownPrompterCommand.cs index eb4fc7db..25431d63 100644 --- a/sources/ConsoleTools/ConsoleTools/Menues/UnknownPrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnknownPrompterCommand.cs @@ -22,7 +22,7 @@ using System; using DustInTheWind.ConsoleTools.CommandLine; -namespace DustInTheWind.ConsoleTools.Menues +namespace DustInTheWind.ConsoleTools.Controls.Menus { internal class UnknownPrompterCommand : IPrompterCommand { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj new file mode 100644 index 00000000..ee196543 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj @@ -0,0 +1,35 @@ + + + + netcoreapp2.2;net45 + DustInTheWind.ConsoleTools.Controls.Spinners + DustInTheWind.ConsoleTools.Controls.Spinners + true + false + false + + + + + + + + + + + + + SpinnerResources.resx + True + True + + + + + + SpinnerResources.Designer.cs + ResXFileCodeGenerator + + + + diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/ISpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ISpinnerTemplate.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Spinners/ISpinnerTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/ISpinnerTemplate.cs index 8c3bb6e7..55ea50b5 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/ISpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ISpinnerTemplate.cs @@ -1,45 +1,45 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Spinners -{ - /// - /// A template for the class. - /// It provides each frame of the moving spinner. - /// - public interface ISpinnerTemplate - { - /// - /// Resets the template. It will start from the first frame. - /// - void Reset(); - - /// - /// Moves to the next frame and returns it. - /// - string GetNext(); - - /// - /// Returns the current frame. - /// - string GetCurrent(); - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Controls.Spinners +{ + /// + /// A template for the class. + /// It provides each frame of the moving spinner. + /// + public interface ISpinnerTemplate + { + /// + /// Resets the template. It will start from the first frame. + /// + void Reset(); + + /// + /// Moves to the next frame and returns it. + /// + string GetNext(); + + /// + /// Returns the current frame. + /// + string GetCurrent(); + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/ProgressBar.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ProgressBar.cs similarity index 92% rename from sources/ConsoleTools/ConsoleTools/Spinners/ProgressBar.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/ProgressBar.cs index c5fb37f9..eaf7ac40 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/ProgressBar.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ProgressBar.cs @@ -1,334 +1,334 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools.Spinners -{ - /// - /// Displays value and a graphical display in the form af a horizontal bar. - /// Usually it is used to display the progress from 0% to 100%. - /// - public class ProgressBar : LongRunningControl - { - private readonly Label label = new Label(); - - private int value; - private int minValue; - private int maxValue = 100; - - private int valueCursorLeft; - private int valueCursonTop; - private int valueMaxLength; - private int unitOfMeasurementMaxLength; - - /// - /// Gets or sets the text label to be displayed in front of the progress bar. - /// Default value: "Progress" - /// - public string LabelText - { - get { return label.Text; } - set { label.Text = value; } - } - - /// - /// Gets or sets a velue that specifies if the text label should be displayed. - /// Default value: true - /// - public bool ShowLabel { get; set; } = true; - - /// - /// Gets or sets the left margin of the value range. - /// It must be a number smaller than the . - /// - /// - public int MinValue - { - get { return minValue; } - set - { - if (value > MaxValue) - throw new ArgumentOutOfRangeException(nameof(value), "MinValue cannot be greater than MaxValue."); - - minValue = value; - } - } - - /// - /// Gets or sets the right margin of the value range. - /// It must be a number greater than the . - /// - /// - public int MaxValue - { - get { return maxValue; } - set - { - if (value < MinValue) - throw new ArgumentOutOfRangeException(nameof(value), "MaxValue cannot be less than MinValue."); - - maxValue = value; - } - } - - /// - /// Gets or sets a value that specifies if the control will silently accept values outside - /// the specified range ( - ). - /// If a value smaller then is provides, the control will display . - /// If a value greater then is provides, the control will display . - /// Default value: true - /// - public bool AcceptOutOfRangeValues { get; set; } = true; - - /// - /// Gets or sets the value to be displayed by the current instance. - /// - /// - public int Value - { - get { return value; } - set - { - if (value < MinValue || value > MaxValue && !AcceptOutOfRangeValues) - throw new ArgumentOutOfRangeException(nameof(value), "Value must be between MinValue and MaxValue."); - - this.value = value; - - Refresh(); - } - } - - /// - /// Gets or sets a value that specifies if the underlying value should be displayed. - /// Default value: true - /// - public bool ShowValue { get; set; } = true; - - /// - /// From the start, for the value will be alocated enough space to write all the value in - /// the range specified by and . - /// This meens that some of the numbers will take less space to write. - /// Thisvalue specifies the alignment of the displayed value in its alocated space. - /// - public HorizontalAlignment ValueHorizontalAlignment { get; set; } = HorizontalAlignment.Right; - - /// - /// Gets or sets the position where to display the value, relative to the progress bar. - /// It can be displayed at the left, before the progress bar or at the right, after the progress bar. - /// Default value: Left. - /// - public ValuePosition ValuePosition { get; set; } = ValuePosition.Left; - - /// - /// Gets or sets the unit of measurement to be displayed next to the value. - /// Default: '%' - /// - public string UnitOfMeasurement { get; set; } = "%"; - - /// - /// Gets or sets the length of the displayed progress bar in number of characters. - /// Default value: 50 - /// - public int Length { get; set; } = 50; - - /// - /// Gets or sets the character to be used to paint the empty part of the progress bar. - /// Default value: '.' - /// - public char BarEmptyChar { get; set; } = '.'; - - /// - /// Gets or sets the foreground color of the character used for the empty part of the bar. - /// If this value is null, no specific color is set, the current foreground color set in the is used. - /// - public ConsoleColor? BarEmptyForegroundColor { get; set; } - - /// - /// Gets or sets the background color of the character used for the empty part of the bar. - /// If this value is null, no specific color is set, the current background color set in the is used. - /// - public ConsoleColor? BarEmptyBackgroundColor { get; set; } - - /// - /// Gets or sets the character to be used to paint the filled part of the progress bar. - /// Default value: '█' - /// - public char BarFillChar { get; set; } = '█'; - - /// - /// Gets or sets the foreground color of the character used for the fill part of the bar. - /// If this value is null, no specific color is set, the current foreground color set in the is used. - /// - public ConsoleColor? BarFillForegroundColor { get; set; } - - /// - /// Gets or sets the background color of the character used for the fill part of the bar. - /// If this value is null, no specific color is set, the current background color set in the is used. - /// - public ConsoleColor? BarFillBackgroundColor { get; set; } - - /// - /// Initializes a new instance of the - /// - public ProgressBar() - { - label.Text = "Progress"; - } - - /// - /// Defines the accepted range of values by setting bothe the and . - /// - /// Gets or sets the left margin of the value range. It must be a number smaller than the . - /// Gets or sets the right margin of the value range. It must be a number greater than the . - public void SetLimitValues(int minValue, int maxValue) - { - if (minValue > maxValue) - throw new ArgumentOutOfRangeException(nameof(maxValue), "maxValue must be greater than minValue."); - - this.minValue = minValue; - this.maxValue = maxValue; - } - - /// - /// Displays the current instance to the Console. - /// Important: While the is displayed, it is important to not write anything else to the Console - /// until the method is called. - /// In the meantime, you can update its displayed value by setting the property. The control will - /// automatically update itself in the Console. - /// - protected override void DoDisplayContent() - { - if (ShowLabel) - label.Display(); - - valueCursorLeft = Console.CursorLeft; - valueCursonTop = Console.CursorTop; - - valueMaxLength = Math.Max(MinValue.ToString().Length, MaxValue.ToString().Length); - unitOfMeasurementMaxLength = string.IsNullOrEmpty(UnitOfMeasurement) ? 0 : UnitOfMeasurement.Length; - } - - protected override void DoRefresh() - { - Console.SetCursorPosition(valueCursorLeft, valueCursonTop); - - int calculatedValue = CalculateValue(); - - switch (ValuePosition) - { - default: - if (ShowValue) - { - string valueAsString = ValueToString(calculatedValue); - CustomConsole.Write(valueAsString); - } - - DisplayBar(calculatedValue); - break; - - case ValuePosition.Right: - DisplayBar(calculatedValue); - - if (ShowValue) - { - string valueAsString = ValueToString(calculatedValue); - CustomConsole.Write(valueAsString); - } - break; - } - } - - private void DisplayBar(int calculatedValue) - { - int fillLength = CalculateFillLength(calculatedValue); - int emptyLength = Length - fillLength; - - string fillString = new string(BarFillChar, fillLength); - string emptyString = new string(BarEmptyChar, emptyLength); - - CustomConsole.Write(" ["); - - if (BarFillForegroundColor.HasValue && BarFillBackgroundColor.HasValue) - CustomConsole.Write(BarFillForegroundColor.Value, BarFillBackgroundColor.Value, fillString); - else if (BarFillForegroundColor.HasValue) - CustomConsole.Write(BarFillForegroundColor.Value, fillString); - else if (BarFillBackgroundColor.HasValue) - CustomConsole.WriteBackgroundColor(BarFillBackgroundColor.Value, fillString); - else - CustomConsole.Write(fillString); - - if (BarEmptyForegroundColor.HasValue && BarEmptyBackgroundColor.HasValue) - CustomConsole.Write(BarEmptyForegroundColor.Value, BarEmptyBackgroundColor.Value, emptyString); - else if (BarEmptyForegroundColor.HasValue) - CustomConsole.Write(BarEmptyForegroundColor.Value, emptyString); - else if (BarEmptyBackgroundColor.HasValue) - CustomConsole.WriteBackgroundColor(BarEmptyBackgroundColor.Value, emptyString); - else - CustomConsole.Write(emptyString); - - CustomConsole.Write("]"); - } - - private string ValueToString(int calculatedValue) - { - string valueAsString = calculatedValue.ToString(); - - if (UnitOfMeasurement != null) - valueAsString += UnitOfMeasurement; - - int totalWidth = valueMaxLength + unitOfMeasurementMaxLength; - - return AlignedText.QuickAlign(valueAsString, ValueHorizontalAlignment, totalWidth); - } - - private int CalculateValue() - { - int trimmedValue = Value; - - if (AcceptOutOfRangeValues) - { - trimmedValue = Math.Max(trimmedValue, MinValue); - trimmedValue = Math.Min(trimmedValue, MaxValue); - } - - return trimmedValue; - } - - private int CalculateFillLength(int value) - { - int valueRange = MaxValue - MinValue; - - if (valueRange == 0) - return Length; - - return (value - MinValue) * Length / valueRange; - } - - /// - /// Ends the display of the control. - /// - protected override void DoClose() - { - CustomConsole.WriteLine(); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools.Controls.Spinners +{ + /// + /// Displays value and a graphical display in the form af a horizontal bar. + /// Usually it is used to display the progress from 0% to 100%. + /// + public class ProgressBar : LongRunningControl + { + private readonly InlineTextBlock label = new InlineTextBlock { MarginRight = 1 }; + + private int value; + private int minValue; + private int maxValue = 100; + + private int valueCursorLeft; + private int valueCursorTop; + private int valueMaxLength; + private int unitOfMeasurementMaxLength; + + /// + /// Gets or sets the text label to be displayed in front of the progress bar. + /// Default value: "Progress" + /// + public string LabelText + { + get => label.Text; + set => label.Text = value; + } + + /// + /// Gets or sets a value that specifies if the text label should be displayed. + /// Default value: true + /// + public bool ShowLabel { get; set; } = true; + + /// + /// Gets or sets the left margin of the value range. + /// It must be a number smaller than the . + /// + /// + public int MinValue + { + get => minValue; + set + { + if (value > MaxValue) + throw new ArgumentOutOfRangeException(nameof(value), "MinValue cannot be greater than MaxValue."); + + minValue = value; + } + } + + /// + /// Gets or sets the right margin of the value range. + /// It must be a number greater than the . + /// + /// + public int MaxValue + { + get => maxValue; + set + { + if (value < MinValue) + throw new ArgumentOutOfRangeException(nameof(value), "MaxValue cannot be less than MinValue."); + + maxValue = value; + } + } + + /// + /// Gets or sets a value that specifies if the control will silently accept values outside + /// the specified range ( - ). + /// If a value smaller then is provides, the control will display . + /// If a value greater then is provides, the control will display . + /// Default value: true + /// + public bool AcceptOutOfRangeValues { get; set; } = true; + + /// + /// Gets or sets the value to be displayed by the current instance. + /// + /// + public int Value + { + get => value; + set + { + if (value < MinValue || value > MaxValue && !AcceptOutOfRangeValues) + throw new ArgumentOutOfRangeException(nameof(value), "Value must be between MinValue and MaxValue."); + + this.value = value; + + Refresh(); + } + } + + /// + /// Gets or sets a value that specifies if the underlying value should be displayed. + /// Default value: true + /// + public bool ShowValue { get; set; } = true; + + /// + /// From the start, for the value will be allocated enough space to write all the value in + /// the range specified by and . + /// This means that some of the numbers will take less space to write. + /// This value specifies the alignment of the displayed value in its allocated space. + /// + public HorizontalAlignment ValueHorizontalAlignment { get; set; } = HorizontalAlignment.Right; + + /// + /// Gets or sets the position where to display the value, relative to the progress bar. + /// It can be displayed at the left, before the progress bar or at the right, after the progress bar. + /// Default value: Left. + /// + public ValuePosition ValuePosition { get; set; } = ValuePosition.Left; + + /// + /// Gets or sets the unit of measurement to be displayed next to the value. + /// Default: '%' + /// + public string UnitOfMeasurement { get; set; } = "%"; + + /// + /// Gets or sets the length of the displayed progress bar in number of characters. + /// Default value: 50 + /// + public int Length { get; set; } = 50; + + /// + /// Gets or sets the character to be used to paint the empty part of the progress bar. + /// Default value: '.' + /// + public char BarEmptyChar { get; set; } = '.'; + + /// + /// Gets or sets the foreground color of the character used for the empty part of the bar. + /// If this value is null, no specific color is set, the current foreground color set in the is used. + /// + public ConsoleColor? BarEmptyForegroundColor { get; set; } + + /// + /// Gets or sets the background color of the character used for the empty part of the bar. + /// If this value is null, no specific color is set, the current background color set in the is used. + /// + public ConsoleColor? BarEmptyBackgroundColor { get; set; } + + /// + /// Gets or sets the character to be used to paint the filled part of the progress bar. + /// Default value: '█' + /// + public char BarFillChar { get; set; } = '█'; + + /// + /// Gets or sets the foreground color of the character used for the fill part of the bar. + /// If this value is null, no specific color is set, the current foreground color set in the is used. + /// + public ConsoleColor? BarFillForegroundColor { get; set; } + + /// + /// Gets or sets the background color of the character used for the fill part of the bar. + /// If this value is null, no specific color is set, the current background color set in the is used. + /// + public ConsoleColor? BarFillBackgroundColor { get; set; } + + /// + /// Initializes a new instance of the + /// + public ProgressBar() + { + label.Text = "Progress"; + } + + /// + /// Defines the accepted range of values by setting both the and . + /// + /// Gets or sets the left margin of the value range. It must be a number smaller than the . + /// Gets or sets the right margin of the value range. It must be a number greater than the . + public void SetLimitValues(int minValue, int maxValue) + { + if (minValue > maxValue) + throw new ArgumentOutOfRangeException(nameof(maxValue), "maxValue must be greater than minValue."); + + this.minValue = minValue; + this.maxValue = maxValue; + } + + /// + /// Displays the current instance to the Console. + /// Important: While the is displayed, it is important to not write anything else to the Console + /// until the method is called. + /// In the meantime, you can update its displayed value by setting the property. The control will + /// automatically update itself in the Console. + /// + protected override void DoDisplayContent() + { + if (ShowLabel) + label.Display(); + + valueCursorLeft = Console.CursorLeft; + valueCursorTop = Console.CursorTop; + + valueMaxLength = Math.Max(MinValue.ToString().Length, MaxValue.ToString().Length); + unitOfMeasurementMaxLength = string.IsNullOrEmpty(UnitOfMeasurement) ? 0 : UnitOfMeasurement.Length; + } + + protected override void DoRefresh() + { + Console.SetCursorPosition(valueCursorLeft, valueCursorTop); + + int calculatedValue = CalculateValue(); + + switch (ValuePosition) + { + default: + if (ShowValue) + { + string valueAsString = ValueToString(calculatedValue); + CustomConsole.Write(valueAsString); + } + + DisplayBar(calculatedValue); + break; + + case ValuePosition.Right: + DisplayBar(calculatedValue); + + if (ShowValue) + { + string valueAsString = ValueToString(calculatedValue); + CustomConsole.Write(valueAsString); + } + break; + } + } + + private void DisplayBar(int calculatedValue) + { + int fillLength = CalculateFillLength(calculatedValue); + int emptyLength = Length - fillLength; + + string fillString = new string(BarFillChar, fillLength); + string emptyString = new string(BarEmptyChar, emptyLength); + + CustomConsole.Write(" ["); + + if (BarFillForegroundColor.HasValue && BarFillBackgroundColor.HasValue) + CustomConsole.Write(BarFillForegroundColor.Value, BarFillBackgroundColor.Value, fillString); + else if (BarFillForegroundColor.HasValue) + CustomConsole.Write(BarFillForegroundColor.Value, fillString); + else if (BarFillBackgroundColor.HasValue) + CustomConsole.WriteBackgroundColor(BarFillBackgroundColor.Value, fillString); + else + CustomConsole.Write(fillString); + + if (BarEmptyForegroundColor.HasValue && BarEmptyBackgroundColor.HasValue) + CustomConsole.Write(BarEmptyForegroundColor.Value, BarEmptyBackgroundColor.Value, emptyString); + else if (BarEmptyForegroundColor.HasValue) + CustomConsole.Write(BarEmptyForegroundColor.Value, emptyString); + else if (BarEmptyBackgroundColor.HasValue) + CustomConsole.WriteBackgroundColor(BarEmptyBackgroundColor.Value, emptyString); + else + CustomConsole.Write(emptyString); + + CustomConsole.Write("]"); + } + + private string ValueToString(int calculatedValue) + { + string valueAsString = calculatedValue.ToString(); + + if (UnitOfMeasurement != null) + valueAsString += UnitOfMeasurement; + + int totalWidth = valueMaxLength + unitOfMeasurementMaxLength; + + return AlignedText.QuickAlign(valueAsString, ValueHorizontalAlignment, totalWidth); + } + + private int CalculateValue() + { + int trimmedValue = Value; + + if (AcceptOutOfRangeValues) + { + trimmedValue = Math.Max(trimmedValue, MinValue); + trimmedValue = Math.Min(trimmedValue, MaxValue); + } + + return trimmedValue; + } + + private int CalculateFillLength(int value) + { + int valueRange = MaxValue - MinValue; + + if (valueRange == 0) + return Length; + + return (value - MinValue) * Length / valueRange; + } + + /// + /// Ends the display of the control. + /// + protected override void DoClose() + { + CustomConsole.WriteLine(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Spinner.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Spinner.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/Spinners/Spinner.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Spinner.cs index 396b6e19..d5d6859a 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Spinner.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Spinner.cs @@ -1,318 +1,318 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Timers; -using DustInTheWind.ConsoleTools.Spinners.Templates; - -namespace DustInTheWind.ConsoleTools.Spinners -{ - /// - /// Displays a progress-like visual bar that moves continuously. - /// It can be used for background jobs for which the remaining work cannot be predicted. - /// It supports templates that control the aspect of the spinner (the displayed characters for each frame). - /// - /// - /// - /// The spinner control is using a instance in order to obtain the frames to be displayed. - /// The display interval is configurable. - /// - /// - /// The Spinner has a timer - /// - /// It does not support changing colors while spinning. - /// - public class Spinner : LongRunningControl, IDisposable - { - private readonly ISpinnerTemplate template; - private string templateText; - private bool isDisposed; - private readonly Timer timer; - - /// - /// Gets or sets the label displayed in front of the spinner. - /// Default value: "Please wait" - /// - public InlineTextBlock Label { get; set; } = new InlineTextBlock(SpinnerResources.DefaultLabelText) - { - MarginRight = 1 - }; - - /// - /// Gets or sets a velue that specifies if the text label should be displayed. - /// Default value: true - /// - public bool ShowLabel { get; set; } = true; - - /// - /// Gets or sets a text to be displayed instead of the spinner after the control is closed. - /// - public InlineTextBlock DoneText { get; set; } - - /// - /// Gets or sets the time interval of the frames in milliseconds. - /// It can speed up or slow down the animation. - /// - public double FrameIntervalMilliseconds - { - get => timer.Interval; - set => timer.Interval = value; - } - - /// - /// Gets or sets the time interval of the frames. - /// It can speed up or slow down the animation. - /// - public TimeSpan FrameInterval - { - get => TimeSpan.FromMilliseconds(timer.Interval); - set => timer.Interval = value.TotalMilliseconds; - } - - /// - /// Initializes a new instance of the class. - /// - public Spinner() - { - template = new StickSpinnerTemplate(); - - ShowCursor = false; - - timer = new Timer(400); - timer.Elapsed += HandleTimerElapsed; - } - - /// - /// Initializes a new instance of the class with - /// the template that controls the visual representation. - /// - /// The instance that controls the visual representation of the spinner. - public Spinner(ISpinnerTemplate template) - { - this.template = template ?? throw new ArgumentNullException(nameof(template)); - - ShowCursor = false; - - timer = new Timer(400); - timer.Elapsed += HandleTimerElapsed; - } - - private void HandleTimerElapsed(object sender, ElapsedEventArgs elapsedEventArgs) - { - templateText = template.GetNext(); - Refresh(); - } - - protected override void OnBeforeDisplay() - { - if (isDisposed) - throw new ObjectDisposedException(GetType().FullName); - - base.OnBeforeDisplay(); - } - - /// - /// Displays the spinner and runs it until the method is called. - /// - protected override void DoDisplayContent() - { - template.Reset(); - - if (ShowLabel) - Label?.Display(); - - templateText = template.GetNext(); - timer.Start(); - } - - protected override void OnClosing() - { - if (isDisposed) - throw new ObjectDisposedException(GetType().FullName); - - base.OnClosing(); - } - - /// - /// Stops the animation of the spinner and erases it from the screen by writting spaces over it. - /// - protected override void DoClose() - { - timer.Stop(); - EraseAll(); - - DoneText?.Display(); - Console.WriteLine(); - } - - private void EraseAll() - { - int length = template.GetCurrent().Length; - string text = new string(' ', length); - WriteAndGoBack(text); - } - - protected override void DoRefresh() - { - WriteAndGoBack(templateText); - } - - private static void WriteAndGoBack(string text) - { - int left = Console.CursorLeft; - int top = Console.CursorTop; - - Console.Write(text); - Console.SetCursorPosition(left, top); - } - - /// - /// Releases all resources used by the current instance. - /// (the internal timer used to control the animation.) - /// - public void Dispose() - { - if (isDisposed) - return; - - Close(); - timer.Dispose(); - - isDisposed = true; - } - - /// - /// Creates a new instance with default properties and starts it. - /// - /// The newly created instance. - public static Spinner StartNew() - { - Spinner spinner = new Spinner(); - spinner.Display(); - - return spinner; - } - - /// - /// Creates a new instance, configures it to use the specified template and starts it. - /// - /// The newly created instance. - public static Spinner StartNew(ISpinnerTemplate template) - { - Spinner spinner = new Spinner(template); - spinner.Display(); - - return spinner; - } - - /// - /// Executes the specified action while displaying the default spinner. - /// - /// The action to be executed. - public static void Run(Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - RunInternal(new StickSpinnerTemplate(), action); - } - - /// - /// Executes the specified action while displaying a spinner with the specified template. - /// - /// The spinner template to be used. - /// The action to be executed. - public static void Run(ISpinnerTemplate template, Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - RunInternal(template, action); - } - - private static void RunInternal(ISpinnerTemplate template, Action action) - { - using (Spinner spinner = new Spinner(template)) - { - spinner.Display(); - - try - { - action(); - - spinner.DoneText = new InlineTextBlock(SpinnerResources.DoneText, CustomConsole.SuccessColor); - spinner.Close(); - } - catch - { - spinner.DoneText = new InlineTextBlock(SpinnerResources.ErrorText, CustomConsole.ErrorColor); - spinner.Close(); - throw; - } - } - } - - /// - /// Executes the specified function while displaying the default spinner. - /// - /// The function to be executed. - public static T Run(Func action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - return RunInternal(new StickSpinnerTemplate(), action); - } - - /// - /// Executes the specified function while displaying a spinner with the specified template. - /// - /// The spinner template to be used. - /// The function to be executed. - public static T Run(ISpinnerTemplate template, Func action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - return RunInternal(template, action); - } - - private static T RunInternal(ISpinnerTemplate template, Func action) - { - using (Spinner spinner = new Spinner(template)) - { - spinner.Display(); - - try - { - T result = action(); - - spinner.DoneText = new InlineTextBlock(SpinnerResources.DoneText, CustomConsole.SuccessColor); - spinner.Close(); - - return result; - } - catch - { - spinner.DoneText = new InlineTextBlock(SpinnerResources.ErrorText, CustomConsole.ErrorColor); - spinner.Close(); - throw; - } - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Timers; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; + +namespace DustInTheWind.ConsoleTools.Controls.Spinners +{ + /// + /// Displays a progress-like visual bar that moves continuously. + /// It can be used for background jobs for which the remaining work cannot be predicted. + /// It supports templates that control the aspect of the spinner (the displayed characters for each frame). + /// + /// + /// + /// The spinner control is using a instance in order to obtain the frames to be displayed. + /// The display interval is configurable. + /// + /// + /// The Spinner has a timer + /// + /// It does not support changing colors while spinning. + /// + public class Spinner : LongRunningControl, IDisposable + { + private readonly ISpinnerTemplate template; + private string templateText; + private bool isDisposed; + private readonly Timer timer; + + /// + /// Gets or sets the label displayed in front of the spinner. + /// Default value: "Please wait" + /// + public InlineTextBlock Label { get; set; } = new InlineTextBlock(SpinnerResources.DefaultLabelText) + { + MarginRight = 1 + }; + + /// + /// Gets or sets a velue that specifies if the text label should be displayed. + /// Default value: true + /// + public bool ShowLabel { get; set; } = true; + + /// + /// Gets or sets a text to be displayed instead of the spinner after the control is closed. + /// + public InlineTextBlock DoneText { get; set; } + + /// + /// Gets or sets the time interval of the frames in milliseconds. + /// It can speed up or slow down the animation. + /// + public double FrameIntervalMilliseconds + { + get => timer.Interval; + set => timer.Interval = value; + } + + /// + /// Gets or sets the time interval of the frames. + /// It can speed up or slow down the animation. + /// + public TimeSpan FrameInterval + { + get => TimeSpan.FromMilliseconds(timer.Interval); + set => timer.Interval = value.TotalMilliseconds; + } + + /// + /// Initializes a new instance of the class. + /// + public Spinner() + { + template = new StickSpinnerTemplate(); + + ShowCursor = false; + + timer = new Timer(400); + timer.Elapsed += HandleTimerElapsed; + } + + /// + /// Initializes a new instance of the class with + /// the template that controls the visual representation. + /// + /// The instance that controls the visual representation of the spinner. + public Spinner(ISpinnerTemplate template) + { + this.template = template ?? throw new ArgumentNullException(nameof(template)); + + ShowCursor = false; + + timer = new Timer(400); + timer.Elapsed += HandleTimerElapsed; + } + + private void HandleTimerElapsed(object sender, ElapsedEventArgs elapsedEventArgs) + { + templateText = template.GetNext(); + Refresh(); + } + + protected override void OnBeforeDisplay() + { + if (isDisposed) + throw new ObjectDisposedException(GetType().FullName); + + base.OnBeforeDisplay(); + } + + /// + /// Displays the spinner and runs it until the method is called. + /// + protected override void DoDisplayContent() + { + template.Reset(); + + if (ShowLabel) + Label?.Display(); + + templateText = template.GetNext(); + timer.Start(); + } + + protected override void OnClosing() + { + if (isDisposed) + throw new ObjectDisposedException(GetType().FullName); + + base.OnClosing(); + } + + /// + /// Stops the animation of the spinner and erases it from the screen by writting spaces over it. + /// + protected override void DoClose() + { + timer.Stop(); + EraseAll(); + + DoneText?.Display(); + Console.WriteLine(); + } + + private void EraseAll() + { + int length = template.GetCurrent().Length; + string text = new string(' ', length); + WriteAndGoBack(text); + } + + protected override void DoRefresh() + { + WriteAndGoBack(templateText); + } + + private static void WriteAndGoBack(string text) + { + int left = Console.CursorLeft; + int top = Console.CursorTop; + + Console.Write(text); + Console.SetCursorPosition(left, top); + } + + /// + /// Releases all resources used by the current instance. + /// (the internal timer used to control the animation.) + /// + public void Dispose() + { + if (isDisposed) + return; + + Close(); + timer.Dispose(); + + isDisposed = true; + } + + /// + /// Creates a new instance with default properties and starts it. + /// + /// The newly created instance. + public static Spinner StartNew() + { + Spinner spinner = new Spinner(); + spinner.Display(); + + return spinner; + } + + /// + /// Creates a new instance, configures it to use the specified template and starts it. + /// + /// The newly created instance. + public static Spinner StartNew(ISpinnerTemplate template) + { + Spinner spinner = new Spinner(template); + spinner.Display(); + + return spinner; + } + + /// + /// Executes the specified action while displaying the default spinner. + /// + /// The action to be executed. + public static void Run(Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + RunInternal(new StickSpinnerTemplate(), action); + } + + /// + /// Executes the specified action while displaying a spinner with the specified template. + /// + /// The spinner template to be used. + /// The action to be executed. + public static void Run(ISpinnerTemplate template, Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + RunInternal(template, action); + } + + private static void RunInternal(ISpinnerTemplate template, Action action) + { + using (Spinner spinner = new Spinner(template)) + { + spinner.Display(); + + try + { + action(); + + spinner.DoneText = new InlineTextBlock(SpinnerResources.DoneText, CustomConsole.SuccessColor); + spinner.Close(); + } + catch + { + spinner.DoneText = new InlineTextBlock(SpinnerResources.ErrorText, CustomConsole.ErrorColor); + spinner.Close(); + throw; + } + } + } + + /// + /// Executes the specified function while displaying the default spinner. + /// + /// The function to be executed. + public static T Run(Func action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + return RunInternal(new StickSpinnerTemplate(), action); + } + + /// + /// Executes the specified function while displaying a spinner with the specified template. + /// + /// The spinner template to be used. + /// The function to be executed. + public static T Run(ISpinnerTemplate template, Func action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + return RunInternal(template, action); + } + + private static T RunInternal(ISpinnerTemplate template, Func action) + { + using (Spinner spinner = new Spinner(template)) + { + spinner.Display(); + + try + { + T result = action(); + + spinner.DoneText = new InlineTextBlock(SpinnerResources.DoneText, CustomConsole.SuccessColor); + spinner.Close(); + + return result; + } + catch + { + spinner.DoneText = new InlineTextBlock(SpinnerResources.ErrorText, CustomConsole.ErrorColor); + spinner.Close(); + throw; + } + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.Designer.cs similarity index 92% rename from sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.Designer.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.Designer.cs index a7645459..4e4d30a7 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.Designer.cs @@ -1,90 +1,90 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace DustInTheWind.ConsoleTools.Spinners { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class SpinnerResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal SpinnerResources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.Spinners.SpinnerResources", typeof(SpinnerResources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Please wait. - /// - internal static string DefaultLabelText { - get { - return ResourceManager.GetString("DefaultLabelText", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to [Done]. - /// - internal static string DoneText { - get { - return ResourceManager.GetString("DoneText", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to [Error]. - /// - internal static string ErrorText { - get { - return ResourceManager.GetString("ErrorText", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DustInTheWind.ConsoleTools.Controls.Spinners { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class SpinnerResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal SpinnerResources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.Controls.Spinners.SpinnerResources", typeof(SpinnerResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Please wait. + /// + internal static string DefaultLabelText { + get { + return ResourceManager.GetString("DefaultLabelText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Done]. + /// + internal static string DoneText { + get { + return ResourceManager.GetString("DoneText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Error]. + /// + internal static string ErrorText { + get { + return ResourceManager.GetString("ErrorText", resourceCulture); + } + } + } +} diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.fr.resx b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.fr.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.fr.resx rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.fr.resx index ab46fa86..80d3a6c7 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.fr.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.fr.resx @@ -1,132 +1,132 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Attendez s'il vous plaît - Label text dispayed in front of the spinner. - - - [Terminé] - Text displayed instead of the spinner, when the spinner is stopped. - - - [Erreur] - Text displayed instead of the spinner, when the spinner is stopped because of an error. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Attendez s'il vous plaît + Label text dispayed in front of the spinner. + + + [Terminé] + Text displayed instead of the spinner, when the spinner is stopped. + + + [Erreur] + Text displayed instead of the spinner, when the spinner is stopped because of an error. + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.resx b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.resx rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.resx index eef451d7..6444937f 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.resx @@ -1,132 +1,132 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Please wait - Label text dispayed in front of the spinner. - - - [Done] - Text displayed instead of the spinner, when the spinner is stopped. - - - [Error] - Text displayed instead of the spinner, when the spinner is stopped because of an error. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Please wait + Label text dispayed in front of the spinner. + + + [Done] + Text displayed instead of the spinner, when the spinner is stopped. + + + [Error] + Text displayed instead of the spinner, when the spinner is stopped because of an error. + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.ro.resx b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.ro.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.ro.resx rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.ro.resx index 7bbd3470..ac469e36 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/SpinnerResources.ro.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/SpinnerResources.ro.resx @@ -1,132 +1,132 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Așteptați - Label text dispayed in front of the spinner. - - - [Gata] - Text displayed instead of the spinner, when the spinner is stopped. - - - [Eroare] - Text displayed instead of the spinner, when the spinner is stopped because of an error. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Așteptați + Label text dispayed in front of the spinner. + + + [Gata] + Text displayed instead of the spinner, when the spinner is stopped. + + + [Eroare] + Text displayed instead of the spinner, when the spinner is stopped because of an error. + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BoomerangSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BoomerangSpinnerTemplate.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Spinners/Templates/BoomerangSpinnerTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BoomerangSpinnerTemplate.cs index 6694f704..eb2d22b2 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BoomerangSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BoomerangSpinnerTemplate.cs @@ -1,38 +1,38 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Spinners.Templates -{ - /// - /// A template for the that displays a "boomerang" spinning. - /// It has 4 frames. - /// - public class BoomerangSpinnerTemplate : SequenceSpinnerTemplate - { - /// - /// Initializes a new instance of the class. - /// - public BoomerangSpinnerTemplate() - : base(new[] { "v", "<", "^", ">" }) - { - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates +{ + /// + /// A template for the that displays a "boomerang" spinning. + /// It has 4 frames. + /// + public class BoomerangSpinnerTemplate : SequenceSpinnerTemplate + { + /// + /// Initializes a new instance of the class. + /// + public BoomerangSpinnerTemplate() + : base(new[] { "v", "<", "^", ">" }) + { + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BubbleSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BubbleSpinnerTemplate.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Spinners/Templates/BubbleSpinnerTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BubbleSpinnerTemplate.cs index 143225ca..9b5acb06 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/BubbleSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BubbleSpinnerTemplate.cs @@ -1,38 +1,38 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Spinners.Templates -{ - /// - /// A template for the that displays a "buble" that grous and shrinks. - /// It has 4 frames. - /// - public class BubbleSpinnerTemplate : SequenceSpinnerTemplate - { - /// - /// Initializes a new instance of the class. - /// - public BubbleSpinnerTemplate() - : base(new[] { ".", "o", "0", "o" }) - { - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates +{ + /// + /// A template for the that displays a "buble" that grous and shrinks. + /// It has 4 frames. + /// + public class BubbleSpinnerTemplate : SequenceSpinnerTemplate + { + /// + /// Initializes a new instance of the class. + /// + public BubbleSpinnerTemplate() + : base(new[] { ".", "o", "0", "o" }) + { + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FanSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FanSpinnerTemplate.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Spinners/Templates/FanSpinnerTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FanSpinnerTemplate.cs index 439268c3..db3473b8 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FanSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FanSpinnerTemplate.cs @@ -1,38 +1,38 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Spinners.Templates -{ - /// - /// A template for the that displays a "fan" spinning. - /// It has 2 frames. - /// - public class FanSpinnerTemplate : SequenceSpinnerTemplate - { - /// - /// Initializes a new instance of the class. - /// - public FanSpinnerTemplate() - : base(new[] { "+", "x" }) - { - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates +{ + /// + /// A template for the that displays a "fan" spinning. + /// It has 2 frames. + /// + public class FanSpinnerTemplate : SequenceSpinnerTemplate + { + /// + /// Initializes a new instance of the class. + /// + public FanSpinnerTemplate() + : base(new[] { "+", "x" }) + { + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FillSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FillSpinnerTemplate.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/Spinners/Templates/FillSpinnerTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FillSpinnerTemplate.cs index ecf2c1b1..989dbebb 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FillSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FillSpinnerTemplate.cs @@ -1,167 +1,167 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools.Spinners.Templates -{ - /// - /// A template for the that fills a bar with a specified character. - /// - public class FillSpinnerTemplate : ISpinnerTemplate - { - private readonly char fillChar; - private readonly int length; - private int currentStep; - private FilledBehavior filledBehavior = FilledBehavior.EmptyFromStart; - - /// - /// Gets or sets the border character to be displayed at the left of the bar. - /// - public string BorderStart { get; set; } = "["; - - /// - /// Gets or sets the border character to be displayed at the right of the bar. - /// - public string BorderEnd { get; set; } = "]"; - - /// - /// Gets or sets a value that specifies if the borders are displayed. - /// - public bool ShowBorders { get; set; } - - /// - /// Gets or sets a value that specifies what to do when the bar is filled. - /// - public FilledBehavior FilledBehavior - { - get { return filledBehavior; } - set - { - bool valueIsDefined = Enum.IsDefined(typeof(FilledBehavior), value); - - if (!valueIsDefined) - throw new ArgumentOutOfRangeException(nameof(value)); - - filledBehavior = value; - } - } - - /// - /// Initializes a new instance of the class. - /// - public FillSpinnerTemplate() - { - fillChar = '.'; - length = 4; - } - - /// - /// Initializes a new instance of the class with - /// the character used to fill the bar and - /// the length of the bar. - /// - /// The character used to fill the bar. - /// The length of the bar. - public FillSpinnerTemplate(char fillChar, int length) - { - if (length <= 0) throw new ArgumentOutOfRangeException(nameof(length)); - - this.fillChar = fillChar; - this.length = length; - } - - /// - /// Resets the template. It will start from the first frame. - /// - public void Reset() - { - currentStep = 0; - } - - /// - /// Moves to the next frame and returns it. - /// - public string GetNext() - { - currentStep++; - - int totalStepCount = CalculateTotalStepCount(); - - if (currentStep > totalStepCount - 1) - currentStep = 0; - - return GetCurrent(); - } - - private int CalculateTotalStepCount() - { - switch (FilledBehavior) - { - case FilledBehavior.SuddenEmpty: - return length + 1; - - case FilledBehavior.EmptyFromEnd: - return 2 * length; - - case FilledBehavior.EmptyFromStart: - return 2 * length; - - default: - throw new ArgumentOutOfRangeException(); - } - } - - /// - /// Returns the current frame. - /// - public string GetCurrent() - { - string content = BuildContent(); - - return ShowBorders - ? string.Concat(BorderStart, content, BorderEnd) - : content; - } - - private string BuildContent() - { - switch (FilledBehavior) - { - case FilledBehavior.SuddenEmpty: - return new string(fillChar, currentStep).PadRight(length); - - case FilledBehavior.EmptyFromEnd: - return currentStep < length - ? new string(fillChar, currentStep).PadRight(length) - : new string(fillChar, 2 * length - currentStep).PadRight(length); - - case FilledBehavior.EmptyFromStart: - return currentStep < length - ? new string(fillChar, currentStep).PadRight(length) - : new string(fillChar, 2 * length - currentStep).PadLeft(length); - - default: - throw new ArgumentOutOfRangeException(); - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates +{ + /// + /// A template for the that fills a bar with a specified character. + /// + public class FillSpinnerTemplate : ISpinnerTemplate + { + private readonly char fillChar; + private readonly int length; + private int currentStep; + private FilledBehavior filledBehavior = FilledBehavior.EmptyFromStart; + + /// + /// Gets or sets the border character to be displayed at the left of the bar. + /// + public string BorderStart { get; set; } = "["; + + /// + /// Gets or sets the border character to be displayed at the right of the bar. + /// + public string BorderEnd { get; set; } = "]"; + + /// + /// Gets or sets a value that specifies if the borders are displayed. + /// + public bool ShowBorders { get; set; } + + /// + /// Gets or sets a value that specifies what to do when the bar is filled. + /// + public FilledBehavior FilledBehavior + { + get { return filledBehavior; } + set + { + bool valueIsDefined = Enum.IsDefined(typeof(FilledBehavior), value); + + if (!valueIsDefined) + throw new ArgumentOutOfRangeException(nameof(value)); + + filledBehavior = value; + } + } + + /// + /// Initializes a new instance of the class. + /// + public FillSpinnerTemplate() + { + fillChar = '.'; + length = 4; + } + + /// + /// Initializes a new instance of the class with + /// the character used to fill the bar and + /// the length of the bar. + /// + /// The character used to fill the bar. + /// The length of the bar. + public FillSpinnerTemplate(char fillChar, int length) + { + if (length <= 0) throw new ArgumentOutOfRangeException(nameof(length)); + + this.fillChar = fillChar; + this.length = length; + } + + /// + /// Resets the template. It will start from the first frame. + /// + public void Reset() + { + currentStep = 0; + } + + /// + /// Moves to the next frame and returns it. + /// + public string GetNext() + { + currentStep++; + + int totalStepCount = CalculateTotalStepCount(); + + if (currentStep > totalStepCount - 1) + currentStep = 0; + + return GetCurrent(); + } + + private int CalculateTotalStepCount() + { + switch (FilledBehavior) + { + case FilledBehavior.SuddenEmpty: + return length + 1; + + case FilledBehavior.EmptyFromEnd: + return 2 * length; + + case FilledBehavior.EmptyFromStart: + return 2 * length; + + default: + throw new ArgumentOutOfRangeException(); + } + } + + /// + /// Returns the current frame. + /// + public string GetCurrent() + { + string content = BuildContent(); + + return ShowBorders + ? string.Concat(BorderStart, content, BorderEnd) + : content; + } + + private string BuildContent() + { + switch (FilledBehavior) + { + case FilledBehavior.SuddenEmpty: + return new string(fillChar, currentStep).PadRight(length); + + case FilledBehavior.EmptyFromEnd: + return currentStep < length + ? new string(fillChar, currentStep).PadRight(length) + : new string(fillChar, 2 * length - currentStep).PadRight(length); + + case FilledBehavior.EmptyFromStart: + return currentStep < length + ? new string(fillChar, currentStep).PadRight(length) + : new string(fillChar, 2 * length - currentStep).PadLeft(length); + + default: + throw new ArgumentOutOfRangeException(); + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FilledBehavior.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FilledBehavior.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Spinners/Templates/FilledBehavior.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FilledBehavior.cs index fd4697c0..8abf0b2f 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/FilledBehavior.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FilledBehavior.cs @@ -1,46 +1,46 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Spinners.Templates -{ - /// - /// Specifies what the should do when it is full. - /// - public enum FilledBehavior - { - /// - /// Specifies that the should empty itself when full. - /// - SuddenEmpty, - - /// - /// Specifies that the should decreasing its load - /// starting with the last character displayed. - /// - EmptyFromEnd, - - /// - /// Specifies that the should decreasing its load - /// starting with the first character displayed. - /// - EmptyFromStart - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates +{ + /// + /// Specifies what the should do when it is full. + /// + public enum FilledBehavior + { + /// + /// Specifies that the should empty itself when full. + /// + SuddenEmpty, + + /// + /// Specifies that the should decreasing its load + /// starting with the last character displayed. + /// + EmptyFromEnd, + + /// + /// Specifies that the should decreasing its load + /// starting with the first character displayed. + /// + EmptyFromStart + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfBlinkSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfBlinkSpinnerTemplate.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfBlinkSpinnerTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfBlinkSpinnerTemplate.cs index bf18494d..c9d86f0d 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfBlinkSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfBlinkSpinnerTemplate.cs @@ -1,39 +1,39 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Spinners.Templates -{ - /// - /// A template for the that "splits" the space of one character - /// into two vertical halves that blink alternatively. - /// It has 2 frames. - /// - public class HalfBlinkSpinnerTemplate : SequenceSpinnerTemplate - { - /// - /// Initializes a new instance of the class. - /// - public HalfBlinkSpinnerTemplate() - : base(new[] { "▄", "▀" }) - { - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates +{ + /// + /// A template for the that "splits" the space of one character + /// into two vertical halves that blink alternatively. + /// It has 2 frames. + /// + public class HalfBlinkSpinnerTemplate : SequenceSpinnerTemplate + { + /// + /// Initializes a new instance of the class. + /// + public HalfBlinkSpinnerTemplate() + : base(new[] { "▄", "▀" }) + { + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfRotateSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfRotateSpinnerTemplate.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfRotateSpinnerTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfRotateSpinnerTemplate.cs index 62bea252..51fa36b6 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/HalfRotateSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfRotateSpinnerTemplate.cs @@ -1,39 +1,39 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Spinners.Templates -{ - /// - /// A template for the that displays in turn one half of the one character space: - /// first the bottom half, then the left half, top half and right half. - /// It has 4 frames. - /// - public class HalfRotateSpinnerTemplate : SequenceSpinnerTemplate - { - /// - /// Initializes a new instance of the class. - /// - public HalfRotateSpinnerTemplate() - : base(new[] { "▄", "▌", "▀", "▐" }) - { - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates +{ + /// + /// A template for the that displays in turn one half of the one character space: + /// first the bottom half, then the left half, top half and right half. + /// It has 4 frames. + /// + public class HalfRotateSpinnerTemplate : SequenceSpinnerTemplate + { + /// + /// Initializes a new instance of the class. + /// + public HalfRotateSpinnerTemplate() + : base(new[] { "▄", "▌", "▀", "▐" }) + { + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/SequenceSpinnerTemplate.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/SequenceSpinnerTemplate.cs index 714b9824..c49c7edb 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/SequenceSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/SequenceSpinnerTemplate.cs @@ -1,78 +1,78 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools.Spinners.Templates -{ - /// - /// A template for the that is configured with a list of strings, - /// representing the frames of the . - /// Can be used as base class for other templates. - /// - public class SequenceSpinnerTemplate : ISpinnerTemplate - { - private int counter; - private readonly string[] sequence; - - /// - /// Initializes a new instance of the class with - /// the list of frames. - /// - /// The list of frames. - public SequenceSpinnerTemplate(string[] sequence) - { - this.sequence = sequence ?? throw new ArgumentNullException(nameof(sequence)); - } - - /// - /// Resets the template. It will start from the first frame. - /// - public void Reset() - { - counter = -1; - } - - /// - /// Moves to the next frame and returns it. - /// - public string GetNext() - { - counter++; - - if (counter >= sequence.Length) - counter = 0; - - return sequence[counter]; - } - - /// - /// Returns the current frame. - /// - public string GetCurrent() - { - if (counter == -1) - counter = 0; - - return sequence[counter]; - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates +{ + /// + /// A template for the that is configured with a list of strings, + /// representing the frames of the . + /// Can be used as base class for other templates. + /// + public class SequenceSpinnerTemplate : ISpinnerTemplate + { + private int counter; + private readonly string[] sequence; + + /// + /// Initializes a new instance of the class with + /// the list of frames. + /// + /// The list of frames. + public SequenceSpinnerTemplate(string[] sequence) + { + this.sequence = sequence ?? throw new ArgumentNullException(nameof(sequence)); + } + + /// + /// Resets the template. It will start from the first frame. + /// + public void Reset() + { + counter = -1; + } + + /// + /// Moves to the next frame and returns it. + /// + public string GetNext() + { + counter++; + + if (counter >= sequence.Length) + counter = 0; + + return sequence[counter]; + } + + /// + /// Returns the current frame. + /// + public string GetCurrent() + { + if (counter == -1) + counter = 0; + + return sequence[counter]; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/StickSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/StickSpinnerTemplate.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Spinners/Templates/StickSpinnerTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/StickSpinnerTemplate.cs index ad295398..cd2777e8 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/Templates/StickSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/StickSpinnerTemplate.cs @@ -1,38 +1,38 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Spinners.Templates -{ - /// - /// A template for the that displays a rotating "stick". - /// It has 4 frames. - /// - public class StickSpinnerTemplate : SequenceSpinnerTemplate - { - /// - /// Initializes a new instance of the class. - /// - public StickSpinnerTemplate() - : base(new[] { "/", "-", "\\", "|" }) - { - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates +{ + /// + /// A template for the that displays a rotating "stick". + /// It has 4 frames. + /// + public class StickSpinnerTemplate : SequenceSpinnerTemplate + { + /// + /// Initializes a new instance of the class. + /// + public StickSpinnerTemplate() + : base(new[] { "/", "-", "\\", "|" }) + { + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Spinners/ValuePosition.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ValuePosition.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Spinners/ValuePosition.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Spinners/ValuePosition.cs index 2ef43554..5e5a0395 100644 --- a/sources/ConsoleTools/ConsoleTools/Spinners/ValuePosition.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ValuePosition.cs @@ -1,39 +1,39 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Spinners -{ - /// - /// In the, it specifies the position of the value in regards to the progress bar. - /// - public enum ValuePosition - { - /// - /// The value is displayed at the left, before the progress. - /// - Left, - - /// - /// The value is displayed at the right, after the progress. - /// - Right - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Controls.Spinners +{ + /// + /// In the, it specifies the position of the value in regards to the progress bar. + /// + public enum ValuePosition + { + /// + /// The value is displayed at the left, before the progress. + /// + Left, + + /// + /// The value is displayed at the right, after the progress. + /// + Right + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/BorderTemplate.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/BorderTemplate.cs index e5067d40..b0942a7f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/BorderTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/BorderTemplate.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Text; -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Represents a border template that can be applied on a instance. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs index 7aaa97fd..008c9845 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/CellBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs @@ -21,7 +21,7 @@ using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Represents a table cell that contains data. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/Column.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tables/Column.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs index 1dd80681..2584d138 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/Column.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Represents a column in the class. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs index 64bff8c4..a26da2d3 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/ColumnList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs @@ -24,7 +24,7 @@ using System.Collections.Generic; using System.Linq; -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Keeps the information about the columns from a table. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj new file mode 100644 index 00000000..2bd6e066 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj @@ -0,0 +1,20 @@ + + + + netcoreapp2.2;net45 + DustInTheWind.ConsoleTools.Controls.Tables + DustInTheWind.ConsoleTools.Controls.Tables + true + false + false + + + + + + + + + + + diff --git a/sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs index 137098e1..6692f2c1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Represents a cell that contains data. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index 3acb9476..bed091ff 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -24,10 +24,10 @@ using System.Data; using System.Linq; using System.Reflection; -using DustInTheWind.ConsoleTools.TabularData.Printers; -using DustInTheWind.ConsoleTools.TabularData.RenderingModel; +using DustInTheWind.ConsoleTools.Controls.Tables.Printers; +using DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel; -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// A control that renders a table with data into the console. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs index ce7c88ab..0a938ac9 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs @@ -24,7 +24,7 @@ using System.Collections.Generic; using System.Linq; -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Represents a row in the class. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs index 95506219..7f5ccdc2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/DataRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs @@ -23,7 +23,7 @@ using System.Collections; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Contains the list of s displayed by the table. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs index 16f62951..57c21a97 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Represents the cell that contains a column header. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HorizontalSeparatorBuilder.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/HorizontalSeparatorBuilder.cs index dcf296e3..c2707303 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/HorizontalSeparatorBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HorizontalSeparatorBuilder.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Text; -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Builds the border that separates two rows. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs index 969c2d2a..602a8973 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/ITablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// The implementors of this interface represent the target where a is rendered. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs index 25adb9da..e657e499 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/Printers/ConsoleTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools.TabularData.Printers +namespace DustInTheWind.ConsoleTools.Controls.Tables.Printers { /// /// Writes the parts of a instance to the , diff --git a/sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs index 235d62f0..9955cf41 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/Printers/StreamTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs @@ -22,7 +22,7 @@ using System; using System.IO; -namespace DustInTheWind.ConsoleTools.TabularData.Printers +namespace DustInTheWind.ConsoleTools.Controls.Tables.Printers { /// /// Stores the rendered parts of a instance in a . diff --git a/sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs index 86789f8c..61834529 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/Printers/StringTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs @@ -22,7 +22,7 @@ using System; using System.Text; -namespace DustInTheWind.ConsoleTools.TabularData.Printers +namespace DustInTheWind.ConsoleTools.Controls.Tables.Printers { /// /// Collects the rendered parts of a instance as a plain text that is later diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs index cd1560ea..cc141732 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/BottomBorderData.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class BottomBorderData { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataBottomBorder.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs index 365cd0f5..b2f83ab7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataBottomBorder { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs index ac4d11c2..ca715679 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataCellX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataCellX { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs index 2e24a16c..0f7c4571 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Text; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataDataSeparator { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs index fcbf6774..edcdd52e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs @@ -22,7 +22,7 @@ using System.Collections.Generic; using System.Linq; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataGridX { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index 86f7e5c1..cb377df7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -22,7 +22,7 @@ using System.Collections.Generic; using System.Linq; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataGridXBuilder { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs index c59b19d5..ee2db1d0 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataRowX { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs index f315093c..5fb42a3b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/DataTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataTopBorder { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs index 2487a3c1..4cfbbae5 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderBottomBorder { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs index b99c5a0d..6cb4b8f7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Text; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderDataSeparator { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs index 28bf5e33..7070c757 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderRowX { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs index 70ea7484..991fd367 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/HeaderTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderTopBorder { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs index 165c856b..dc4ea160 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleBottomBorder { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs index 99d91249..6158c301 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Text; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleDataSeparator { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs index 2303b687..749796e2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleHeaderSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Text; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleHeaderSeparator { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs index 7a93c554..d8d50434 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleRowX { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs index db10cfdd..24592701 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/RenderingModel/TitleTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools.TabularData.RenderingModel +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleTopBorder { diff --git a/sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs index a3e83473..9703e858 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Represents the single cell displayed in the title row. diff --git a/sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs index f1124a30..0f6403b8 100644 --- a/sources/ConsoleTools/ConsoleTools.Tables/TitleRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs @@ -21,7 +21,7 @@ using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.TabularData +namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Represents the title row of a table. diff --git a/sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/ApplicationHeader.cs rename to sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj index 0cc3587d..b1b6471f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj @@ -2,8 +2,61 @@ netcoreapp2.2;net45 - DustInTheWind.ConsoleTools.Core - DustInTheWind.ConsoleTools.Core + DustInTheWind.ConsoleTools + DustInTheWind.ConsoleTools.Controls + true + false + false + + + + + + + + + + + ListInputResources.resx + True + True + + + ValueInputResources.resx + True + True + + + YesNoQuestionResources.resx + True + True + + + PauseResources.resx + True + True + + + + + + ListInputResources.Designer.cs + ResXFileCodeGenerator + + + ValueInputResources.Designer.cs + ResXFileCodeGenerator + + + YesNoQuestionResources.Designer.cs + ResXFileCodeGenerator + + + PauseResources.Designer.cs + ResXFileCodeGenerator + + + diff --git a/sources/ConsoleTools/ConsoleTools/ControlRepeater.cs b/sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/ControlRepeater.cs rename to sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs diff --git a/sources/ConsoleTools/ConsoleTools/ControlsDiagram.cd b/sources/ConsoleTools/ConsoleTools.Controls/ControlsDiagram.cd similarity index 80% rename from sources/ConsoleTools/ConsoleTools/ControlsDiagram.cd rename to sources/ConsoleTools/ConsoleTools.Controls/ControlsDiagram.cd index 6d751dcd..b4a26d3a 100644 --- a/sources/ConsoleTools/ConsoleTools/ControlsDiagram.cd +++ b/sources/ConsoleTools/ConsoleTools.Controls/ControlsDiagram.cd @@ -1,255 +1,230 @@ - - - - - - AAAAAAAEAAQAAAAAAIAAAAAACIAAAAAAAAAAAAAAAAA= - ErasableControl.cs - - - - - - AAgAAAAAAAACAAAAAAAAAAAAgIAAAAAAAAAACAAAAAA= - Pause.cs - - - - - - AAAAAAAAACAAIAAAAAAAAAAAAAAAAAAAIAAAgICABAA= - ThreeStageFile.cs - - - - - - - AAgBAAAAANSgAARAAAAAkggIiIBAAEDACEAgAACAABA= - Menues\Prompter.cs - - - - - - - AAAAAAAAACAAAAAAEAAAAAQAAAAAAAAAAAAAAAAAIAA= - Guard\MachineLevelGuardian.cs - - - - - - AAAAAABAEBAAAgABAAAAAAAgpIBACBQAQAAgAQEAAAA= - InputControls\ValueView.cs - - - - - - AIAAQCAFEABQAAEIhAAoAAEAAIiAEFAAAAAAAgAAAAA= - InputControls\YesNoQuestion.cs - - - - - - gAIAgAAAHEQCAEBIgAAQIAgAgIBAAAAAANAAAACQAQA= - Menues\TextMenu.cs - - - - - - - EAAAEAEAEEQAAABAogAQIAAAgIBMAACAAdAAAECAACE= - Menues\ScrollMenu.cs - - - - - - - AAAAAAAAAAAAAgAAAAAAAAAAAAAAAAABgAAAAACAAAA= - Musical\Sound.cs - - - - - - AAQAAAAAEKAAAgBEEEACgCAAAIBCCACEAAAAAABAAAI= - Spinners\Spinner.cs - - - - - - - ABAoQAAABADBBxggAAAIAABAAIAAACCQAIAwAIoIAFA= - Spinners\ProgressBar.cs - - - - - - AAAAAwAAAASAAEAECQAAAQAAEJCEAAAAABAQAAgAAAQ= - TabularData\DataGrid.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\StringView.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\Int32View.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\FloatView.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\DoubleView.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\Int64View.cs - - - - - - AAAIABBAAAAgBAAAAgCAAAAACIBAAAAAAAgECAAAAAA= - BlockControl.cs - - - - - - AAAAAABAAAAABABAAgCAgQhAAIBAAAiAAAAEKACAAAA= - LongRunningControl.cs - - - - - - AABAIAAAAAAAgBUEkAIAAAAAAAAAIIIGAAAAAAAAAAI= - MultilineText.cs - - - - - - - AAABAAAAAIAiAAAAAAAAAAAAAIAAAAGAAAAACAAAABA= - TextBlock.cs - - - - - - AAAAABAAAIQgAAAAAAAAAAAACIAAAAAAAAgAAAAAAAA= - InlineControl.cs - - - - - - AAAAJAAAAAAAAAAAAAAAAABAAIAAAAAAAAAICAAAAAA= - InlineTextBlock.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Label.cs - - - - - - AAAIAAQAUBAAAgABAAAACAAoBIAACBAAQAAgAAEQAAA= - InputControls\ListView.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\DoubleListView.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\FloatListView.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\Int32ListView.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\Int64ListView.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InputControls\StringListView.cs - - - - - - AAAAAAAEAAAABARAAAAEAAAAAIAAAAAAAEAAAAAAAAA= - ControlRepeater.cs - - - - - - AAAAABAAAAQAAAAAAAAAAQBAAABAAAAAAAAAAAAACAA= - Control.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAACAA= - HorizontalLine.cs - - - - - - AAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAACAAAA= - IRepeatableSupport.cs - - - + + + + + + + + + + AAgAAAAAAAQCAAAAAAAAAAAAgICAAAAAAAAACAAEAAA= + Pause.cs + + + + + + AAAAAAAAACAAIAAAAAAAAAAAAAAAAAAAIAAAgICABAA= + ThreeStageFile.cs + + + + + + + AAgBBAAAANSgAARAAAAAkAgIiIBAAEDACEAACACEAAA= + Menues\Prompter.cs + + + + + + + AAAAAAAAACAAAAAAEAAAAAQAAAAAAAAAAAAAAAAAIAA= + Guard\MachineLevelGuardian.cs + + + + + + AAAAAABAEBAAAgABAAAAAAAgpIBACBQAQAAgAQEAAAA= + InputControls\ValueView.cs + + + + + + AIAAACAFEABQAAEIhAAoAAEAAIiAEFCAAAQAAgAAAAA= + InputControls\YesNoQuestion.cs + + + + + + gAIAgAAAHEQCQABIgAAQIAgAgIBAAAAAANAAAICQAQA= + Menues\TextMenu.cs + + + + + + + EAAAEAEAEEQAAABAogAQAAAAgIBMAACAAdAAAECAACE= + Menues\ScrollMenu.cs + + + + + + + AAAAAAAAAAAAAgAAAAAAAAAAAAAAAAABgAAAAACAAAA= + Musical\Sound.cs + + + + + + AAQAAAAAEKAAAgBEEEAAgCAAAIBCCACEMAAAAABAAAI= + Spinners\Spinner.cs + + + + + + + ABAoQAAABADBBxggAAAIAABAAIAAACCQEIAwAIoIAFA= + Spinners\ProgressBar.cs + + + + + + AAAAAwAAAASAAEAECQAAAQAAEJCEAAAAABAQAAgAAAQ= + TabularData\DataGrid.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\StringView.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\Int32View.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\FloatView.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\DoubleView.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\Int64View.cs + + + + + + + + + + + + + + + + + + AAAAAAAAAAACAAAAAAAAAAAAAIAAAAAAAAAACAAEAAA= + TextBlock.cs + + + + + + + + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Label.cs + + + + + + AAAIAAQAUBAAAgABAAAACAAoBIAACBAAQAAgAAEQAAA= + InputControls\ListView.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\DoubleListView.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\FloatListView.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\Int32ListView.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\Int64ListView.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + InputControls\StringListView.cs + + + + + + AAAAAAAEAAAABARAAAAEAAAAAIAAAAAAAEAAAAAAAAA= + ControlRepeater.cs + + + + + + + + + + AAAAAAAAAAACAAAAAAAAAIAAAIAAAAAAAAAAAEAECAA= + HorizontalLine.cs + + + + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/HorizontalLine.cs b/sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/HorizontalLine.cs rename to sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/DoubleListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleListView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/DoubleListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleListView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/DoubleView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/DoubleView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/FloatListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatListView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/FloatListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatListView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/FloatView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/FloatView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int32ListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ListView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/Int32ListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ListView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int32View.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32View.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/Int32View.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32View.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int64ListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ListView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/Int64ListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ListView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/Int64View.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64View.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/Int64View.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64View.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.Designer.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.Designer.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.Designer.cs index 93006961..31efec13 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.Designer.cs @@ -1,72 +1,72 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace DustInTheWind.ConsoleTools.InputControls { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class ListInputResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal ListInputResources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.InputControls.ListInputResources", typeof(ListInputResources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to The input value must be of the type {0}.. - /// - internal static string TypeConversionErrorMessage { - get { - return ResourceManager.GetString("TypeConversionErrorMessage", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DustInTheWind.ConsoleTools.InputControls { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class ListInputResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal ListInputResources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.InputControls.ListInputResources", typeof(ListInputResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The input value must be of the type {0}.. + /// + internal static string TypeConversionErrorMessage { + get { + return ResourceManager.GetString("TypeConversionErrorMessage", resourceCulture); + } + } + } +} diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.fr.resx b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.fr.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.fr.resx rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.fr.resx index f002736e..d63d8cff 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.fr.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.fr.resx @@ -1,125 +1,125 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - La valeur d'entrée doit être du type {0}. - Message displayed when the value provided by the user cannot be converted into the requested type. -0 - the requested type - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + La valeur d'entrée doit être du type {0}. + Message displayed when the value provided by the user cannot be converted into the requested type. +0 - the requested type + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.resx b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.resx rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.resx index 178b35b5..ce9dadb5 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.resx @@ -1,125 +1,125 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - The input value must be of the type {0}. - Message displayed when the value provided by the user cannot be converted into the requested type. -0 - the requested type - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The input value must be of the type {0}. + Message displayed when the value provided by the user cannot be converted into the requested type. +0 - the requested type + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.ro.resx b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.ro.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.ro.resx rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.ro.resx index d2574e30..0bbe9402 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ListInputResources.ro.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.ro.resx @@ -1,125 +1,125 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Valoarea introdusă trebuie să fie de tipul {0}. - Message displayed when the value provided by the user cannot be converted into the requested type. -0 - the requested type - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Valoarea introdusă trebuie să fie de tipul {0}. + Message displayed when the value provided by the user cannot be converted into the requested type. +0 - the requested type + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/ListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ReadWriteMode.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/ReadWriteMode.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/StringListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringListView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/StringListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringListView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/StringView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/StringView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.Designer.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.Designer.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.Designer.cs index 54c4b85c..91b6d483 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.Designer.cs @@ -1,72 +1,72 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace DustInTheWind.ConsoleTools.InputControls { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class ValueInputResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal ValueInputResources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.InputControls.ValueInputResources", typeof(ValueInputResources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to The input value must be of the type {0}.. - /// - internal static string TypeConversionErrorMessage { - get { - return ResourceManager.GetString("TypeConversionErrorMessage", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DustInTheWind.ConsoleTools.InputControls { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class ValueInputResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal ValueInputResources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.InputControls.ValueInputResources", typeof(ValueInputResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The input value must be of the type {0}.. + /// + internal static string TypeConversionErrorMessage { + get { + return ResourceManager.GetString("TypeConversionErrorMessage", resourceCulture); + } + } + } +} diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.fr.resx b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.fr.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.fr.resx rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.fr.resx index f002736e..d63d8cff 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.fr.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.fr.resx @@ -1,125 +1,125 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - La valeur d'entrée doit être du type {0}. - Message displayed when the value provided by the user cannot be converted into the requested type. -0 - the requested type - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + La valeur d'entrée doit être du type {0}. + Message displayed when the value provided by the user cannot be converted into the requested type. +0 - the requested type + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.resx b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.resx rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.resx index 178b35b5..ce9dadb5 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.resx @@ -1,125 +1,125 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - The input value must be of the type {0}. - Message displayed when the value provided by the user cannot be converted into the requested type. -0 - the requested type - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The input value must be of the type {0}. + Message displayed when the value provided by the user cannot be converted into the requested type. +0 - the requested type + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.ro.resx b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.ro.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.ro.resx rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.ro.resx index d2574e30..0bbe9402 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/ValueInputResources.ro.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.ro.resx @@ -1,125 +1,125 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Valoarea introdusă trebuie să fie de tipul {0}. - Message displayed when the value provided by the user cannot be converted into the requested type. -0 - the requested type - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Valoarea introdusă trebuie să fie de tipul {0}. + Message displayed when the value provided by the user cannot be converted into the requested type. +0 - the requested type + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueView.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InputControls/ValueView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueView.cs diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoAnswer.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/YesNoAnswer.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs index 0d1e8d58..d51bafcd 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoAnswer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs @@ -1,44 +1,44 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.InputControls -{ - /// - /// Contains the answers that can be returned by the . - /// - public enum YesNoAnswer - { - /// - /// The user canceled the action. - /// - Cancel, - - /// - /// The user accepted. - /// - Yes, - - /// - /// The user refused. - /// - No - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.InputControls +{ + /// + /// Contains the answers that can be returned by the . + /// + public enum YesNoAnswer + { + /// + /// The user canceled the action. + /// + Cancel, + + /// + /// The user accepted. + /// + Yes, + + /// + /// The user refused. + /// + No + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs index cccc9886..ed215f23 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestion.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs @@ -1,311 +1,311 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Text; - -namespace DustInTheWind.ConsoleTools.InputControls -{ - /// - /// This control reads a yes/no answer from the console. - /// - public class YesNoQuestion : BlockControl - { - /// - /// Gets or sets trhe question that is displayed to the user. - /// - public string QuestionText { get; set; } - - /// - /// Gets or sets the foreground color used for displaying the question. - /// - public ConsoleColor? QuestionForegroundColor { get; set; } = CustomConsole.EmphasizedColor; - - /// - /// Gets or sets the background color used for displaying the question. - /// - public ConsoleColor? QuestionBackgroundColor { get; set; } - - /// - /// Gets or sets the number of spaces to be displayed after the question and the before the user types the answer. - /// Default value: 1 - /// - public int SpaceAfterQuestion { get; set; } = 1; - - /// - /// Gets or sets the text displayed for the "Yes" answer. - /// Default value: "y" - /// - public string YesText { get; set; } = "y"; - - /// - /// Gets or sets the text displayed for the "No" answer. - /// Default value: "n" - /// - public string NoText { get; set; } = "n"; - - /// - /// Gets or sets the text displayed for the "Cancel" answer. - /// Default value: "esc" - /// - public string CancelText { get; set; } = "esc"; - - /// - /// Gets or sets a value that specifies if the first letter of the default answer is displayed with upper case. - /// - public bool CapitalizeDefaultAnswer { get; set; } = true; - - /// - /// Gets or sets the key representing the "Yes" answer. - /// Default value: - /// - public ConsoleKey YesKey { get; set; } = ConsoleKey.Y; - - /// - /// Gets or sets the key representing the "No" answer. - /// Default value: - /// - public ConsoleKey NoKey { get; set; } = ConsoleKey.N; - - /// - /// Gets or sets the key representing the "Cancel" answer. - /// Default value: - /// - public ConsoleKey CancelKey { get; set; } = ConsoleKey.Escape; - - /// - /// Gets or sets the key that will accept the default answer. - /// Default value: - /// - public ConsoleKey AcceptDefaultKey { get; set; } = ConsoleKey.Enter; - - /// - /// Gets or sets a value that specifies if the "Cancel" answer is accepted as a valid answer. - /// If this value is false, the user is forced to answer with "Yes" or "No". - /// Default value: false - /// - public bool AcceptCancel { get; set; } = false; - - /// - /// Gets or sets a value that specifies if the is accepted as "Cancel" - /// beside the key defined by the . - /// Default =value: true - /// - public bool AcceptEscapeAsCancel { get; set; } = true; - - /// - /// Gets or sets the answer that is issued when the key is pressed. - /// Default value: null - /// - public YesNoAnswer? DefaultAnswer { get; set; } - - /// - /// Gets the last answer provided by the user. - /// - public YesNoAnswer Answer { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public YesNoQuestion() - { - } - - /// - /// Initializes a new instance of the class with - /// the question to be displayed to the user. - /// - /// The question text to be displayed to the user. - public YesNoQuestion(string questionText) - { - QuestionText = questionText; - } - - /// - /// Displays the question to the user and waits for the answer. - /// - public YesNoAnswer ReadAnswer() - { - Display(); - return Answer; - } - - /// - /// Displays the question to the user and waits for the answer. - /// - protected override void DoDisplayContent(ControlDisplay display) - { - if (QuestionText != null) - DisplayQuestion(); - - DisplayPossibleAnswersList(); - - if (SpaceAfterQuestion > 0) - DisplaySpaceAfterQuestion(); - - Answer = ReadAnswerInternal(); - } - - private void DisplayQuestion() - { - InlineTextBlock labelControl = new InlineTextBlock - { - PaddingRight = 1, - ForegroundColor = QuestionForegroundColor ?? ForegroundColor, - BackgroundColor = QuestionBackgroundColor ?? BackgroundColor, - Text = QuestionText - }; - labelControl.Display(); - } - - private void DisplaySpaceAfterQuestion() - { - string space = new string(' ', SpaceAfterQuestion); - - InlineTextBlock inlineTextBlock = new InlineTextBlock - { - Text = space, - ForegroundColor = ForegroundColor, - BackgroundColor = BackgroundColor - }; - inlineTextBlock.Display(); - } - - /// - /// Displays to the console the list of possible answers. - /// - protected virtual void DisplayPossibleAnswersList() - { - StringBuilder sb = new StringBuilder(); - - sb.Append("["); - - string yesText = CapitalizeDefaultAnswer && DefaultAnswer == YesNoAnswer.Yes - ? YesText.ToUpper() - : YesText; - sb.Append(yesText); - - sb.Append("/"); - - string noText = CapitalizeDefaultAnswer && DefaultAnswer == YesNoAnswer.No - ? NoText.ToUpper() - : NoText; - sb.Append(noText); - - if (AcceptCancel) - { - sb.Append("/"); - - string cancelText = CapitalizeDefaultAnswer && DefaultAnswer == YesNoAnswer.Cancel - ? CancelText.ToUpper() - : CancelText; - sb.Append(cancelText); - } - - sb.Append("]"); - - InlineTextBlock inlineTextBlock = new InlineTextBlock - { - Text = sb.ToString(), - ForegroundColor = ForegroundColor, - BackgroundColor = BackgroundColor - }; - inlineTextBlock.Display(); - } - - private YesNoAnswer ReadAnswerInternal() - { - while (true) - { - ConsoleKeyInfo consoleKeyInfo = Console.ReadKey(true); - - if (consoleKeyInfo.Key == AcceptDefaultKey && DefaultAnswer.HasValue) - { - string defaultText; - - switch (DefaultAnswer.Value) - { - case YesNoAnswer.Yes: - defaultText = YesText; - break; - - case YesNoAnswer.No: - defaultText = NoText; - break; - - case YesNoAnswer.Cancel: - defaultText = CancelText; - break; - - default: - throw new ArgumentOutOfRangeException(); - } - - Console.WriteLine(defaultText); - return DefaultAnswer.Value; - } - - if (AcceptCancel) - { - if (consoleKeyInfo.Key == CancelKey) - { - Console.WriteLine(consoleKeyInfo.KeyChar); - return YesNoAnswer.Cancel; - } - - if (AcceptEscapeAsCancel && consoleKeyInfo.Key == ConsoleKey.Escape) - { - Console.WriteLine(YesNoQuestionResources.QuestionCanceled); - return YesNoAnswer.Cancel; - } - } - - if (consoleKeyInfo.Key == YesKey) - { - Console.WriteLine(consoleKeyInfo.KeyChar); - return YesNoAnswer.Yes; - } - - if (consoleKeyInfo.Key == NoKey) - { - Console.WriteLine(consoleKeyInfo.KeyChar); - return YesNoAnswer.No; - } - } - } - - /// - /// Displays the specified question and returns the answer using a instance with default configuration. - /// - /// The question text to be displayed to the user. - /// An optional default answer to be returned if the user does not provide a specific answer. - /// The answer read from the console. - public static YesNoAnswer QuickRead(string questionText, YesNoAnswer? defaultAnswer = null) - { - YesNoQuestion yesNoQuestion = new YesNoQuestion(questionText); - - if (defaultAnswer != null) - yesNoQuestion.DefaultAnswer = defaultAnswer; - - return yesNoQuestion.ReadAnswer(); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Text; + +namespace DustInTheWind.ConsoleTools.InputControls +{ + /// + /// This control reads a yes/no answer from the console. + /// + public class YesNoQuestion : BlockControl + { + /// + /// Gets or sets trhe question that is displayed to the user. + /// + public string QuestionText { get; set; } + + /// + /// Gets or sets the foreground color used for displaying the question. + /// + public ConsoleColor? QuestionForegroundColor { get; set; } = CustomConsole.EmphasizedColor; + + /// + /// Gets or sets the background color used for displaying the question. + /// + public ConsoleColor? QuestionBackgroundColor { get; set; } + + /// + /// Gets or sets the number of spaces to be displayed after the question and the before the user types the answer. + /// Default value: 1 + /// + public int SpaceAfterQuestion { get; set; } = 1; + + /// + /// Gets or sets the text displayed for the "Yes" answer. + /// Default value: "y" + /// + public string YesText { get; set; } = "y"; + + /// + /// Gets or sets the text displayed for the "No" answer. + /// Default value: "n" + /// + public string NoText { get; set; } = "n"; + + /// + /// Gets or sets the text displayed for the "Cancel" answer. + /// Default value: "esc" + /// + public string CancelText { get; set; } = "esc"; + + /// + /// Gets or sets a value that specifies if the first letter of the default answer is displayed with upper case. + /// + public bool CapitalizeDefaultAnswer { get; set; } = true; + + /// + /// Gets or sets the key representing the "Yes" answer. + /// Default value: + /// + public ConsoleKey YesKey { get; set; } = ConsoleKey.Y; + + /// + /// Gets or sets the key representing the "No" answer. + /// Default value: + /// + public ConsoleKey NoKey { get; set; } = ConsoleKey.N; + + /// + /// Gets or sets the key representing the "Cancel" answer. + /// Default value: + /// + public ConsoleKey CancelKey { get; set; } = ConsoleKey.Escape; + + /// + /// Gets or sets the key that will accept the default answer. + /// Default value: + /// + public ConsoleKey AcceptDefaultKey { get; set; } = ConsoleKey.Enter; + + /// + /// Gets or sets a value that specifies if the "Cancel" answer is accepted as a valid answer. + /// If this value is false, the user is forced to answer with "Yes" or "No". + /// Default value: false + /// + public bool AcceptCancel { get; set; } = false; + + /// + /// Gets or sets a value that specifies if the is accepted as "Cancel" + /// beside the key defined by the . + /// Default =value: true + /// + public bool AcceptEscapeAsCancel { get; set; } = true; + + /// + /// Gets or sets the answer that is issued when the key is pressed. + /// Default value: null + /// + public YesNoAnswer? DefaultAnswer { get; set; } + + /// + /// Gets the last answer provided by the user. + /// + public YesNoAnswer Answer { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public YesNoQuestion() + { + } + + /// + /// Initializes a new instance of the class with + /// the question to be displayed to the user. + /// + /// The question text to be displayed to the user. + public YesNoQuestion(string questionText) + { + QuestionText = questionText; + } + + /// + /// Displays the question to the user and waits for the answer. + /// + public YesNoAnswer ReadAnswer() + { + Display(); + return Answer; + } + + /// + /// Displays the question to the user and waits for the answer. + /// + protected override void DoDisplayContent(ControlDisplay display) + { + if (QuestionText != null) + DisplayQuestion(); + + DisplayPossibleAnswersList(); + + if (SpaceAfterQuestion > 0) + DisplaySpaceAfterQuestion(); + + Answer = ReadAnswerInternal(); + } + + private void DisplayQuestion() + { + InlineTextBlock labelControl = new InlineTextBlock + { + PaddingRight = 1, + ForegroundColor = QuestionForegroundColor ?? ForegroundColor, + BackgroundColor = QuestionBackgroundColor ?? BackgroundColor, + Text = QuestionText + }; + labelControl.Display(); + } + + private void DisplaySpaceAfterQuestion() + { + string space = new string(' ', SpaceAfterQuestion); + + InlineTextBlock inlineTextBlock = new InlineTextBlock + { + Text = space, + ForegroundColor = ForegroundColor, + BackgroundColor = BackgroundColor + }; + inlineTextBlock.Display(); + } + + /// + /// Displays to the console the list of possible answers. + /// + protected virtual void DisplayPossibleAnswersList() + { + StringBuilder sb = new StringBuilder(); + + sb.Append("["); + + string yesText = CapitalizeDefaultAnswer && DefaultAnswer == YesNoAnswer.Yes + ? YesText.ToUpper() + : YesText; + sb.Append(yesText); + + sb.Append("/"); + + string noText = CapitalizeDefaultAnswer && DefaultAnswer == YesNoAnswer.No + ? NoText.ToUpper() + : NoText; + sb.Append(noText); + + if (AcceptCancel) + { + sb.Append("/"); + + string cancelText = CapitalizeDefaultAnswer && DefaultAnswer == YesNoAnswer.Cancel + ? CancelText.ToUpper() + : CancelText; + sb.Append(cancelText); + } + + sb.Append("]"); + + InlineTextBlock inlineTextBlock = new InlineTextBlock + { + Text = sb.ToString(), + ForegroundColor = ForegroundColor, + BackgroundColor = BackgroundColor + }; + inlineTextBlock.Display(); + } + + private YesNoAnswer ReadAnswerInternal() + { + while (true) + { + ConsoleKeyInfo consoleKeyInfo = Console.ReadKey(true); + + if (consoleKeyInfo.Key == AcceptDefaultKey && DefaultAnswer.HasValue) + { + string defaultText; + + switch (DefaultAnswer.Value) + { + case YesNoAnswer.Yes: + defaultText = YesText; + break; + + case YesNoAnswer.No: + defaultText = NoText; + break; + + case YesNoAnswer.Cancel: + defaultText = CancelText; + break; + + default: + throw new ArgumentOutOfRangeException(); + } + + Console.WriteLine(defaultText); + return DefaultAnswer.Value; + } + + if (AcceptCancel) + { + if (consoleKeyInfo.Key == CancelKey) + { + Console.WriteLine(consoleKeyInfo.KeyChar); + return YesNoAnswer.Cancel; + } + + if (AcceptEscapeAsCancel && consoleKeyInfo.Key == ConsoleKey.Escape) + { + Console.WriteLine(YesNoQuestionResources.QuestionCanceled); + return YesNoAnswer.Cancel; + } + } + + if (consoleKeyInfo.Key == YesKey) + { + Console.WriteLine(consoleKeyInfo.KeyChar); + return YesNoAnswer.Yes; + } + + if (consoleKeyInfo.Key == NoKey) + { + Console.WriteLine(consoleKeyInfo.KeyChar); + return YesNoAnswer.No; + } + } + } + + /// + /// Displays the specified question and returns the answer using a instance with default configuration. + /// + /// The question text to be displayed to the user. + /// An optional default answer to be returned if the user does not provide a specific answer. + /// The answer read from the console. + public static YesNoAnswer QuickRead(string questionText, YesNoAnswer? defaultAnswer = null) + { + YesNoQuestion yesNoQuestion = new YesNoQuestion(questionText); + + if (defaultAnswer != null) + yesNoQuestion.DefaultAnswer = defaultAnswer; + + return yesNoQuestion.ReadAnswer(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.Designer.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.Designer.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.Designer.cs index 8254a91c..dc361df4 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.Designer.cs @@ -1,72 +1,72 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace DustInTheWind.ConsoleTools.InputControls { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class YesNoQuestionResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal YesNoQuestionResources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.InputControls.YesNoQuestionResources", typeof(YesNoQuestionResources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Canceled. - /// - internal static string QuestionCanceled { - get { - return ResourceManager.GetString("QuestionCanceled", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DustInTheWind.ConsoleTools.InputControls { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class YesNoQuestionResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal YesNoQuestionResources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.InputControls.YesNoQuestionResources", typeof(YesNoQuestionResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Canceled. + /// + internal static string QuestionCanceled { + get { + return ResourceManager.GetString("QuestionCanceled", resourceCulture); + } + } + } +} diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.fr.resx b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.fr.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.fr.resx rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.fr.resx index 31ad222f..ba55ac23 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.fr.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.fr.resx @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Annulé - Text displayed when the user canceled the question. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Annulé + Text displayed when the user canceled the question. + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.resx b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.resx rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.resx index 0ca86933..95f2ada7 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.resx @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Canceled - Text displayed when the user canceled the question. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Canceled + Text displayed when the user canceled the question. + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.ro.resx b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.ro.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.ro.resx rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.ro.resx index 53e99c90..6de274d1 100644 --- a/sources/ConsoleTools/ConsoleTools/InputControls/YesNoQuestionResources.ro.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.ro.resx @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Anulat - Text displayed when the user canceled the question. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Anulat + Text displayed when the user canceled the question. + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Label.cs b/sources/ConsoleTools/ConsoleTools.Controls/Label.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Label.cs rename to sources/ConsoleTools/ConsoleTools.Controls/Label.cs diff --git a/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs b/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs rename to sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs index d9378743..3669b51d 100644 --- a/sources/ConsoleTools/ConsoleTools/Guard/MachineLevelGuardian.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs @@ -1,110 +1,110 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Threading; - -namespace DustInTheWind.ConsoleTools.Guard -{ - public class MachineLevelGuardian - { - /// - /// The object used to ensure that only one instance - /// of the class is created on the current machine. (Machine level) - /// - private Mutex mutex; - - /// - /// Gets the name of the current instance. - /// - public string Name { get; } - - /// - /// Initializes a new instance of the class with - /// the name that identifies it and - /// the level at which will have effect. - /// - /// The name that identifies the instance that will be created. - /// - /// - public MachineLevelGuardian(string name) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - - // Create the mutex. - mutex = new Mutex(false, name); - - // Gain exclusive access to the mutex. - bool access = mutex.WaitOne(0, true); - - if (!access) - throw new ApplicationException($"Another instance with the name '{name}' already exists."); - } - - private bool isDisposed; - - /// - /// Releases all resources used by the current instance. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Releases all resources used by the current instance. - /// - /// - /// Dispose(bool disposing) executes in two distinct scenarios. - /// If the method has been called directly or indirectly by a user's code managed and unmanaged resources can be disposed. - /// If the method has been called by the runtime from inside the finalizer you should not reference other objects. Only unmanaged resources can be disposed. - /// - /// Specifies if the method has been called by a user's code (true) or by the runtime from inside the finalizer (false). - private void Dispose(bool disposing) - { - if (!isDisposed) - { - if (disposing) - { - // Dispose managed resources. - // ... - - mutex?.Close(); - mutex = null; - } - - // Call the appropriate methods to clean up unmanaged resources here. - // ... - - isDisposed = true; - } - } - - /// - /// Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. - /// - ~MachineLevelGuardian() - { - Dispose(false); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Threading; + +namespace DustInTheWind.ConsoleTools.Guard +{ + public class MachineLevelGuardian + { + /// + /// The object used to ensure that only one instance + /// of the class is created on the current machine. (Machine level) + /// + private Mutex mutex; + + /// + /// Gets the name of the current instance. + /// + public string Name { get; } + + /// + /// Initializes a new instance of the class with + /// the name that identifies it and + /// the level at which will have effect. + /// + /// The name that identifies the instance that will be created. + /// + /// + public MachineLevelGuardian(string name) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + + // Create the mutex. + mutex = new Mutex(false, name); + + // Gain exclusive access to the mutex. + bool access = mutex.WaitOne(0, true); + + if (!access) + throw new ApplicationException($"Another instance with the name '{name}' already exists."); + } + + private bool isDisposed; + + /// + /// Releases all resources used by the current instance. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Releases all resources used by the current instance. + /// + /// + /// Dispose(bool disposing) executes in two distinct scenarios. + /// If the method has been called directly or indirectly by a user's code managed and unmanaged resources can be disposed. + /// If the method has been called by the runtime from inside the finalizer you should not reference other objects. Only unmanaged resources can be disposed. + /// + /// Specifies if the method has been called by a user's code (true) or by the runtime from inside the finalizer (false). + private void Dispose(bool disposing) + { + if (!isDisposed) + { + if (disposing) + { + // Dispose managed resources. + // ... + + mutex?.Close(); + mutex = null; + } + + // Call the appropriate methods to clean up unmanaged resources here. + // ... + + isDisposed = true; + } + } + + /// + /// Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. + /// + ~MachineLevelGuardian() + { + Dispose(false); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Musical/MusicalNote.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools/Musical/MusicalNote.cs rename to sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs index 5a795d70..6167cb51 100644 --- a/sources/ConsoleTools/ConsoleTools/Musical/MusicalNote.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs @@ -1,182 +1,182 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Musical -{ - /// - /// Represents a musical note. - /// - public enum MusicalNote - { - None, - - C0, - Cd0, - Db0, - D0, - Dd0, - Eb0, - E0, - F0, - Fd0, - Gb0, - G0, - Gd0, - Ab0, - A0, - Ad0, - Bb0, - B0, - - C1, - Cd1, - Db1, - D1, - Dd1, - Eb1, - E1, - F1, - Fd1, - Gb1, - G1, - Gd1, - Ab1, - A1, - Ad1, - Bb1, - B1, - - C2, - Cd2, - Db2, - D2, - Dd2, - Eb2, - E2, - F2, - Fd2, - Gb2, - G2, - Gd2, - Ab2, - A2, - Ad2, - Bb2, - B2, - - C3, - Cd3, - Db3, - D3, - Dd3, - Eb3, - E3, - F3, - Fd3, - Gb3, - G3, - Gd3, - Ab3, - A3, - Ad3, - Bb3, - B3, - - C4, - Cd4, - Db4, - D4, - Dd4, - Eb4, - E4, - F4, - Fd4, - Gb4, - G4, - Gd4, - Ab4, - A4, - Ad4, - Bb4, - B4, - - C5, - Cd5, - Db5, - D5, - Dd5, - Eb5, - E5, - F5, - Fd5, - Gb5, - G5, - Gd5, - Ab5, - A5, - Ad5, - Bb5, - B5, - - C6, - Cd6, - Db6, - D6, - Dd6, - Eb6, - E6, - F6, - Fd6, - Gb6, - G6, - Gd6, - Ab6, - A6, - Ad6, - Bb6, - B6, - - C7, - Cd7, - Db7, - D7, - Dd7, - Eb7, - E7, - F7, - Fd7, - Gb7, - G7, - Gd7, - Ab7, - A7, - Ad7, - Bb7, - B7, - - C8, - Cd8, - Db8, - D8, - Dd8, - Eb8 - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Musical +{ + /// + /// Represents a musical note. + /// + public enum MusicalNote + { + None, + + C0, + Cd0, + Db0, + D0, + Dd0, + Eb0, + E0, + F0, + Fd0, + Gb0, + G0, + Gd0, + Ab0, + A0, + Ad0, + Bb0, + B0, + + C1, + Cd1, + Db1, + D1, + Dd1, + Eb1, + E1, + F1, + Fd1, + Gb1, + G1, + Gd1, + Ab1, + A1, + Ad1, + Bb1, + B1, + + C2, + Cd2, + Db2, + D2, + Dd2, + Eb2, + E2, + F2, + Fd2, + Gb2, + G2, + Gd2, + Ab2, + A2, + Ad2, + Bb2, + B2, + + C3, + Cd3, + Db3, + D3, + Dd3, + Eb3, + E3, + F3, + Fd3, + Gb3, + G3, + Gd3, + Ab3, + A3, + Ad3, + Bb3, + B3, + + C4, + Cd4, + Db4, + D4, + Dd4, + Eb4, + E4, + F4, + Fd4, + Gb4, + G4, + Gd4, + Ab4, + A4, + Ad4, + Bb4, + B4, + + C5, + Cd5, + Db5, + D5, + Dd5, + Eb5, + E5, + F5, + Fd5, + Gb5, + G5, + Gd5, + Ab5, + A5, + Ad5, + Bb5, + B5, + + C6, + Cd6, + Db6, + D6, + Dd6, + Eb6, + E6, + F6, + Fd6, + Gb6, + G6, + Gd6, + Ab6, + A6, + Ad6, + Bb6, + B6, + + C7, + Cd7, + Db7, + D7, + Dd7, + Eb7, + E7, + F7, + Fd7, + Gb7, + G7, + Gd7, + Ab7, + A7, + Ad7, + Bb7, + B7, + + C8, + Cd8, + Db8, + D8, + Dd8, + Eb8 + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Musical/MusicalNoteInfo.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Musical/MusicalNoteInfo.cs rename to sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs index dc2dd7a4..6a6e6a3c 100644 --- a/sources/ConsoleTools/ConsoleTools/Musical/MusicalNoteInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs @@ -1,39 +1,39 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools.Musical -{ - public struct MusicalNoteInfo - { - public MusicalNote MusicalNote { get; } - public double Frequency { get; } - public double Wavelength { get; } - - public static readonly MusicalNoteInfo Empty = new MusicalNoteInfo(MusicalNote.None, 0, 0); - - public MusicalNoteInfo(MusicalNote musicalNote, double frequency, double wavelength) - { - MusicalNote = musicalNote; - Frequency = frequency; - Wavelength = wavelength; - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools.Musical +{ + public struct MusicalNoteInfo + { + public MusicalNote MusicalNote { get; } + public double Frequency { get; } + public double Wavelength { get; } + + public static readonly MusicalNoteInfo Empty = new MusicalNoteInfo(MusicalNote.None, 0, 0); + + public MusicalNoteInfo(MusicalNote musicalNote, double frequency, double wavelength) + { + MusicalNote = musicalNote; + Frequency = frequency; + Wavelength = wavelength; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Musical/Sound.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools/Musical/Sound.cs rename to sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs index 2347fad4..d1e9b557 100644 --- a/sources/ConsoleTools/ConsoleTools/Musical/Sound.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs @@ -1,218 +1,218 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; - -namespace DustInTheWind.ConsoleTools.Musical -{ - public static class Sound - { - private static readonly Dictionary MusicalNotes = new Dictionary - { - { MusicalNote.C0, new MusicalNoteInfo(MusicalNote.C0, 16.35, 2100) }, - { MusicalNote.Cd0, new MusicalNoteInfo(MusicalNote.Cd0, 17.32, 1990) }, - { MusicalNote.Db0, new MusicalNoteInfo(MusicalNote.Db0, 17.32, 1990) }, - { MusicalNote.D0, new MusicalNoteInfo(MusicalNote.D0, 18.35, 1870) }, - { MusicalNote.Dd0, new MusicalNoteInfo(MusicalNote.Dd0, 19.45, 1770) }, - { MusicalNote.Eb0, new MusicalNoteInfo(MusicalNote.Eb0, 19.45, 1770) }, - { MusicalNote.E0, new MusicalNoteInfo(MusicalNote.E0, 20.6, 1670) }, - { MusicalNote.F0, new MusicalNoteInfo(MusicalNote.F0, 21.83, 1580) }, - { MusicalNote.Fd0, new MusicalNoteInfo(MusicalNote.Fd0, 23.12, 1490) }, - { MusicalNote.Gb0, new MusicalNoteInfo(MusicalNote.Gb0, 23.12, 1490) }, - { MusicalNote.G0, new MusicalNoteInfo(MusicalNote.G0, 24.5, 1400) }, - { MusicalNote.Gd0, new MusicalNoteInfo(MusicalNote.Gd0, 25.96, 1320) }, - { MusicalNote.Ab0, new MusicalNoteInfo(MusicalNote.Ab0, 25.96, 1320) }, - { MusicalNote.A0, new MusicalNoteInfo(MusicalNote.A0, 27.5, 1250) }, - { MusicalNote.Ad0, new MusicalNoteInfo(MusicalNote.Ad0, 29.14, 1180) }, - { MusicalNote.Bb0, new MusicalNoteInfo(MusicalNote.Bb0, 29.14, 1180) }, - { MusicalNote.B0, new MusicalNoteInfo(MusicalNote.B0, 30.87, 1110) }, - { MusicalNote.C1, new MusicalNoteInfo(MusicalNote.C1, 32.7, 1050) }, - { MusicalNote.Cd1, new MusicalNoteInfo(MusicalNote.Cd1, 34.65, 996) }, - { MusicalNote.Db1, new MusicalNoteInfo(MusicalNote.Db1, 34.65, 996) }, - { MusicalNote.D1, new MusicalNoteInfo(MusicalNote.D1, 36.71, 940) }, - { MusicalNote.Dd1, new MusicalNoteInfo(MusicalNote.Dd1, 38.89, 887) }, - { MusicalNote.Eb1, new MusicalNoteInfo(MusicalNote.Eb1, 38.89, 887) }, - { MusicalNote.E1, new MusicalNoteInfo(MusicalNote.E1, 41.2, 837) }, - { MusicalNote.F1, new MusicalNoteInfo(MusicalNote.F1, 43.65, 790) }, - { MusicalNote.Fd1, new MusicalNoteInfo(MusicalNote.Fd1, 46.25, 746) }, - { MusicalNote.Gb1, new MusicalNoteInfo(MusicalNote.Gb1, 46.25, 746) }, - { MusicalNote.G1, new MusicalNoteInfo(MusicalNote.G1, 49, 704) }, - { MusicalNote.Gd1, new MusicalNoteInfo(MusicalNote.Gd1, 51.91, 665) }, - { MusicalNote.Ab1, new MusicalNoteInfo(MusicalNote.Ab1, 51.91, 665) }, - { MusicalNote.A1, new MusicalNoteInfo(MusicalNote.A1, 55, 627) }, - { MusicalNote.Ad1, new MusicalNoteInfo(MusicalNote.Ad1, 58.27, 592) }, - { MusicalNote.Bb1, new MusicalNoteInfo(MusicalNote.Bb1, 58.27, 592) }, - { MusicalNote.B1, new MusicalNoteInfo(MusicalNote.B1, 61.74, 559) }, - { MusicalNote.C2, new MusicalNoteInfo(MusicalNote.C2, 65.41, 527) }, - { MusicalNote.Cd2, new MusicalNoteInfo(MusicalNote.Cd2, 69.3, 498) }, - { MusicalNote.Db2, new MusicalNoteInfo(MusicalNote.Db2, 69.3, 498) }, - { MusicalNote.D2, new MusicalNoteInfo(MusicalNote.D2, 73.42, 470) }, - { MusicalNote.Dd2, new MusicalNoteInfo(MusicalNote.Dd2, 77.78, 444) }, - { MusicalNote.Eb2, new MusicalNoteInfo(MusicalNote.Eb2, 77.78, 444) }, - { MusicalNote.E2, new MusicalNoteInfo(MusicalNote.E2, 82.41, 419) }, - { MusicalNote.F2, new MusicalNoteInfo(MusicalNote.F2, 87.31, 395) }, - { MusicalNote.Fd2, new MusicalNoteInfo(MusicalNote.Fd2, 92.5, 373) }, - { MusicalNote.Gb2, new MusicalNoteInfo(MusicalNote.Gb2, 92.5, 373) }, - { MusicalNote.G2, new MusicalNoteInfo(MusicalNote.G2, 98, 352) }, - { MusicalNote.Gd2, new MusicalNoteInfo(MusicalNote.Gd2, 103.83, 332) }, - { MusicalNote.Ab2, new MusicalNoteInfo(MusicalNote.Ab2, 103.83, 332) }, - { MusicalNote.A2, new MusicalNoteInfo(MusicalNote.A2, 110, 314) }, - { MusicalNote.Ad2, new MusicalNoteInfo(MusicalNote.Ad2, 116.54, 296) }, - { MusicalNote.Bb2, new MusicalNoteInfo(MusicalNote.Bb2, 116.54, 296) }, - { MusicalNote.B2, new MusicalNoteInfo(MusicalNote.B2, 123.47, 279) }, - { MusicalNote.C3, new MusicalNoteInfo(MusicalNote.C3, 130.81, 264) }, - { MusicalNote.Cd3, new MusicalNoteInfo(MusicalNote.Cd3, 138.59, 249) }, - { MusicalNote.Db3, new MusicalNoteInfo(MusicalNote.Db3, 138.59, 249) }, - { MusicalNote.D3, new MusicalNoteInfo(MusicalNote.D3, 146.83, 235) }, - { MusicalNote.Dd3, new MusicalNoteInfo(MusicalNote.Dd3, 155.56, 222) }, - { MusicalNote.Eb3, new MusicalNoteInfo(MusicalNote.Eb3, 155.56, 222) }, - { MusicalNote.E3, new MusicalNoteInfo(MusicalNote.E3, 164.81, 209) }, - { MusicalNote.F3, new MusicalNoteInfo(MusicalNote.F3, 174.61, 198) }, - { MusicalNote.Fd3, new MusicalNoteInfo(MusicalNote.Fd3, 185, 186) }, - { MusicalNote.Gb3, new MusicalNoteInfo(MusicalNote.Gb3, 185, 186) }, - { MusicalNote.G3, new MusicalNoteInfo(MusicalNote.G3, 196, 176) }, - { MusicalNote.Gd3, new MusicalNoteInfo(MusicalNote.Gd3, 207.65, 166) }, - { MusicalNote.Ab3, new MusicalNoteInfo(MusicalNote.Ab3, 207.65, 166) }, - { MusicalNote.A3, new MusicalNoteInfo(MusicalNote.A3, 220, 157) }, - { MusicalNote.Ad3, new MusicalNoteInfo(MusicalNote.Ad3, 233.08, 148) }, - { MusicalNote.Bb3, new MusicalNoteInfo(MusicalNote.Bb3, 233.08, 148) }, - { MusicalNote.B3, new MusicalNoteInfo(MusicalNote.B3, 246.94, 140) }, - { MusicalNote.C4, new MusicalNoteInfo(MusicalNote.C4, 261.63, 132) }, - { MusicalNote.Cd4, new MusicalNoteInfo(MusicalNote.Cd4, 277.18, 124) }, - { MusicalNote.Db4, new MusicalNoteInfo(MusicalNote.Db4, 277.18, 124) }, - { MusicalNote.D4, new MusicalNoteInfo(MusicalNote.D4, 293.66, 117) }, - { MusicalNote.Dd4, new MusicalNoteInfo(MusicalNote.Dd4, 311.13, 111) }, - { MusicalNote.Eb4, new MusicalNoteInfo(MusicalNote.Eb4, 311.13, 111) }, - { MusicalNote.E4, new MusicalNoteInfo(MusicalNote.E4, 329.63, 105) }, - { MusicalNote.F4, new MusicalNoteInfo(MusicalNote.F4, 349.23, 98.8) }, - { MusicalNote.Fd4, new MusicalNoteInfo(MusicalNote.Fd4, 369.99, 93.2) }, - { MusicalNote.Gb4, new MusicalNoteInfo(MusicalNote.Gb4, 369.99, 93.2) }, - { MusicalNote.G4, new MusicalNoteInfo(MusicalNote.G4, 392, 88) }, - { MusicalNote.Gd4, new MusicalNoteInfo(MusicalNote.Gd4, 415.3, 83.1) }, - { MusicalNote.Ab4, new MusicalNoteInfo(MusicalNote.Ab4, 415.3, 83.1) }, - { MusicalNote.A4, new MusicalNoteInfo(MusicalNote.A4, 440, 78.4) }, - { MusicalNote.Ad4, new MusicalNoteInfo(MusicalNote.Ad4, 466.16, 74) }, - { MusicalNote.Bb4, new MusicalNoteInfo(MusicalNote.Bb4, 466.16, 74) }, - { MusicalNote.B4, new MusicalNoteInfo(MusicalNote.B4, 493.88, 69.9) }, - { MusicalNote.C5, new MusicalNoteInfo(MusicalNote.C5, 523.25, 65.9) }, - { MusicalNote.Cd5, new MusicalNoteInfo(MusicalNote.Cd5, 554.37, 62.2) }, - { MusicalNote.Db5, new MusicalNoteInfo(MusicalNote.Db5, 554.37, 62.2) }, - { MusicalNote.D5, new MusicalNoteInfo(MusicalNote.D5, 587.33, 58.7) }, - { MusicalNote.Dd5, new MusicalNoteInfo(MusicalNote.Dd5, 622.25, 55.4) }, - { MusicalNote.Eb5, new MusicalNoteInfo(MusicalNote.Eb5, 622.25, 55.4) }, - { MusicalNote.E5, new MusicalNoteInfo(MusicalNote.E5, 659.26, 52.3) }, - { MusicalNote.F5, new MusicalNoteInfo(MusicalNote.F5, 698.46, 49.4) }, - { MusicalNote.Fd5, new MusicalNoteInfo(MusicalNote.Fd5, 739.99, 46.6) }, - { MusicalNote.Gb5, new MusicalNoteInfo(MusicalNote.Gb5, 739.99, 46.6) }, - { MusicalNote.G5, new MusicalNoteInfo(MusicalNote.G5, 783.99, 44) }, - { MusicalNote.Gd5, new MusicalNoteInfo(MusicalNote.Gd5, 830.61, 41.5) }, - { MusicalNote.Ab5, new MusicalNoteInfo(MusicalNote.Ab5, 830.61, 41.5) }, - { MusicalNote.A5, new MusicalNoteInfo(MusicalNote.A5, 880, 39.2) }, - { MusicalNote.Ad5, new MusicalNoteInfo(MusicalNote.Ad5, 932.33, 37) }, - { MusicalNote.Bb5, new MusicalNoteInfo(MusicalNote.Bb5, 932.33, 37) }, - { MusicalNote.B5, new MusicalNoteInfo(MusicalNote.B5, 987.77, 34.9) }, - { MusicalNote.C6, new MusicalNoteInfo(MusicalNote.C6, 1046.5, 33) }, - { MusicalNote.Cd6, new MusicalNoteInfo(MusicalNote.Cd6, 1108.73, 31.1) }, - { MusicalNote.Db6, new MusicalNoteInfo(MusicalNote.Db6, 1108.73, 31.1) }, - { MusicalNote.D6, new MusicalNoteInfo(MusicalNote.D6, 1174.66, 29.4) }, - { MusicalNote.Dd6, new MusicalNoteInfo(MusicalNote.Dd6, 1244.51, 27.7) }, - { MusicalNote.Eb6, new MusicalNoteInfo(MusicalNote.Eb6, 1244.51, 27.7) }, - { MusicalNote.E6, new MusicalNoteInfo(MusicalNote.E6, 1318.51, 26.2) }, - { MusicalNote.F6, new MusicalNoteInfo(MusicalNote.F6, 1396.91, 24.7) }, - { MusicalNote.Fd6, new MusicalNoteInfo(MusicalNote.Fd6, 1479.98, 23.3) }, - { MusicalNote.Gb6, new MusicalNoteInfo(MusicalNote.Gb6, 1479.98, 23.3) }, - { MusicalNote.G6, new MusicalNoteInfo(MusicalNote.G6, 1567.98, 22) }, - { MusicalNote.Gd6, new MusicalNoteInfo(MusicalNote.Gd6, 1661.22, 20.8) }, - { MusicalNote.Ab6, new MusicalNoteInfo(MusicalNote.Ab6, 1661.22, 20.8) }, - { MusicalNote.A6, new MusicalNoteInfo(MusicalNote.A6, 1760, 19.6) }, - { MusicalNote.Ad6, new MusicalNoteInfo(MusicalNote.Ad6, 1864.66, 18.5) }, - { MusicalNote.Bb6, new MusicalNoteInfo(MusicalNote.Bb6, 1864.66, 18.5) }, - { MusicalNote.B6, new MusicalNoteInfo(MusicalNote.B6, 1975.53, 17.5) }, - { MusicalNote.C7, new MusicalNoteInfo(MusicalNote.C7, 2093, 16.5) }, - { MusicalNote.Cd7, new MusicalNoteInfo(MusicalNote.Cd7, 2217.46, 15.6) }, - { MusicalNote.Db7, new MusicalNoteInfo(MusicalNote.Db7, 2217.46, 15.6) }, - { MusicalNote.D7, new MusicalNoteInfo(MusicalNote.D7, 2349.32, 14.7) }, - { MusicalNote.Dd7, new MusicalNoteInfo(MusicalNote.Dd7, 2489.02, 13.9) }, - { MusicalNote.Eb7, new MusicalNoteInfo(MusicalNote.Eb7, 2489.02, 13.9) }, - { MusicalNote.E7, new MusicalNoteInfo(MusicalNote.E7, 2637.02, 13.1) }, - { MusicalNote.F7, new MusicalNoteInfo(MusicalNote.F7, 2793.83, 12.3) }, - { MusicalNote.Fd7, new MusicalNoteInfo(MusicalNote.Fd7, 2959.96, 11.7) }, - { MusicalNote.Gb7, new MusicalNoteInfo(MusicalNote.Gb7, 2959.96, 11.7) }, - { MusicalNote.G7, new MusicalNoteInfo(MusicalNote.G7, 3135.96, 11) }, - { MusicalNote.Gd7, new MusicalNoteInfo(MusicalNote.Gd7, 3322.44, 10.4) }, - { MusicalNote.Ab7, new MusicalNoteInfo(MusicalNote.Ab7, 3322.44, 10.4) }, - { MusicalNote.A7, new MusicalNoteInfo(MusicalNote.A7, 3520, 9.8) }, - { MusicalNote.Ad7, new MusicalNoteInfo(MusicalNote.Ad7, 3729.31, 9.3) }, - { MusicalNote.Bb7, new MusicalNoteInfo(MusicalNote.Bb7, 3729.31, 9.3) }, - { MusicalNote.B7, new MusicalNoteInfo(MusicalNote.B7, 3951.07, 8.7) }, - { MusicalNote.C8, new MusicalNoteInfo(MusicalNote.C8, 4186.01, 8.2) }, - { MusicalNote.Cd8, new MusicalNoteInfo(MusicalNote.Cd8, 4434.92, 7.8) }, - { MusicalNote.Db8, new MusicalNoteInfo(MusicalNote.Db8, 4434.92, 7.8) }, - { MusicalNote.D8, new MusicalNoteInfo(MusicalNote.D8, 4698.64, 7.3) }, - { MusicalNote.Dd8, new MusicalNoteInfo(MusicalNote.Dd8, 4978.03, 6.9) }, - { MusicalNote.Eb8, new MusicalNoteInfo(MusicalNote.Eb8, 4978.03, 6.9) } - }; - - public static MusicalNoteInfo GetMusicalNoteInfo(MusicalNote musicalNote) - { - return MusicalNotes.ContainsKey(musicalNote) - ? MusicalNotes[musicalNote] - : MusicalNoteInfo.Empty; - } - - /// - /// Returns the frequency of a musical note. - /// - /// The musical note for which to return the frequency. - /// The frequency of the musical note. - public static double GetFrequency(MusicalNote musicalNote) - { - return MusicalNotes.ContainsKey(musicalNote) - ? MusicalNotes[musicalNote].Frequency - : 0; - } - - /// - /// Returns the wavelength of a musical note. - /// - /// The musical note for which to return the wavelength. - /// The wavelength of the musical note. - public static double GetWavelength(MusicalNote musicalNote) - { - return MusicalNotes.ContainsKey(musicalNote) - ? MusicalNotes[musicalNote].Wavelength - : 0; - } - - /// - /// Playes a musical note at the speaker. - /// - /// The musical note to be played. - /// The time duration in milliseconds for which to play the note. - public static void Play(MusicalNote musicalNote, int duration) - { - double frequency = GetFrequency(musicalNote); - int frequencyInteger = Convert.ToInt32(frequency); - Console.Beep(frequencyInteger, duration); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.Musical +{ + public static class Sound + { + private static readonly Dictionary MusicalNotes = new Dictionary + { + { MusicalNote.C0, new MusicalNoteInfo(MusicalNote.C0, 16.35, 2100) }, + { MusicalNote.Cd0, new MusicalNoteInfo(MusicalNote.Cd0, 17.32, 1990) }, + { MusicalNote.Db0, new MusicalNoteInfo(MusicalNote.Db0, 17.32, 1990) }, + { MusicalNote.D0, new MusicalNoteInfo(MusicalNote.D0, 18.35, 1870) }, + { MusicalNote.Dd0, new MusicalNoteInfo(MusicalNote.Dd0, 19.45, 1770) }, + { MusicalNote.Eb0, new MusicalNoteInfo(MusicalNote.Eb0, 19.45, 1770) }, + { MusicalNote.E0, new MusicalNoteInfo(MusicalNote.E0, 20.6, 1670) }, + { MusicalNote.F0, new MusicalNoteInfo(MusicalNote.F0, 21.83, 1580) }, + { MusicalNote.Fd0, new MusicalNoteInfo(MusicalNote.Fd0, 23.12, 1490) }, + { MusicalNote.Gb0, new MusicalNoteInfo(MusicalNote.Gb0, 23.12, 1490) }, + { MusicalNote.G0, new MusicalNoteInfo(MusicalNote.G0, 24.5, 1400) }, + { MusicalNote.Gd0, new MusicalNoteInfo(MusicalNote.Gd0, 25.96, 1320) }, + { MusicalNote.Ab0, new MusicalNoteInfo(MusicalNote.Ab0, 25.96, 1320) }, + { MusicalNote.A0, new MusicalNoteInfo(MusicalNote.A0, 27.5, 1250) }, + { MusicalNote.Ad0, new MusicalNoteInfo(MusicalNote.Ad0, 29.14, 1180) }, + { MusicalNote.Bb0, new MusicalNoteInfo(MusicalNote.Bb0, 29.14, 1180) }, + { MusicalNote.B0, new MusicalNoteInfo(MusicalNote.B0, 30.87, 1110) }, + { MusicalNote.C1, new MusicalNoteInfo(MusicalNote.C1, 32.7, 1050) }, + { MusicalNote.Cd1, new MusicalNoteInfo(MusicalNote.Cd1, 34.65, 996) }, + { MusicalNote.Db1, new MusicalNoteInfo(MusicalNote.Db1, 34.65, 996) }, + { MusicalNote.D1, new MusicalNoteInfo(MusicalNote.D1, 36.71, 940) }, + { MusicalNote.Dd1, new MusicalNoteInfo(MusicalNote.Dd1, 38.89, 887) }, + { MusicalNote.Eb1, new MusicalNoteInfo(MusicalNote.Eb1, 38.89, 887) }, + { MusicalNote.E1, new MusicalNoteInfo(MusicalNote.E1, 41.2, 837) }, + { MusicalNote.F1, new MusicalNoteInfo(MusicalNote.F1, 43.65, 790) }, + { MusicalNote.Fd1, new MusicalNoteInfo(MusicalNote.Fd1, 46.25, 746) }, + { MusicalNote.Gb1, new MusicalNoteInfo(MusicalNote.Gb1, 46.25, 746) }, + { MusicalNote.G1, new MusicalNoteInfo(MusicalNote.G1, 49, 704) }, + { MusicalNote.Gd1, new MusicalNoteInfo(MusicalNote.Gd1, 51.91, 665) }, + { MusicalNote.Ab1, new MusicalNoteInfo(MusicalNote.Ab1, 51.91, 665) }, + { MusicalNote.A1, new MusicalNoteInfo(MusicalNote.A1, 55, 627) }, + { MusicalNote.Ad1, new MusicalNoteInfo(MusicalNote.Ad1, 58.27, 592) }, + { MusicalNote.Bb1, new MusicalNoteInfo(MusicalNote.Bb1, 58.27, 592) }, + { MusicalNote.B1, new MusicalNoteInfo(MusicalNote.B1, 61.74, 559) }, + { MusicalNote.C2, new MusicalNoteInfo(MusicalNote.C2, 65.41, 527) }, + { MusicalNote.Cd2, new MusicalNoteInfo(MusicalNote.Cd2, 69.3, 498) }, + { MusicalNote.Db2, new MusicalNoteInfo(MusicalNote.Db2, 69.3, 498) }, + { MusicalNote.D2, new MusicalNoteInfo(MusicalNote.D2, 73.42, 470) }, + { MusicalNote.Dd2, new MusicalNoteInfo(MusicalNote.Dd2, 77.78, 444) }, + { MusicalNote.Eb2, new MusicalNoteInfo(MusicalNote.Eb2, 77.78, 444) }, + { MusicalNote.E2, new MusicalNoteInfo(MusicalNote.E2, 82.41, 419) }, + { MusicalNote.F2, new MusicalNoteInfo(MusicalNote.F2, 87.31, 395) }, + { MusicalNote.Fd2, new MusicalNoteInfo(MusicalNote.Fd2, 92.5, 373) }, + { MusicalNote.Gb2, new MusicalNoteInfo(MusicalNote.Gb2, 92.5, 373) }, + { MusicalNote.G2, new MusicalNoteInfo(MusicalNote.G2, 98, 352) }, + { MusicalNote.Gd2, new MusicalNoteInfo(MusicalNote.Gd2, 103.83, 332) }, + { MusicalNote.Ab2, new MusicalNoteInfo(MusicalNote.Ab2, 103.83, 332) }, + { MusicalNote.A2, new MusicalNoteInfo(MusicalNote.A2, 110, 314) }, + { MusicalNote.Ad2, new MusicalNoteInfo(MusicalNote.Ad2, 116.54, 296) }, + { MusicalNote.Bb2, new MusicalNoteInfo(MusicalNote.Bb2, 116.54, 296) }, + { MusicalNote.B2, new MusicalNoteInfo(MusicalNote.B2, 123.47, 279) }, + { MusicalNote.C3, new MusicalNoteInfo(MusicalNote.C3, 130.81, 264) }, + { MusicalNote.Cd3, new MusicalNoteInfo(MusicalNote.Cd3, 138.59, 249) }, + { MusicalNote.Db3, new MusicalNoteInfo(MusicalNote.Db3, 138.59, 249) }, + { MusicalNote.D3, new MusicalNoteInfo(MusicalNote.D3, 146.83, 235) }, + { MusicalNote.Dd3, new MusicalNoteInfo(MusicalNote.Dd3, 155.56, 222) }, + { MusicalNote.Eb3, new MusicalNoteInfo(MusicalNote.Eb3, 155.56, 222) }, + { MusicalNote.E3, new MusicalNoteInfo(MusicalNote.E3, 164.81, 209) }, + { MusicalNote.F3, new MusicalNoteInfo(MusicalNote.F3, 174.61, 198) }, + { MusicalNote.Fd3, new MusicalNoteInfo(MusicalNote.Fd3, 185, 186) }, + { MusicalNote.Gb3, new MusicalNoteInfo(MusicalNote.Gb3, 185, 186) }, + { MusicalNote.G3, new MusicalNoteInfo(MusicalNote.G3, 196, 176) }, + { MusicalNote.Gd3, new MusicalNoteInfo(MusicalNote.Gd3, 207.65, 166) }, + { MusicalNote.Ab3, new MusicalNoteInfo(MusicalNote.Ab3, 207.65, 166) }, + { MusicalNote.A3, new MusicalNoteInfo(MusicalNote.A3, 220, 157) }, + { MusicalNote.Ad3, new MusicalNoteInfo(MusicalNote.Ad3, 233.08, 148) }, + { MusicalNote.Bb3, new MusicalNoteInfo(MusicalNote.Bb3, 233.08, 148) }, + { MusicalNote.B3, new MusicalNoteInfo(MusicalNote.B3, 246.94, 140) }, + { MusicalNote.C4, new MusicalNoteInfo(MusicalNote.C4, 261.63, 132) }, + { MusicalNote.Cd4, new MusicalNoteInfo(MusicalNote.Cd4, 277.18, 124) }, + { MusicalNote.Db4, new MusicalNoteInfo(MusicalNote.Db4, 277.18, 124) }, + { MusicalNote.D4, new MusicalNoteInfo(MusicalNote.D4, 293.66, 117) }, + { MusicalNote.Dd4, new MusicalNoteInfo(MusicalNote.Dd4, 311.13, 111) }, + { MusicalNote.Eb4, new MusicalNoteInfo(MusicalNote.Eb4, 311.13, 111) }, + { MusicalNote.E4, new MusicalNoteInfo(MusicalNote.E4, 329.63, 105) }, + { MusicalNote.F4, new MusicalNoteInfo(MusicalNote.F4, 349.23, 98.8) }, + { MusicalNote.Fd4, new MusicalNoteInfo(MusicalNote.Fd4, 369.99, 93.2) }, + { MusicalNote.Gb4, new MusicalNoteInfo(MusicalNote.Gb4, 369.99, 93.2) }, + { MusicalNote.G4, new MusicalNoteInfo(MusicalNote.G4, 392, 88) }, + { MusicalNote.Gd4, new MusicalNoteInfo(MusicalNote.Gd4, 415.3, 83.1) }, + { MusicalNote.Ab4, new MusicalNoteInfo(MusicalNote.Ab4, 415.3, 83.1) }, + { MusicalNote.A4, new MusicalNoteInfo(MusicalNote.A4, 440, 78.4) }, + { MusicalNote.Ad4, new MusicalNoteInfo(MusicalNote.Ad4, 466.16, 74) }, + { MusicalNote.Bb4, new MusicalNoteInfo(MusicalNote.Bb4, 466.16, 74) }, + { MusicalNote.B4, new MusicalNoteInfo(MusicalNote.B4, 493.88, 69.9) }, + { MusicalNote.C5, new MusicalNoteInfo(MusicalNote.C5, 523.25, 65.9) }, + { MusicalNote.Cd5, new MusicalNoteInfo(MusicalNote.Cd5, 554.37, 62.2) }, + { MusicalNote.Db5, new MusicalNoteInfo(MusicalNote.Db5, 554.37, 62.2) }, + { MusicalNote.D5, new MusicalNoteInfo(MusicalNote.D5, 587.33, 58.7) }, + { MusicalNote.Dd5, new MusicalNoteInfo(MusicalNote.Dd5, 622.25, 55.4) }, + { MusicalNote.Eb5, new MusicalNoteInfo(MusicalNote.Eb5, 622.25, 55.4) }, + { MusicalNote.E5, new MusicalNoteInfo(MusicalNote.E5, 659.26, 52.3) }, + { MusicalNote.F5, new MusicalNoteInfo(MusicalNote.F5, 698.46, 49.4) }, + { MusicalNote.Fd5, new MusicalNoteInfo(MusicalNote.Fd5, 739.99, 46.6) }, + { MusicalNote.Gb5, new MusicalNoteInfo(MusicalNote.Gb5, 739.99, 46.6) }, + { MusicalNote.G5, new MusicalNoteInfo(MusicalNote.G5, 783.99, 44) }, + { MusicalNote.Gd5, new MusicalNoteInfo(MusicalNote.Gd5, 830.61, 41.5) }, + { MusicalNote.Ab5, new MusicalNoteInfo(MusicalNote.Ab5, 830.61, 41.5) }, + { MusicalNote.A5, new MusicalNoteInfo(MusicalNote.A5, 880, 39.2) }, + { MusicalNote.Ad5, new MusicalNoteInfo(MusicalNote.Ad5, 932.33, 37) }, + { MusicalNote.Bb5, new MusicalNoteInfo(MusicalNote.Bb5, 932.33, 37) }, + { MusicalNote.B5, new MusicalNoteInfo(MusicalNote.B5, 987.77, 34.9) }, + { MusicalNote.C6, new MusicalNoteInfo(MusicalNote.C6, 1046.5, 33) }, + { MusicalNote.Cd6, new MusicalNoteInfo(MusicalNote.Cd6, 1108.73, 31.1) }, + { MusicalNote.Db6, new MusicalNoteInfo(MusicalNote.Db6, 1108.73, 31.1) }, + { MusicalNote.D6, new MusicalNoteInfo(MusicalNote.D6, 1174.66, 29.4) }, + { MusicalNote.Dd6, new MusicalNoteInfo(MusicalNote.Dd6, 1244.51, 27.7) }, + { MusicalNote.Eb6, new MusicalNoteInfo(MusicalNote.Eb6, 1244.51, 27.7) }, + { MusicalNote.E6, new MusicalNoteInfo(MusicalNote.E6, 1318.51, 26.2) }, + { MusicalNote.F6, new MusicalNoteInfo(MusicalNote.F6, 1396.91, 24.7) }, + { MusicalNote.Fd6, new MusicalNoteInfo(MusicalNote.Fd6, 1479.98, 23.3) }, + { MusicalNote.Gb6, new MusicalNoteInfo(MusicalNote.Gb6, 1479.98, 23.3) }, + { MusicalNote.G6, new MusicalNoteInfo(MusicalNote.G6, 1567.98, 22) }, + { MusicalNote.Gd6, new MusicalNoteInfo(MusicalNote.Gd6, 1661.22, 20.8) }, + { MusicalNote.Ab6, new MusicalNoteInfo(MusicalNote.Ab6, 1661.22, 20.8) }, + { MusicalNote.A6, new MusicalNoteInfo(MusicalNote.A6, 1760, 19.6) }, + { MusicalNote.Ad6, new MusicalNoteInfo(MusicalNote.Ad6, 1864.66, 18.5) }, + { MusicalNote.Bb6, new MusicalNoteInfo(MusicalNote.Bb6, 1864.66, 18.5) }, + { MusicalNote.B6, new MusicalNoteInfo(MusicalNote.B6, 1975.53, 17.5) }, + { MusicalNote.C7, new MusicalNoteInfo(MusicalNote.C7, 2093, 16.5) }, + { MusicalNote.Cd7, new MusicalNoteInfo(MusicalNote.Cd7, 2217.46, 15.6) }, + { MusicalNote.Db7, new MusicalNoteInfo(MusicalNote.Db7, 2217.46, 15.6) }, + { MusicalNote.D7, new MusicalNoteInfo(MusicalNote.D7, 2349.32, 14.7) }, + { MusicalNote.Dd7, new MusicalNoteInfo(MusicalNote.Dd7, 2489.02, 13.9) }, + { MusicalNote.Eb7, new MusicalNoteInfo(MusicalNote.Eb7, 2489.02, 13.9) }, + { MusicalNote.E7, new MusicalNoteInfo(MusicalNote.E7, 2637.02, 13.1) }, + { MusicalNote.F7, new MusicalNoteInfo(MusicalNote.F7, 2793.83, 12.3) }, + { MusicalNote.Fd7, new MusicalNoteInfo(MusicalNote.Fd7, 2959.96, 11.7) }, + { MusicalNote.Gb7, new MusicalNoteInfo(MusicalNote.Gb7, 2959.96, 11.7) }, + { MusicalNote.G7, new MusicalNoteInfo(MusicalNote.G7, 3135.96, 11) }, + { MusicalNote.Gd7, new MusicalNoteInfo(MusicalNote.Gd7, 3322.44, 10.4) }, + { MusicalNote.Ab7, new MusicalNoteInfo(MusicalNote.Ab7, 3322.44, 10.4) }, + { MusicalNote.A7, new MusicalNoteInfo(MusicalNote.A7, 3520, 9.8) }, + { MusicalNote.Ad7, new MusicalNoteInfo(MusicalNote.Ad7, 3729.31, 9.3) }, + { MusicalNote.Bb7, new MusicalNoteInfo(MusicalNote.Bb7, 3729.31, 9.3) }, + { MusicalNote.B7, new MusicalNoteInfo(MusicalNote.B7, 3951.07, 8.7) }, + { MusicalNote.C8, new MusicalNoteInfo(MusicalNote.C8, 4186.01, 8.2) }, + { MusicalNote.Cd8, new MusicalNoteInfo(MusicalNote.Cd8, 4434.92, 7.8) }, + { MusicalNote.Db8, new MusicalNoteInfo(MusicalNote.Db8, 4434.92, 7.8) }, + { MusicalNote.D8, new MusicalNoteInfo(MusicalNote.D8, 4698.64, 7.3) }, + { MusicalNote.Dd8, new MusicalNoteInfo(MusicalNote.Dd8, 4978.03, 6.9) }, + { MusicalNote.Eb8, new MusicalNoteInfo(MusicalNote.Eb8, 4978.03, 6.9) } + }; + + public static MusicalNoteInfo GetMusicalNoteInfo(MusicalNote musicalNote) + { + return MusicalNotes.ContainsKey(musicalNote) + ? MusicalNotes[musicalNote] + : MusicalNoteInfo.Empty; + } + + /// + /// Returns the frequency of a musical note. + /// + /// The musical note for which to return the frequency. + /// The frequency of the musical note. + public static double GetFrequency(MusicalNote musicalNote) + { + return MusicalNotes.ContainsKey(musicalNote) + ? MusicalNotes[musicalNote].Frequency + : 0; + } + + /// + /// Returns the wavelength of a musical note. + /// + /// The musical note for which to return the wavelength. + /// The wavelength of the musical note. + public static double GetWavelength(MusicalNote musicalNote) + { + return MusicalNotes.ContainsKey(musicalNote) + ? MusicalNotes[musicalNote].Wavelength + : 0; + } + + /// + /// Playes a musical note at the speaker. + /// + /// The musical note to be played. + /// The time duration in milliseconds for which to play the note. + public static void Play(MusicalNote musicalNote, int duration) + { + double frequency = GetFrequency(musicalNote); + int frequencyInteger = Convert.ToInt32(frequency); + Console.Beep(frequencyInteger, duration); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Musical/TextFile1.txt b/sources/ConsoleTools/ConsoleTools.Controls/Musical/TextFile1.txt similarity index 99% rename from sources/ConsoleTools/ConsoleTools/Musical/TextFile1.txt rename to sources/ConsoleTools/ConsoleTools.Controls/Musical/TextFile1.txt index d2d6828b..fdad0b09 100644 --- a/sources/ConsoleTools/ConsoleTools/Musical/TextFile1.txt +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/TextFile1.txt @@ -1,40 +1,40 @@ -Question - -What are the frequencies of musical notes like G and G# in k-hertz? - -Asked by: Undisclosed Sender - -Answer - -There are two accepted musical pitch standards, the so-called American Standard pitch, which takes A in the fourth piano octave (A4) to have a frequency of 440 Hz, and the older International pitch standard, which takes A4 to have the frequency of 435 Hz. Both of these pitch standards define what are called 'equal tempered chromatic scales.' Mathematically, this means that each successive pitch is related to the previous pitch by a factor of the twelfth root of 2. That is, the ratio between the frequencies of any two successive pitches in either standard is 1.05946309436. There is a third Scientific or Just Scale that is based on C4 having a frequency of 256 Hz, but this is not used for musical purposes. - -There are twelve half-tones (black and white keys on a piano), or steps, in an octave. Since the pitch (frequency) of each successive step is related to the previous pitch by the twelfth root of 2, the twelfth step above a given pitch is exactly twice the initial pitch. I.e., an octave corresponds exactly to a doubling of pitch. - -The frequency of intermediate notes, or pitches, can be found simply by multiplying (dividing) a given starting pitch by as many factors of the twelfth root of 2 as there are steps up to (down to) the desired pitch. For example, the G above A4 (that is, G5) in the American Standard has a frequency of 440 x (12th root of 2)^10 = 440 x 1.78179743628 = 783.99 Hz (approximately). Likewise, in the International standard, G5 has a frequency of 775.08 Hz (approximately). G#5 is another factor of the 12th root of 2 above these, or 830.61 and 821.17 Hz, respectively. Note when counting steps that there is a single half-tone (step) between B and C, and E and F. - -These pitch scales are referred to as 'equal tempered' or 'well tempered.' This refers to a compromise built into the use of the 12th root of 2 as the factor separating each successive pitch. For example, G and C are a so-called fifth apart. The frequencies of notes that are a 'perfect' fifth apart are in the ratio of 1.5, exactly. G is seven chromatic steps above C, so, using the 12th root of 2, the ratio between G and C on either standard scale is (12th root of 2)^7 = 1.49830707688, which is slightly less than the 1.5 required for a perfect fifth. This slight reduction (flattening) in frequency is referred to as 'tempering.' It is necessary on instruments such as the piano that can be played in any key because it is impossible to tune all 3rds, 5ths, etc. to their exact ratios (such as 1.5 for fifths) and simultaneously have, for example, all octaves come out being exactly in the ratio of 2.0. - -Answered by: Warren Davis, Ph.D., President, Davis Associates, Inc., Newton, MA USA - - -The answer to these questions is easily determined mathematically, but a bit of background should help the student use the mathematical relationships with confidence and understanding. - -A piano keyboard is set up in octaves. Each octave has thirteen notes, with the thirteenth being the beginning of the next octave as well. Starting with A, an octave is A, A#, B, C, C#, D, D#, E, F, F#, G, G#, and again, A. The interval between each two successive notes is called a half-step. Therefore, there are 12 intervals of a half-step forming what is called an octave. - -For starters, each octave up or down represents a doubling of frequency. For example, the A above middle C on the piano is set to the standard value of 440 Hz, so the A an octave above that has a frequency of 880 Hz. - -Now, the particulars. The half-step is the smallest interval recognized in Western musical theory. Further, the frequencies of musical notes on a standard piano are now set according to a standard method, called 'equal temperament tuning'. - -Side notes: Tuning systems cannot be treated in detail here. In short, there is a tradeoff in using equal temperament in that all harmonies are very slightly imperfect , but this method brings the overwhelming advantage over its predecessors that music may be written in any key with equal harmonic quality for each. - -Bach largely popularized equal temperament and demonstrated its effectiveness with his series of pieces in all keys known as 'The Well-Tempered Clavier'. The equal-tempered tuning method's development is fascinating from a historical perspective (both scientifically and musically). The other methods of tuning and the whole nature of harmony, based on overtones of fundamental frequencies, with overtone frequencies determined as multiples of the fundamental frequencies, deserves further attention by the interested reader. - -Back to our original story. In this equal temperament system of tuning, the frequencies of notes on a keyboard are related by a fairly simple mathematical relationship involving the number of keys (half-steps) between the notes. - -To determine the relationship between the known frequency of a note and the unknown frequency (wished to be known) of another note, multiply the known frequency by 2 raised to the power (#ofhalf-steps/12). (#ofhalf-steps) is positive if one must move UP in frequency to arrive at the note with the unknown frequency, and negative if DOWN. - -For example, if the A above middle C is set to 440 Hz (which is standard, usually called A440), the G just below it would have a frequency of 440 Hz * 2^(-2/12), or about 392 Hz. The G# in between them would have a frequency of 440 Hz * 2^(-1/12), or about 415.3 Hz. The G# an octave below middle C would be 13 half-steps below A440, giving it a frequency of 440 Hz * 2^(-13/12) = 207.65 Hz. - -Note (pun intended) that the equation checks out with the previous assertion that octaves have factors of 2 differences in frequencies. Recall that there are twelve half-steps traversed in an octave: 2 ^ (12/12) is 2, while 2 ^ (-12/12) is 0.5. - +Question + +What are the frequencies of musical notes like G and G# in k-hertz? + +Asked by: Undisclosed Sender + +Answer + +There are two accepted musical pitch standards, the so-called American Standard pitch, which takes A in the fourth piano octave (A4) to have a frequency of 440 Hz, and the older International pitch standard, which takes A4 to have the frequency of 435 Hz. Both of these pitch standards define what are called 'equal tempered chromatic scales.' Mathematically, this means that each successive pitch is related to the previous pitch by a factor of the twelfth root of 2. That is, the ratio between the frequencies of any two successive pitches in either standard is 1.05946309436. There is a third Scientific or Just Scale that is based on C4 having a frequency of 256 Hz, but this is not used for musical purposes. + +There are twelve half-tones (black and white keys on a piano), or steps, in an octave. Since the pitch (frequency) of each successive step is related to the previous pitch by the twelfth root of 2, the twelfth step above a given pitch is exactly twice the initial pitch. I.e., an octave corresponds exactly to a doubling of pitch. + +The frequency of intermediate notes, or pitches, can be found simply by multiplying (dividing) a given starting pitch by as many factors of the twelfth root of 2 as there are steps up to (down to) the desired pitch. For example, the G above A4 (that is, G5) in the American Standard has a frequency of 440 x (12th root of 2)^10 = 440 x 1.78179743628 = 783.99 Hz (approximately). Likewise, in the International standard, G5 has a frequency of 775.08 Hz (approximately). G#5 is another factor of the 12th root of 2 above these, or 830.61 and 821.17 Hz, respectively. Note when counting steps that there is a single half-tone (step) between B and C, and E and F. + +These pitch scales are referred to as 'equal tempered' or 'well tempered.' This refers to a compromise built into the use of the 12th root of 2 as the factor separating each successive pitch. For example, G and C are a so-called fifth apart. The frequencies of notes that are a 'perfect' fifth apart are in the ratio of 1.5, exactly. G is seven chromatic steps above C, so, using the 12th root of 2, the ratio between G and C on either standard scale is (12th root of 2)^7 = 1.49830707688, which is slightly less than the 1.5 required for a perfect fifth. This slight reduction (flattening) in frequency is referred to as 'tempering.' It is necessary on instruments such as the piano that can be played in any key because it is impossible to tune all 3rds, 5ths, etc. to their exact ratios (such as 1.5 for fifths) and simultaneously have, for example, all octaves come out being exactly in the ratio of 2.0. + +Answered by: Warren Davis, Ph.D., President, Davis Associates, Inc., Newton, MA USA + + +The answer to these questions is easily determined mathematically, but a bit of background should help the student use the mathematical relationships with confidence and understanding. + +A piano keyboard is set up in octaves. Each octave has thirteen notes, with the thirteenth being the beginning of the next octave as well. Starting with A, an octave is A, A#, B, C, C#, D, D#, E, F, F#, G, G#, and again, A. The interval between each two successive notes is called a half-step. Therefore, there are 12 intervals of a half-step forming what is called an octave. + +For starters, each octave up or down represents a doubling of frequency. For example, the A above middle C on the piano is set to the standard value of 440 Hz, so the A an octave above that has a frequency of 880 Hz. + +Now, the particulars. The half-step is the smallest interval recognized in Western musical theory. Further, the frequencies of musical notes on a standard piano are now set according to a standard method, called 'equal temperament tuning'. + +Side notes: Tuning systems cannot be treated in detail here. In short, there is a tradeoff in using equal temperament in that all harmonies are very slightly imperfect , but this method brings the overwhelming advantage over its predecessors that music may be written in any key with equal harmonic quality for each. + +Bach largely popularized equal temperament and demonstrated its effectiveness with his series of pieces in all keys known as 'The Well-Tempered Clavier'. The equal-tempered tuning method's development is fascinating from a historical perspective (both scientifically and musically). The other methods of tuning and the whole nature of harmony, based on overtones of fundamental frequencies, with overtone frequencies determined as multiples of the fundamental frequencies, deserves further attention by the interested reader. + +Back to our original story. In this equal temperament system of tuning, the frequencies of notes on a keyboard are related by a fairly simple mathematical relationship involving the number of keys (half-steps) between the notes. + +To determine the relationship between the known frequency of a note and the unknown frequency (wished to be known) of another note, multiply the known frequency by 2 raised to the power (#ofhalf-steps/12). (#ofhalf-steps) is positive if one must move UP in frequency to arrive at the note with the unknown frequency, and negative if DOWN. + +For example, if the A above middle C is set to 440 Hz (which is standard, usually called A440), the G just below it would have a frequency of 440 Hz * 2^(-2/12), or about 392 Hz. The G# in between them would have a frequency of 440 Hz * 2^(-1/12), or about 415.3 Hz. The G# an octave below middle C would be 13 half-steps below A440, giving it a frequency of 440 Hz * 2^(-13/12) = 207.65 Hz. + +Note (pun intended) that the equation checks out with the previous assertion that octaves have factors of 2 differences in frequencies. Recall that there are twelve half-steps traversed in an octave: 2 ^ (12/12) is 2, while 2 ^ (-12/12) is 0.5. + Answered by: Tyler Gruber, Ph.D., Adjunct Professor of Physics, Louisiana Tech U. \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Pause.cs b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Pause.cs rename to sources/ConsoleTools/ConsoleTools.Controls/Pause.cs index 6f606787..b4c06a50 100644 --- a/sources/ConsoleTools/ConsoleTools/Pause.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs @@ -1,143 +1,143 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections.Generic; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// A control that displays a message and waits for the user to press any key. - /// - public class Pause : ErasableControl - { - private int lastLineLength; - - /// - /// Gets or sets the text to be displayed to the user while waiting for the user to press a key. - /// - public MultilineText Text { get; set; } = PauseResources.PauseText; - - /// - /// Gets or sets the the user must press to break the pause. - /// If null is provided, any key unbreaks the pause. - /// Default value: null - /// - public ConsoleKey? UnlockKey { get; set; } - - /// - /// Gets the width of the displayed Text. - /// - protected override int DesiredContentWidth => Text?.Size.Width ?? 0; - - /// - /// Initializes a new instance of the class. - /// - public Pause() - { - Margin = "0 1"; - } - - /// - /// Displays the pause text and waits for the user to press a key. - /// - protected override void DoDisplayContent(ControlDisplay display) - { - if (Text == null) - return; - - lastLineLength = 0; - - IEnumerable lines = Text.GetLines(Layout.ActualContentWidth); - - foreach (string line in lines) - { - lastLineLength = line.Length; - - display.WriteRow(line); - } - } - - /// - /// Moves the cursor back to the end of the text and waits for the user to press the unlock key. - /// After the user presses the unlock key the cursor is moved back to the end of the control (after the bottom margin). - /// - protected override void OnAfterDisplay() - { - int oldCursorLeft = Console.CursorLeft; - int oldCursorTop = Console.CursorTop; - - int cursorLeft = Margin.Left + Padding.Left + lastLineLength; - int cursorTop = Console.CursorTop - 1 - Margin.Bottom - Padding.Bottom; - Console.SetCursorPosition(cursorLeft, cursorTop); - - WaitForUnlockKey(); - - Console.SetCursorPosition(oldCursorLeft, oldCursorTop); - - base.OnAfterDisplay(); - } - - private void WaitForUnlockKey() - { - while (true) - { - ConsoleKeyInfo consoleKeyInfo = Console.ReadKey(true); - - if (!UnlockKey.HasValue || consoleKeyInfo.Key == UnlockKey) - break; - } - } - - /// - /// Displays the pause with default settings. - /// - public static void QuickDisplay() - { - new Pause().Display(); - } - - /// - /// Displays the pause with default settings. - /// - /// The text to be displayed by the control. - public static void QuickDisplay(string text) - { - Pause pause = new Pause { Text = text }; - pause.Display(); - } - - /// - /// Displays the pause with default settings. - /// - /// The text to be displayed by the control. - /// The key that the user has to press to unlock the pause. - public static void QuickDisplay(string text, ConsoleKey unlockKey) - { - Pause pause = new Pause - { - Text = text, - UnlockKey = unlockKey - }; - pause.Display(); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// A control that displays a message and waits for the user to press any key. + /// + public class Pause : ErasableControl + { + private int lastLineLength; + + /// + /// Gets or sets the text to be displayed to the user while waiting for the user to press a key. + /// + public MultilineText Text { get; set; } = PauseResources.PauseText; + + /// + /// Gets or sets the the user must press to break the pause. + /// If null is provided, any key unbreaks the pause. + /// Default value: null + /// + public ConsoleKey? UnlockKey { get; set; } + + /// + /// Gets the width of the displayed Text. + /// + protected override int DesiredContentWidth => Text?.Size.Width ?? 0; + + /// + /// Initializes a new instance of the class. + /// + public Pause() + { + Margin = "0 1"; + } + + /// + /// Displays the pause text and waits for the user to press a key. + /// + protected override void DoDisplayContent(ControlDisplay display) + { + if (Text == null) + return; + + lastLineLength = 0; + + IEnumerable lines = Text.GetLines(Layout.ActualContentWidth); + + foreach (string line in lines) + { + lastLineLength = line.Length; + + display.WriteRow(line); + } + } + + /// + /// Moves the cursor back to the end of the text and waits for the user to press the unlock key. + /// After the user presses the unlock key the cursor is moved back to the end of the control (after the bottom margin). + /// + protected override void OnAfterDisplay() + { + int oldCursorLeft = Console.CursorLeft; + int oldCursorTop = Console.CursorTop; + + int cursorLeft = Margin.Left + Padding.Left + lastLineLength; + int cursorTop = Console.CursorTop - 1 - Margin.Bottom - Padding.Bottom; + Console.SetCursorPosition(cursorLeft, cursorTop); + + WaitForUnlockKey(); + + Console.SetCursorPosition(oldCursorLeft, oldCursorTop); + + base.OnAfterDisplay(); + } + + private void WaitForUnlockKey() + { + while (true) + { + ConsoleKeyInfo consoleKeyInfo = Console.ReadKey(true); + + if (!UnlockKey.HasValue || consoleKeyInfo.Key == UnlockKey) + break; + } + } + + /// + /// Displays the pause with default settings. + /// + public static void QuickDisplay() + { + new Pause().Display(); + } + + /// + /// Displays the pause with default settings. + /// + /// The text to be displayed by the control. + public static void QuickDisplay(string text) + { + Pause pause = new Pause { Text = text }; + pause.Display(); + } + + /// + /// Displays the pause with default settings. + /// + /// The text to be displayed by the control. + /// The key that the user has to press to unlock the pause. + public static void QuickDisplay(string text, ConsoleKey unlockKey) + { + Pause pause = new Pause + { + Text = text, + UnlockKey = unlockKey + }; + pause.Display(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/PauseResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.Designer.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools/PauseResources.Designer.cs rename to sources/ConsoleTools/ConsoleTools.Controls/PauseResources.Designer.cs index 8b915854..64efbb97 100644 --- a/sources/ConsoleTools/ConsoleTools/PauseResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.Designer.cs @@ -1,72 +1,72 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace DustInTheWind.ConsoleTools { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class PauseResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal PauseResources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.PauseResources", typeof(PauseResources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Press any key to continue.... - /// - internal static string PauseText { - get { - return ResourceManager.GetString("PauseText", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DustInTheWind.ConsoleTools { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class PauseResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal PauseResources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.PauseResources", typeof(PauseResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Press any key to continue.... + /// + internal static string PauseText { + get { + return ResourceManager.GetString("PauseText", resourceCulture); + } + } + } +} diff --git a/sources/ConsoleTools/ConsoleTools/PauseResources.fr.resx b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.fr.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/PauseResources.fr.resx rename to sources/ConsoleTools/ConsoleTools.Controls/PauseResources.fr.resx index 7658af5f..912f51f4 100644 --- a/sources/ConsoleTools/ConsoleTools/PauseResources.fr.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.fr.resx @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Appuyez sur n'importe quelle touche pour continuer... - Text displayed by the Pause control while waiting for the user to press the unlock key. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Appuyez sur n'importe quelle touche pour continuer... + Text displayed by the Pause control while waiting for the user to press the unlock key. + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/PauseResources.resx b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/PauseResources.resx rename to sources/ConsoleTools/ConsoleTools.Controls/PauseResources.resx index a00f9672..d679d36f 100644 --- a/sources/ConsoleTools/ConsoleTools/PauseResources.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.resx @@ -1,105 +1,105 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Press any key to continue... - Text displayed by the Pause control while waiting for the user to press the unlock key. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Press any key to continue... + Text displayed by the Pause control while waiting for the user to press the unlock key. + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/PauseResources.ro.resx b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.ro.resx similarity index 97% rename from sources/ConsoleTools/ConsoleTools/PauseResources.ro.resx rename to sources/ConsoleTools/ConsoleTools.Controls/PauseResources.ro.resx index 92a01286..868560d0 100644 --- a/sources/ConsoleTools/ConsoleTools/PauseResources.ro.resx +++ b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.ro.resx @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Apasă orice tastă pentru a continua... - Text displayed by the Pause control while waiting for the user to press the unlock key. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Apasă orice tastă pentru a continua... + Text displayed by the Pause control while waiting for the user to press the unlock key. + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TextBlock.cs b/sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/TextBlock.cs rename to sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs diff --git a/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs b/sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs rename to sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs index ed0e3f02..f534db26 100644 --- a/sources/ConsoleTools/ConsoleTools/ThreeStageFile.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs @@ -1,74 +1,74 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.IO; - -namespace DustInTheWind.ConsoleTools -{ - internal abstract class ThreeStageFile : IDisposable - { - private readonly string targetFileName; - private readonly string tempFileName; - private readonly string backupFileName; - - public FileStream FileStream { get; private set; } - - protected ThreeStageFile(string fileName) - { - targetFileName = fileName ?? throw new ArgumentNullException(nameof(fileName)); - - tempFileName = $"{fileName}.tmp"; - backupFileName = $"{fileName}.bak"; - } - - public void Open() - { - if (FileStream != null) - return; - - if (File.Exists(tempFileName)) - throw new ApplicationException($"The previous process was not completed. Delete the temporary {tempFileName} file and then try again."); - - FileStream = File.OpenWrite(tempFileName); - } - - public void Close() - { - if (FileStream == null) - return; - - FileStream.Close(); - FileStream.Dispose(); - FileStream = null; - - if (File.Exists(targetFileName)) - File.Replace(tempFileName, targetFileName, backupFileName); - else - File.Move(tempFileName, targetFileName); - } - - public void Dispose() - { - FileStream?.Dispose(); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.IO; + +namespace DustInTheWind.ConsoleTools +{ + internal abstract class ThreeStageFile : IDisposable + { + private readonly string targetFileName; + private readonly string tempFileName; + private readonly string backupFileName; + + public FileStream FileStream { get; private set; } + + protected ThreeStageFile(string fileName) + { + targetFileName = fileName ?? throw new ArgumentNullException(nameof(fileName)); + + tempFileName = $"{fileName}.tmp"; + backupFileName = $"{fileName}.bak"; + } + + public void Open() + { + if (FileStream != null) + return; + + if (File.Exists(tempFileName)) + throw new ApplicationException($"The previous process was not completed. Delete the temporary {tempFileName} file and then try again."); + + FileStream = File.OpenWrite(tempFileName); + } + + public void Close() + { + if (FileStream == null) + return; + + FileStream.Close(); + FileStream.Dispose(); + FileStream = null; + + if (File.Exists(targetFileName)) + File.Replace(tempFileName, targetFileName, backupFileName); + else + File.Move(tempFileName, targetFileName); + } + + public void Dispose() + { + FileStream?.Dispose(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs b/sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/TitleDisplayEventArgs.cs rename to sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs diff --git a/sources/ConsoleTools/ConsoleTools/AlignedText.cs b/sources/ConsoleTools/ConsoleTools.Core/AlignedText.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/AlignedText.cs rename to sources/ConsoleTools/ConsoleTools.Core/AlignedText.cs index b5ac01b7..f9d6cae3 100644 --- a/sources/ConsoleTools/ConsoleTools/AlignedText.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/AlignedText.cs @@ -1,229 +1,229 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Text; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Represents a text that can be horizontally aligned into a space. - /// - public class AlignedText - { - private bool isAnalyzed; - - private string text; - private int width; - private HorizontalAlignment horizontalAlignment; - - private int spaceLeftCount; - private int spaceRightCount; - - /// - /// Gets or sets the text that is aligned. - /// - public string Text - { - get => text; - set - { - text = value; - isAnalyzed = false; - } - } - - /// - /// Gets or sets the width into which the text must be aligned. - /// - public int Width - { - get => width; - set - { - width = value; - isAnalyzed = false; - } - } - - /// - /// Gets or sets the horizontal alignment to be applied if the property - /// is set on . - /// - public HorizontalAlignment DefaultHorizontalAlignment { get; set; } = HorizontalAlignment.Left; - - /// - /// Gets or sets the horizontal alignment to be applied on the text. - /// - public HorizontalAlignment HorizontalAlignment - { - get => horizontalAlignment; - set - { - horizontalAlignment = value; - isAnalyzed = false; - } - } - - /// - /// Gets the amount of space to be displayed at the left of the - /// (before the text). - /// - public int SpaceLeftCount - { - get - { - if (!isAnalyzed) - Analyze(); - - return spaceLeftCount; - } - } - - /// - /// Gets the amount of space to be displayed at the right of the - /// (after the text). - /// - public int SpaceRightCount - { - get - { - if (!isAnalyzed) - Analyze(); - - return spaceRightCount; - } - } - - private void Analyze() - { - if (width <= 0) - { - spaceLeftCount = 0; - spaceRightCount = 0; - return; - } - - HorizontalAlignment calculatedHorizontalAlignment = CalculateHorizontalAlignment(); - int textLength = text?.Length ?? 0; - - switch (calculatedHorizontalAlignment) - { - default: - spaceLeftCount = 0; - spaceRightCount = Math.Max(width - textLength, 0); - break; - - case HorizontalAlignment.Center: - int totalSpaces = width - textLength; - double halfSpaces = (double)totalSpaces / 2; - - spaceLeftCount = (int)Math.Floor(halfSpaces); - spaceRightCount = (int)Math.Ceiling(halfSpaces); - break; - - case HorizontalAlignment.Right: - spaceLeftCount = Math.Max(width - textLength, 0); - spaceRightCount = 0; - break; - } - } - - private HorizontalAlignment CalculateHorizontalAlignment() - { - HorizontalAlignment calculatedHorizontalAlignment = HorizontalAlignment; - - if (calculatedHorizontalAlignment == HorizontalAlignment.Default) - { - calculatedHorizontalAlignment = DefaultHorizontalAlignment; - - if (calculatedHorizontalAlignment == HorizontalAlignment.Default) - calculatedHorizontalAlignment = HorizontalAlignment.Left; - } - - return calculatedHorizontalAlignment; - } - - /// - /// Returns the text aligned in the specified space. - /// - /// - public override string ToString() - { - if (string.IsNullOrEmpty(Text)) - return new string(' ', Width); - - Analyze(); - - StringBuilder sb = new StringBuilder(); - - if (spaceLeftCount > 0) - sb.Append(new string(' ', spaceLeftCount)); - - sb.Append(text); - - if (spaceRightCount > 0) - sb.Append(new string(' ', spaceRightCount)); - - return sb.ToString(); - } - - /// - /// Aligns a text, in the specified width as is specified by the horizontalAlignment value. - /// - public static string QuickAlign(string text, HorizontalAlignment horizontalAlignment, int width) - { - AlignedText alignedText = new AlignedText - { - Text = text, - HorizontalAlignment = horizontalAlignment, - Width = width - }; - - return alignedText.ToString(); - } - - /// - /// Converts a simple into an instance - /// with default alignment. - /// - /// The text to be converted. - /// An instance of the containing the text. - public static implicit operator AlignedText(string text) - { - return new AlignedText - { - Text = text - }; - } - - /// - /// Converts a instance into a by - /// extracting the underlying text from the instance. - /// - /// The original instance that contains the test. - /// The extracted from the original instance. - public static implicit operator string(AlignedText alignedText) - { - return alignedText.ToString(); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Text; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Represents a text that can be horizontally aligned into a space. + /// + public class AlignedText + { + private bool isAnalyzed; + + private string text; + private int width; + private HorizontalAlignment horizontalAlignment; + + private int spaceLeftCount; + private int spaceRightCount; + + /// + /// Gets or sets the text that is aligned. + /// + public string Text + { + get => text; + set + { + text = value; + isAnalyzed = false; + } + } + + /// + /// Gets or sets the width into which the text must be aligned. + /// + public int Width + { + get => width; + set + { + width = value; + isAnalyzed = false; + } + } + + /// + /// Gets or sets the horizontal alignment to be applied if the property + /// is set on . + /// + public HorizontalAlignment DefaultHorizontalAlignment { get; set; } = HorizontalAlignment.Left; + + /// + /// Gets or sets the horizontal alignment to be applied on the text. + /// + public HorizontalAlignment HorizontalAlignment + { + get => horizontalAlignment; + set + { + horizontalAlignment = value; + isAnalyzed = false; + } + } + + /// + /// Gets the amount of space to be displayed at the left of the + /// (before the text). + /// + public int SpaceLeftCount + { + get + { + if (!isAnalyzed) + Analyze(); + + return spaceLeftCount; + } + } + + /// + /// Gets the amount of space to be displayed at the right of the + /// (after the text). + /// + public int SpaceRightCount + { + get + { + if (!isAnalyzed) + Analyze(); + + return spaceRightCount; + } + } + + private void Analyze() + { + if (width <= 0) + { + spaceLeftCount = 0; + spaceRightCount = 0; + return; + } + + HorizontalAlignment calculatedHorizontalAlignment = CalculateHorizontalAlignment(); + int textLength = text?.Length ?? 0; + + switch (calculatedHorizontalAlignment) + { + default: + spaceLeftCount = 0; + spaceRightCount = Math.Max(width - textLength, 0); + break; + + case HorizontalAlignment.Center: + int totalSpaces = width - textLength; + double halfSpaces = (double)totalSpaces / 2; + + spaceLeftCount = (int)Math.Floor(halfSpaces); + spaceRightCount = (int)Math.Ceiling(halfSpaces); + break; + + case HorizontalAlignment.Right: + spaceLeftCount = Math.Max(width - textLength, 0); + spaceRightCount = 0; + break; + } + } + + private HorizontalAlignment CalculateHorizontalAlignment() + { + HorizontalAlignment calculatedHorizontalAlignment = HorizontalAlignment; + + if (calculatedHorizontalAlignment == HorizontalAlignment.Default) + { + calculatedHorizontalAlignment = DefaultHorizontalAlignment; + + if (calculatedHorizontalAlignment == HorizontalAlignment.Default) + calculatedHorizontalAlignment = HorizontalAlignment.Left; + } + + return calculatedHorizontalAlignment; + } + + /// + /// Returns the text aligned in the specified space. + /// + /// + public override string ToString() + { + if (string.IsNullOrEmpty(Text)) + return new string(' ', Width); + + Analyze(); + + StringBuilder sb = new StringBuilder(); + + if (spaceLeftCount > 0) + sb.Append(new string(' ', spaceLeftCount)); + + sb.Append(text); + + if (spaceRightCount > 0) + sb.Append(new string(' ', spaceRightCount)); + + return sb.ToString(); + } + + /// + /// Aligns a text, in the specified width as is specified by the horizontalAlignment value. + /// + public static string QuickAlign(string text, HorizontalAlignment horizontalAlignment, int width) + { + AlignedText alignedText = new AlignedText + { + Text = text, + HorizontalAlignment = horizontalAlignment, + Width = width + }; + + return alignedText.ToString(); + } + + /// + /// Converts a simple into an instance + /// with default alignment. + /// + /// The text to be converted. + /// An instance of the containing the text. + public static implicit operator AlignedText(string text) + { + return new AlignedText + { + Text = text + }; + } + + /// + /// Converts a instance into a by + /// extracting the underlying text from the instance. + /// + /// The original instance that contains the test. + /// The extracted from the original instance. + public static implicit operator string(AlignedText alignedText) + { + return alignedText.ToString(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs b/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs rename to sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs index 261ee09c..d04502f9 100644 --- a/sources/ConsoleTools/ConsoleTools/ApplicationInformation.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs @@ -25,7 +25,7 @@ namespace DustInTheWind.ConsoleTools { - internal class ApplicationInformation + public class ApplicationInformation { private readonly Assembly assembly; diff --git a/sources/ConsoleTools/ConsoleTools/BlockControl.MarginsAndPaddings.cs b/sources/ConsoleTools/ConsoleTools.Core/BlockControl.MarginsAndPaddings.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/BlockControl.MarginsAndPaddings.cs rename to sources/ConsoleTools/ConsoleTools.Core/BlockControl.MarginsAndPaddings.cs diff --git a/sources/ConsoleTools/ConsoleTools/BlockControl.WidthAndAlignment.cs b/sources/ConsoleTools/ConsoleTools.Core/BlockControl.WidthAndAlignment.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/BlockControl.WidthAndAlignment.cs rename to sources/ConsoleTools/ConsoleTools.Core/BlockControl.WidthAndAlignment.cs diff --git a/sources/ConsoleTools/ConsoleTools/BlockControl.cs b/sources/ConsoleTools/ConsoleTools.Core/BlockControl.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/BlockControl.cs rename to sources/ConsoleTools/ConsoleTools.Core/BlockControl.cs diff --git a/sources/ConsoleTools/ConsoleTools/CommandLine/CliCommand.cs b/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliCommand.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools/CommandLine/CliCommand.cs rename to sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliCommand.cs index 1613367e..a2acd7c3 100644 --- a/sources/ConsoleTools/ConsoleTools/CommandLine/CliCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliCommand.cs @@ -23,7 +23,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.CommandLine { diff --git a/sources/ConsoleTools/ConsoleTools/CommandLine/CliParameter.cs b/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliParameter.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/CommandLine/CliParameter.cs rename to sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliParameter.cs diff --git a/sources/ConsoleTools/ConsoleTools/ConsoleReader.cs b/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/ConsoleReader.cs rename to sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs index 5417447b..c6367b15 100644 --- a/sources/ConsoleTools/ConsoleTools/ConsoleReader.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs @@ -1,82 +1,82 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Threading; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Thanks to JSQuareD - /// https://stackoverflow.com/questions/57615/how-to-add-a-timeout-to-console-readline/57655#57655 - /// - public class ConsoleReader - { - private static readonly Thread inputThread; - private static readonly AutoResetEvent getInput; - private static readonly AutoResetEvent gotInput; - private static string input; - - static ConsoleReader() - { - getInput = new AutoResetEvent(false); - gotInput = new AutoResetEvent(false); - - inputThread = new Thread(reader) - { - IsBackground = true - }; - inputThread.Start(); - } - - private static void reader() - { - while (true) - { - getInput.WaitOne(); - input = Console.ReadLine(); - gotInput.Set(); - } - } - - public static string ReadLine(int timeOutMillisecs = Timeout.Infinite) - { - getInput.Set(); - - bool success = gotInput.WaitOne(timeOutMillisecs); - - if (!success) - throw new TimeoutException("User did not provide input within the timelimit."); - - return input; - } - - public static bool TryReadLine(out string line, int timeOutMillisecs = Timeout.Infinite) - { - getInput.Set(); - bool success = gotInput.WaitOne(timeOutMillisecs); - - line = success ? input : null; - - return success; - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Threading; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Thanks to JSQuareD + /// https://stackoverflow.com/questions/57615/how-to-add-a-timeout-to-console-readline/57655#57655 + /// + public class ConsoleReader + { + private static readonly Thread inputThread; + private static readonly AutoResetEvent getInput; + private static readonly AutoResetEvent gotInput; + private static string input; + + static ConsoleReader() + { + getInput = new AutoResetEvent(false); + gotInput = new AutoResetEvent(false); + + inputThread = new Thread(reader) + { + IsBackground = true + }; + inputThread.Start(); + } + + private static void reader() + { + while (true) + { + getInput.WaitOne(); + input = Console.ReadLine(); + gotInput.Set(); + } + } + + public static string ReadLine(int timeOutMillisecs = Timeout.Infinite) + { + getInput.Set(); + + bool success = gotInput.WaitOne(timeOutMillisecs); + + if (!success) + throw new TimeoutException("User did not provide input within the timelimit."); + + return input; + } + + public static bool TryReadLine(out string line, int timeOutMillisecs = Timeout.Infinite) + { + getInput.Set(); + bool success = gotInput.WaitOne(timeOutMillisecs); + + line = success ? input : null; + + return success; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj b/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj index 0cc3587d..41d017fb 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj +++ b/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj @@ -2,8 +2,15 @@ netcoreapp2.2;net45 - DustInTheWind.ConsoleTools.Core + DustInTheWind.ConsoleTools DustInTheWind.ConsoleTools.Core + true + false + false + + + + diff --git a/sources/ConsoleTools/ConsoleTools/Control.cs b/sources/ConsoleTools/ConsoleTools.Core/Control.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Control.cs rename to sources/ConsoleTools/ConsoleTools.Core/Control.cs index 7c57b82f..783284eb 100644 --- a/sources/ConsoleTools/ConsoleTools/Control.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Control.cs @@ -1,106 +1,106 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Provides base functionality for a control. - /// - public abstract class Control - { - private bool originalCursorVisibility; - - /// - /// Gets or sets a value that specifies if the cursor is visible while the control is displayed. - /// Default value: true - /// - public bool? CursorVisibility { get; set; } - - /// - /// Gets or sets a value that specifies if the visibility of the cursor should be set back - /// to the value it was before displaying the control. - /// - protected bool RestoreCursorVisibilityAfterDisplay { get; set; } = true; - - /// - /// Event raised at the beginning of the method, before doing anything else. - /// - public virtual event EventHandler BeforeDisplay; - - /// - /// Event raised at the very end of the method, before returning. - /// - public virtual event EventHandler AfterDisplay; - - /// - /// Displays the control in the console. - /// - public void Display() - { - OnBeforeDisplay(); - - if (CursorVisibility.HasValue) - { - originalCursorVisibility = Console.CursorVisible; - Console.CursorVisible = CursorVisibility.Value; - - try - { - DoDisplay(); - } - finally - { - if (RestoreCursorVisibilityAfterDisplay) - Console.CursorVisible = originalCursorVisibility; - } - } - else - { - DoDisplay(); - } - - OnAfterDisplay(); - } - - /// - /// Displays the margins and the content of the control. - /// - protected abstract void DoDisplay(); - - /// - /// Method called at the beginning of the method, before doing anything else. - /// - protected virtual void OnBeforeDisplay() - { - BeforeDisplay?.Invoke(this, EventArgs.Empty); - } - - /// - /// Method called at the very end of the method, before returning. - /// - protected virtual void OnAfterDisplay() - { - AfterDisplay?.Invoke(this, EventArgs.Empty); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Provides base functionality for a control. + /// + public abstract class Control + { + private bool originalCursorVisibility; + + /// + /// Gets or sets a value that specifies if the cursor is visible while the control is displayed. + /// Default value: true + /// + public bool? CursorVisibility { get; set; } + + /// + /// Gets or sets a value that specifies if the visibility of the cursor should be set back + /// to the value it was before displaying the control. + /// + protected bool RestoreCursorVisibilityAfterDisplay { get; set; } = true; + + /// + /// Event raised at the beginning of the method, before doing anything else. + /// + public virtual event EventHandler BeforeDisplay; + + /// + /// Event raised at the very end of the method, before returning. + /// + public virtual event EventHandler AfterDisplay; + + /// + /// Displays the control in the console. + /// + public void Display() + { + OnBeforeDisplay(); + + if (CursorVisibility.HasValue) + { + originalCursorVisibility = Console.CursorVisible; + Console.CursorVisible = CursorVisibility.Value; + + try + { + DoDisplay(); + } + finally + { + if (RestoreCursorVisibilityAfterDisplay) + Console.CursorVisible = originalCursorVisibility; + } + } + else + { + DoDisplay(); + } + + OnAfterDisplay(); + } + + /// + /// Displays the margins and the content of the control. + /// + protected abstract void DoDisplay(); + + /// + /// Method called at the beginning of the method, before doing anything else. + /// + protected virtual void OnBeforeDisplay() + { + BeforeDisplay?.Invoke(this, EventArgs.Empty); + } + + /// + /// Method called at the very end of the method, before returning. + /// + protected virtual void OnAfterDisplay() + { + AfterDisplay?.Invoke(this, EventArgs.Empty); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/ControlDisplay.cs b/sources/ConsoleTools/ConsoleTools.Core/ControlDisplay.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/ControlDisplay.cs rename to sources/ConsoleTools/ConsoleTools.Core/ControlDisplay.cs diff --git a/sources/ConsoleTools/ConsoleTools/ControlLayout.cs b/sources/ConsoleTools/ConsoleTools.Core/ControlLayout.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/ControlLayout.cs rename to sources/ConsoleTools/ConsoleTools.Core/ControlLayout.cs diff --git a/sources/ConsoleTools/ConsoleTools/Cursor.cs b/sources/ConsoleTools/ConsoleTools.Core/Cursor.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Cursor.cs rename to sources/ConsoleTools/ConsoleTools.Core/Cursor.cs diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Colors.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Colors.cs index f2d03265..4e1431af 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Colors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Colors.cs @@ -1,75 +1,75 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Contains a set of methods that help to write text to the Console. - /// - public static partial class CustomConsole - { - /// - /// Gets or sets the color used to write Success messages. - /// - public static ConsoleColor SuccessColor { get; set; } = ConsoleColor.Green; - - /// - /// Gets or sets the background color used to write Success messages. - /// If the color is null, default background color is used. - /// - public static ConsoleColor? SuccessBackgroundColor { get; set; } - - /// - /// Gets or sets the color used to write Warning messages. - /// - public static ConsoleColor WarningColor { get; set; } = ConsoleColor.Yellow; - - /// - /// Gets or sets the background color used to write Warning messages. - /// If the color is null, default background color is used. - /// - public static ConsoleColor? WarningBackgroundColor { get; set; } - - /// - /// Gets or sets the color used to write Error messages. - /// - public static ConsoleColor ErrorColor { get; set; } = ConsoleColor.Red; - - /// - /// Gets or sets the background color used to write Error messages. - /// If the color is null, default background color is used. - /// - public static ConsoleColor? ErrorBackgroundColor { get; set; } - - /// - /// Gets or sets the color used to write Emphasized messages. - /// - public static ConsoleColor EmphasizedColor { get; set; } = ConsoleColor.White; - - /// - /// Gets or sets the background color used to write Emphasis messages. - /// If the color is null, default background color is used. - /// - public static ConsoleColor? EmphasizedBackgroundColor { get; set; } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Contains a set of methods that help to write text to the Console. + /// + public static partial class CustomConsole + { + /// + /// Gets or sets the color used to write Success messages. + /// + public static ConsoleColor SuccessColor { get; set; } = ConsoleColor.Green; + + /// + /// Gets or sets the background color used to write Success messages. + /// If the color is null, default background color is used. + /// + public static ConsoleColor? SuccessBackgroundColor { get; set; } + + /// + /// Gets or sets the color used to write Warning messages. + /// + public static ConsoleColor WarningColor { get; set; } = ConsoleColor.Yellow; + + /// + /// Gets or sets the background color used to write Warning messages. + /// If the color is null, default background color is used. + /// + public static ConsoleColor? WarningBackgroundColor { get; set; } + + /// + /// Gets or sets the color used to write Error messages. + /// + public static ConsoleColor ErrorColor { get; set; } = ConsoleColor.Red; + + /// + /// Gets or sets the background color used to write Error messages. + /// If the color is null, default background color is used. + /// + public static ConsoleColor? ErrorBackgroundColor { get; set; } + + /// + /// Gets or sets the color used to write Emphasized messages. + /// + public static ConsoleColor EmphasizedColor { get; set; } = ConsoleColor.White; + + /// + /// Gets or sets the background color used to write Emphasis messages. + /// If the color is null, default background color is used. + /// + public static ConsoleColor? EmphasizedBackgroundColor { get; set; } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BackgroundColor.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BackgroundColor.cs index f6897c96..01303a82 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BackgroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BackgroundColor.cs @@ -1,154 +1,154 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public partial class CustomConsole - { - /// - /// Writes the specified text to the Console using the specified background color. - /// - /// The background color used to write the text. - /// The text to be written to the Console. - public static void WriteBackgroundColor(ConsoleColor backgroundColor, string text) - { - ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroundColor; - Console.Write(text); - Console.BackgroundColor = oldColor; - } - - /// - /// Writes the text representation of the specified array of objects to the Console - /// using the specified format information and background color. - /// - /// The background color used to write the text. - /// A composite format string. - /// An array of objects to write using format. - public static void WriteBackgroundColor(ConsoleColor backgroundColor, string format, params object[] arg) - { - ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroundColor; - Console.Write(format, arg); - Console.BackgroundColor = oldColor; - } - - /// - /// Writes the text representation of the specified object to the Console. - /// An additional parameter can be specified for the background color used to write the text. - /// - /// The background color used to write the text. - /// The value to write. - public static void WriteBackgroundColor(ConsoleColor backgroundColor, object o) - { - ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroundColor; - Console.Write(o); - Console.BackgroundColor = oldColor; - } - - /// - /// Writes the specified string value, followed by the current line terminator, to the Console. - /// An additional parameter can be specified for the background color used to write the text. - /// - /// The background color used to write the text. - /// The text to write. - public static void WriteLineBackgroundColor(ConsoleColor backgroundColor, string text) - { - ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroundColor; - Console.WriteLine(text); - Console.BackgroundColor = oldColor; - } - - /// - /// Writes the text representation of the specified array of objects, - /// followed by the current line terminator, to the Console - /// using the specified format information and background color. - /// - /// The background color used to write the text. - /// A composite format string. - /// An array of objects to write using format. - public static void WriteLineBackgroundColor(ConsoleColor backgroundColor, string format, params object[] arg) - { - ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroundColor; - Console.WriteLine(format, arg); - Console.BackgroundColor = oldColor; - } - - /// - /// Writes the text representation of the specified object, followed by the current line terminator, to the Console. - /// An additional parameter can be specified for the background color used to write the text. - /// - /// The background color used to write the text. - /// The value to write. - public static void WriteLineBackgroundColor(ConsoleColor backgroundColor, object o) - { - ConsoleColor oldColor = Console.BackgroundColor; - Console.BackgroundColor = backgroundColor; - Console.WriteLine(o); - Console.BackgroundColor = oldColor; - } - - /// - /// Executes the specified action while the background color is set to the specified value. - /// - public static void WithBackgroundColor(ConsoleColor backgroundColor, Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.BackgroundColor = backgroundColor; - - try - { - action(); - } - finally - { - Console.BackgroundColor = initialBackgroundColor; - } - } - - /// - /// Executes the specified function while the background color is set to the specified value. - /// - public static T WithBackgroundColor(ConsoleColor backgroundColor, Func func) - { - if (func == null) throw new ArgumentNullException(nameof(func)); - - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - Console.BackgroundColor = backgroundColor; - - try - { - return func(); - } - finally - { - Console.BackgroundColor = initialBackgroundColor; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public partial class CustomConsole + { + /// + /// Writes the specified text to the Console using the specified background color. + /// + /// The background color used to write the text. + /// The text to be written to the Console. + public static void WriteBackgroundColor(ConsoleColor backgroundColor, string text) + { + ConsoleColor oldColor = Console.BackgroundColor; + Console.BackgroundColor = backgroundColor; + Console.Write(text); + Console.BackgroundColor = oldColor; + } + + /// + /// Writes the text representation of the specified array of objects to the Console + /// using the specified format information and background color. + /// + /// The background color used to write the text. + /// A composite format string. + /// An array of objects to write using format. + public static void WriteBackgroundColor(ConsoleColor backgroundColor, string format, params object[] arg) + { + ConsoleColor oldColor = Console.BackgroundColor; + Console.BackgroundColor = backgroundColor; + Console.Write(format, arg); + Console.BackgroundColor = oldColor; + } + + /// + /// Writes the text representation of the specified object to the Console. + /// An additional parameter can be specified for the background color used to write the text. + /// + /// The background color used to write the text. + /// The value to write. + public static void WriteBackgroundColor(ConsoleColor backgroundColor, object o) + { + ConsoleColor oldColor = Console.BackgroundColor; + Console.BackgroundColor = backgroundColor; + Console.Write(o); + Console.BackgroundColor = oldColor; + } + + /// + /// Writes the specified string value, followed by the current line terminator, to the Console. + /// An additional parameter can be specified for the background color used to write the text. + /// + /// The background color used to write the text. + /// The text to write. + public static void WriteLineBackgroundColor(ConsoleColor backgroundColor, string text) + { + ConsoleColor oldColor = Console.BackgroundColor; + Console.BackgroundColor = backgroundColor; + Console.WriteLine(text); + Console.BackgroundColor = oldColor; + } + + /// + /// Writes the text representation of the specified array of objects, + /// followed by the current line terminator, to the Console + /// using the specified format information and background color. + /// + /// The background color used to write the text. + /// A composite format string. + /// An array of objects to write using format. + public static void WriteLineBackgroundColor(ConsoleColor backgroundColor, string format, params object[] arg) + { + ConsoleColor oldColor = Console.BackgroundColor; + Console.BackgroundColor = backgroundColor; + Console.WriteLine(format, arg); + Console.BackgroundColor = oldColor; + } + + /// + /// Writes the text representation of the specified object, followed by the current line terminator, to the Console. + /// An additional parameter can be specified for the background color used to write the text. + /// + /// The background color used to write the text. + /// The value to write. + public static void WriteLineBackgroundColor(ConsoleColor backgroundColor, object o) + { + ConsoleColor oldColor = Console.BackgroundColor; + Console.BackgroundColor = backgroundColor; + Console.WriteLine(o); + Console.BackgroundColor = oldColor; + } + + /// + /// Executes the specified action while the background color is set to the specified value. + /// + public static void WithBackgroundColor(ConsoleColor backgroundColor, Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + Console.BackgroundColor = backgroundColor; + + try + { + action(); + } + finally + { + Console.BackgroundColor = initialBackgroundColor; + } + } + + /// + /// Executes the specified function while the background color is set to the specified value. + /// + public static T WithBackgroundColor(ConsoleColor backgroundColor, Func func) + { + if (func == null) throw new ArgumentNullException(nameof(func)); + + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + Console.BackgroundColor = backgroundColor; + + try + { + return func(); + } + finally + { + Console.BackgroundColor = initialBackgroundColor; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BothColors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BothColors.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs index ef282769..08701d25 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.BothColors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs @@ -1,202 +1,202 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public partial class CustomConsole - { - public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = foregroundColor; - Console.BackgroundColor = backgroundColor; - - Console.Write(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = foregroundColor; - Console.BackgroundColor = backgroundColor; - - Console.Write(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = foregroundColor; - Console.BackgroundColor = backgroundColor; - - Console.Write(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = foregroundColor; - Console.BackgroundColor = backgroundColor; - - Console.WriteLine(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = foregroundColor; - Console.BackgroundColor = backgroundColor; - - Console.WriteLine(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = foregroundColor; - Console.BackgroundColor = backgroundColor; - - Console.WriteLine(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WithColors(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor, Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - if (foregroundColor.HasValue) - { - if (backgroundColor.HasValue) - WithColors(foregroundColor.Value, backgroundColor.Value, action); - else - WithForegroundColor(foregroundColor.Value, action); - } - else - { - if (backgroundColor.HasValue) - WithBackgroundColor(backgroundColor.Value, action); - else - action(); - } - } - - /// - /// Executes the specified action while the foreground and background colors - /// are set to the specified values. - /// - public static void WithColors(ConsoleColor foregroundColor, ConsoleColor backgroundColor, Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = foregroundColor; - Console.BackgroundColor = backgroundColor; - - try - { - action(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - - public static T WithColors(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor, Func func) - { - if (func == null) throw new ArgumentNullException(nameof(func)); - - if (foregroundColor.HasValue) - { - if (backgroundColor.HasValue) - return WithColors(foregroundColor.Value, backgroundColor.Value, func); - else - return WithForegroundColor(foregroundColor.Value, func); - } - else - { - if (backgroundColor.HasValue) - return WithBackgroundColor(backgroundColor.Value, func); - else - return func(); - } - } - - /// - /// Executes the specified function while the foreground and background colors - /// are set to the specified values. - /// - public static T WithColors(ConsoleColor foregroundColor, ConsoleColor backgroundColor, Func func) - { - if (func == null) throw new ArgumentNullException(nameof(func)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = foregroundColor; - Console.BackgroundColor = backgroundColor; - - try - { - return func(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public partial class CustomConsole + { + public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = foregroundColor; + Console.BackgroundColor = backgroundColor; + + Console.Write(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = foregroundColor; + Console.BackgroundColor = backgroundColor; + + Console.Write(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = foregroundColor; + Console.BackgroundColor = backgroundColor; + + Console.Write(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = foregroundColor; + Console.BackgroundColor = backgroundColor; + + Console.WriteLine(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = foregroundColor; + Console.BackgroundColor = backgroundColor; + + Console.WriteLine(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = foregroundColor; + Console.BackgroundColor = backgroundColor; + + Console.WriteLine(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WithColors(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor, Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + if (foregroundColor.HasValue) + { + if (backgroundColor.HasValue) + WithColors(foregroundColor.Value, backgroundColor.Value, action); + else + WithForegroundColor(foregroundColor.Value, action); + } + else + { + if (backgroundColor.HasValue) + WithBackgroundColor(backgroundColor.Value, action); + else + action(); + } + } + + /// + /// Executes the specified action while the foreground and background colors + /// are set to the specified values. + /// + public static void WithColors(ConsoleColor foregroundColor, ConsoleColor backgroundColor, Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = foregroundColor; + Console.BackgroundColor = backgroundColor; + + try + { + action(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + + public static T WithColors(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor, Func func) + { + if (func == null) throw new ArgumentNullException(nameof(func)); + + if (foregroundColor.HasValue) + { + if (backgroundColor.HasValue) + return WithColors(foregroundColor.Value, backgroundColor.Value, func); + else + return WithForegroundColor(foregroundColor.Value, func); + } + else + { + if (backgroundColor.HasValue) + return WithBackgroundColor(backgroundColor.Value, func); + else + return func(); + } + } + + /// + /// Executes the specified function while the foreground and background colors + /// are set to the specified values. + /// + public static T WithColors(ConsoleColor foregroundColor, ConsoleColor backgroundColor, Func func) + { + if (func == null) throw new ArgumentNullException(nameof(func)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = foregroundColor; + Console.BackgroundColor = backgroundColor; + + try + { + return func(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.ForegroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.Write.ForegroundColor.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs index 74bfb0ce..93dfc373 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.Write.ForegroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs @@ -1,154 +1,154 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public partial class CustomConsole - { - /// - /// Writes the specified text to the Console using the specified foreground color. - /// - /// The foreground color used to write the text. - /// The text to be written to the Console. - public static void Write(ConsoleColor foregroundColor, string text) - { - ConsoleColor oldColor = Console.ForegroundColor; - Console.ForegroundColor = foregroundColor; - Console.Write(text); - Console.ForegroundColor = oldColor; - } - - /// - /// Writes the text representation of the specified array of objects to the Console - /// using the specified format information and foreground color. - /// - /// The foreground color used to write the text. - /// A composite format string. - /// An array of objects to write using format. - public static void Write(ConsoleColor foregroundColor, string format, params object[] arg) - { - ConsoleColor oldColor = Console.ForegroundColor; - Console.ForegroundColor = foregroundColor; - Console.Write(format, arg); - Console.ForegroundColor = oldColor; - } - - /// - /// Writes the text representation of the specified object to the Console. - /// An additional parameter can be specified for the foreground color used to write the text. - /// - /// The foreground color used to write the text. - /// The value to write. - public static void Write(ConsoleColor foregroundColor, object o) - { - ConsoleColor oldColor = Console.ForegroundColor; - Console.ForegroundColor = foregroundColor; - Console.Write(o); - Console.ForegroundColor = oldColor; - } - - /// - /// Writes the specified string value, followed by the current line terminator, to the Console. - /// An additional parameter can be specified for the foreground color used to write the text. - /// - /// The foreground color used to write the text. - /// The text to write. - public static void WriteLine(ConsoleColor foregroundColor, string text) - { - ConsoleColor oldColor = Console.ForegroundColor; - Console.ForegroundColor = foregroundColor; - Console.WriteLine(text); - Console.ForegroundColor = oldColor; - } - - /// - /// Writes the text representation of the specified array of objects, - /// followed by the current line terminator, to the Console - /// using the specified format information and foreground color. - /// - /// The foreground color used to write the text. - /// A composite format string. - /// An array of objects to write using format. - public static void WriteLine(ConsoleColor foregroundColor, string format, params object[] arg) - { - ConsoleColor oldColor = Console.ForegroundColor; - Console.ForegroundColor = foregroundColor; - Console.WriteLine(format, arg); - Console.ForegroundColor = oldColor; - } - - /// - /// Writes the text representation of the specified object, followed by the current line terminator, to the Console. - /// An additional parameter can be specified for the foreground color used to write the text. - /// - /// The foreground color used to write the text. - /// The value to write. - public static void WriteLine(ConsoleColor foregroundColor, object o) - { - ConsoleColor oldColor = Console.ForegroundColor; - Console.ForegroundColor = foregroundColor; - Console.WriteLine(o); - Console.ForegroundColor = oldColor; - } - - /// - /// Executes the specified action while the foreground color is set to the specified value. - /// - public static void WithForegroundColor(ConsoleColor foregroundColor, Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - Console.ForegroundColor = foregroundColor; - - try - { - action(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - } - } - - /// - /// Executes the specified function while the foreground color is set to the specified value. - /// - public static T WithForegroundColor(ConsoleColor foregroundColor, Func func) - { - if (func == null) throw new ArgumentNullException(nameof(func)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - Console.ForegroundColor = foregroundColor; - - try - { - return func(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public partial class CustomConsole + { + /// + /// Writes the specified text to the Console using the specified foreground color. + /// + /// The foreground color used to write the text. + /// The text to be written to the Console. + public static void Write(ConsoleColor foregroundColor, string text) + { + ConsoleColor oldColor = Console.ForegroundColor; + Console.ForegroundColor = foregroundColor; + Console.Write(text); + Console.ForegroundColor = oldColor; + } + + /// + /// Writes the text representation of the specified array of objects to the Console + /// using the specified format information and foreground color. + /// + /// The foreground color used to write the text. + /// A composite format string. + /// An array of objects to write using format. + public static void Write(ConsoleColor foregroundColor, string format, params object[] arg) + { + ConsoleColor oldColor = Console.ForegroundColor; + Console.ForegroundColor = foregroundColor; + Console.Write(format, arg); + Console.ForegroundColor = oldColor; + } + + /// + /// Writes the text representation of the specified object to the Console. + /// An additional parameter can be specified for the foreground color used to write the text. + /// + /// The foreground color used to write the text. + /// The value to write. + public static void Write(ConsoleColor foregroundColor, object o) + { + ConsoleColor oldColor = Console.ForegroundColor; + Console.ForegroundColor = foregroundColor; + Console.Write(o); + Console.ForegroundColor = oldColor; + } + + /// + /// Writes the specified string value, followed by the current line terminator, to the Console. + /// An additional parameter can be specified for the foreground color used to write the text. + /// + /// The foreground color used to write the text. + /// The text to write. + public static void WriteLine(ConsoleColor foregroundColor, string text) + { + ConsoleColor oldColor = Console.ForegroundColor; + Console.ForegroundColor = foregroundColor; + Console.WriteLine(text); + Console.ForegroundColor = oldColor; + } + + /// + /// Writes the text representation of the specified array of objects, + /// followed by the current line terminator, to the Console + /// using the specified format information and foreground color. + /// + /// The foreground color used to write the text. + /// A composite format string. + /// An array of objects to write using format. + public static void WriteLine(ConsoleColor foregroundColor, string format, params object[] arg) + { + ConsoleColor oldColor = Console.ForegroundColor; + Console.ForegroundColor = foregroundColor; + Console.WriteLine(format, arg); + Console.ForegroundColor = oldColor; + } + + /// + /// Writes the text representation of the specified object, followed by the current line terminator, to the Console. + /// An additional parameter can be specified for the foreground color used to write the text. + /// + /// The foreground color used to write the text. + /// The value to write. + public static void WriteLine(ConsoleColor foregroundColor, object o) + { + ConsoleColor oldColor = Console.ForegroundColor; + Console.ForegroundColor = foregroundColor; + Console.WriteLine(o); + Console.ForegroundColor = oldColor; + } + + /// + /// Executes the specified action while the foreground color is set to the specified value. + /// + public static void WithForegroundColor(ConsoleColor foregroundColor, Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + Console.ForegroundColor = foregroundColor; + + try + { + action(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + } + } + + /// + /// Executes the specified function while the foreground color is set to the specified value. + /// + public static T WithForegroundColor(ConsoleColor foregroundColor, Func func) + { + if (func == null) throw new ArgumentNullException(nameof(func)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + Console.ForegroundColor = foregroundColor; + + try + { + return func(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BackgroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BackgroundColor.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs index 5709dd80..bc0d22ce 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BackgroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs @@ -1,117 +1,117 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public static partial class CustomConsole - { - /// - /// Writes the specified text to the Console. - /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The background color used to write the text. - /// The text to be written to the Console. - public static void WriteBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, string text) - { - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Write(backgroundColor, text); - } - - /// - /// Writes the text representation of the specified array of objects to the Console using the specified format information. - /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The background color used to write the text. - /// A composite format string. - /// An array of objects to write using format. - public static void WriteBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, string format, params object[] arg) - { - string text = string.Format(format, arg); - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Write(backgroundColor, text); - } - - /// - /// Writes the text representation of the specified object to the Console. - /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The background color used to write the text. - /// The value to write. - public static void WriteBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, object o) - { - string text = o?.ToString() ?? string.Empty; - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Write(backgroundColor, text); - } - - /// - /// Writes the specified text to the Console, followed by the current line terminator. - /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The background color used to write the text. - /// The text to be written to the Console. - public static void WriteLineBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, string text) - { - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - WriteLine(backgroundColor, text); - } - - /// - /// Writes the text representation of the specified array of objects, followed by the current line terminator, - /// to the Console, using the specified format information. - /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The background color used to write the text. - /// A composite format string. - /// An array of objects to write using format. - public static void WriteLineBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, string format, params object[] arg) - { - string text = string.Format(format, arg); - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - WriteLine(backgroundColor, text); - } - - /// - /// Writes the text representation of the specified object, followed by the current line terminator, to the Console. - /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The background color used to write the text. - /// The value to write. - public static void WriteLineBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, object o) - { - string text = o?.ToString() ?? string.Empty; - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - WriteLine(backgroundColor, text); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public static partial class CustomConsole + { + /// + /// Writes the specified text to the Console. + /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The background color used to write the text. + /// The text to be written to the Console. + public static void WriteBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, string text) + { + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Write(backgroundColor, text); + } + + /// + /// Writes the text representation of the specified array of objects to the Console using the specified format information. + /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The background color used to write the text. + /// A composite format string. + /// An array of objects to write using format. + public static void WriteBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, string format, params object[] arg) + { + string text = string.Format(format, arg); + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Write(backgroundColor, text); + } + + /// + /// Writes the text representation of the specified object to the Console. + /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The background color used to write the text. + /// The value to write. + public static void WriteBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, object o) + { + string text = o?.ToString() ?? string.Empty; + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Write(backgroundColor, text); + } + + /// + /// Writes the specified text to the Console, followed by the current line terminator. + /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The background color used to write the text. + /// The text to be written to the Console. + public static void WriteLineBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, string text) + { + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + WriteLine(backgroundColor, text); + } + + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, + /// to the Console, using the specified format information. + /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The background color used to write the text. + /// A composite format string. + /// An array of objects to write using format. + public static void WriteLineBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, string format, params object[] arg) + { + string text = string.Format(format, arg); + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + WriteLine(backgroundColor, text); + } + + /// + /// Writes the text representation of the specified object, followed by the current line terminator, to the Console. + /// Additional parameters can be specified for the background color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The background color used to write the text. + /// The value to write. + public static void WriteLineBackgroundColor(HorizontalAlignment horizontalAlignment, ConsoleColor backgroundColor, object o) + { + string text = o?.ToString() ?? string.Empty; + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + WriteLine(backgroundColor, text); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BothColors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BothColors.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs index e9ec6319..d69c5c1f 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.BothColors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs @@ -1,88 +1,88 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public static partial class CustomConsole - { - /// - /// Writes the specified text to the Console. - /// Additional parameters can be specified for the foreground color, background color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The foreground color used to write the text. - /// The background color used to write the text. - /// The text to be written to the Console. - public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) - { - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Write(foregroundColor, backgroundColor, text); - } - - public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) - { - string text = string.Format(format, arg); - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Write(foregroundColor, backgroundColor, text); - } - - public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) - { - string text = o?.ToString() ?? string.Empty; - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Write(foregroundColor, backgroundColor, text); - } - - /// - /// Writes the specified text to the Console, followed by the current line terminator. - /// Additional parameters can be specified for the foreground color, background color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The foreground color used to write the text. - /// The background color used to write the text. - /// The text to be written to the Console. - public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) - { - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - WriteLine(foregroundColor, backgroundColor, text); - } - - public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) - { - string text = string.Format(format, arg); - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - WriteLine(foregroundColor, backgroundColor, text); - } - - public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) - { - string text = o?.ToString() ?? string.Empty; - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - WriteLine(foregroundColor, backgroundColor, text); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public static partial class CustomConsole + { + /// + /// Writes the specified text to the Console. + /// Additional parameters can be specified for the foreground color, background color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The foreground color used to write the text. + /// The background color used to write the text. + /// The text to be written to the Console. + public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) + { + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Write(foregroundColor, backgroundColor, text); + } + + public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) + { + string text = string.Format(format, arg); + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Write(foregroundColor, backgroundColor, text); + } + + public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) + { + string text = o?.ToString() ?? string.Empty; + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Write(foregroundColor, backgroundColor, text); + } + + /// + /// Writes the specified text to the Console, followed by the current line terminator. + /// Additional parameters can be specified for the foreground color, background color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The foreground color used to write the text. + /// The background color used to write the text. + /// The text to be written to the Console. + public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) + { + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + WriteLine(foregroundColor, backgroundColor, text); + } + + public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) + { + string text = string.Format(format, arg); + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + WriteLine(foregroundColor, backgroundColor, text); + } + + public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) + { + string text = o?.ToString() ?? string.Empty; + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + WriteLine(foregroundColor, backgroundColor, text); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.DefaultColors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.DefaultColors.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs index e3f237ae..94d2ee1f 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.DefaultColors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs @@ -1,119 +1,119 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public static partial class CustomConsole - { - /// - /// Writes the specified text to the Console, horizontally aligned relative to the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The text to be written to the Console. - public static void Write(HorizontalAlignment horizontalAlignment, string text) - { - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Console.Write(text); - } - - /// - /// Writes the text representation of the specified array of objects to the Console, - /// using the specified format information and - /// horizontally aligned relative to the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// A composite format string. - /// An array of objects to write using format. - public static void Write(HorizontalAlignment horizontalAlignment, string format, params object[] arg) - { - string text = string.Format(format, arg); - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Console.Write(text); - } - - /// - /// Writes the text representation of the specified object to the Console, - /// horizontally aligned relative to the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The value to write. - public static void Write(HorizontalAlignment horizontalAlignment, object o) - { - string text = o?.ToString() ?? string.Empty; - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Console.Write(text); - } - - /// - /// Writes the specified text to the Console, horizontally aligned relative to the Console's buffer, - /// followed by the current line terminator. - /// - /// The horizontal alignment in the Console's buffer. - /// The text to be written to the Console. - public static void WriteLine(HorizontalAlignment horizontalAlignment, string text) - { - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Console.WriteLine(text); - } - - /// - /// Writes the text representation of the specified array of objects to the Console, - /// using the specified format information, and - /// horizontally aligned relative to the Console's buffer, followed by the current line terminator. - /// - /// The horizontal alignment in the Console's buffer. - /// A composite format string. - /// An array of objects to write using format. - public static void WriteLine(HorizontalAlignment horizontalAlignment, string format, params object[] arg) - { - string text = string.Format(format, arg); - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Console.WriteLine(text); - } - - /// - /// Writes the text representation of the specified object to the Console, - /// horizontally aligned relative to the Console's buffer, followed by the current line terminator. - /// - /// The horizontal alignment in the Console's buffer. - /// The value to write. - public static void WriteLine(HorizontalAlignment horizontalAlignment, object o) - { - string text = o?.ToString() ?? string.Empty; - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Console.WriteLine(text); - } - - private static int CalculateStartPosition(string text, HorizontalAlignment horizontalAlignment) - { - AlignedText alignedText = new AlignedText - { - Text = text, - HorizontalAlignment = horizontalAlignment, - Width = Console.BufferWidth - }; - - return alignedText.SpaceLeftCount; - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public static partial class CustomConsole + { + /// + /// Writes the specified text to the Console, horizontally aligned relative to the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The text to be written to the Console. + public static void Write(HorizontalAlignment horizontalAlignment, string text) + { + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Console.Write(text); + } + + /// + /// Writes the text representation of the specified array of objects to the Console, + /// using the specified format information and + /// horizontally aligned relative to the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// A composite format string. + /// An array of objects to write using format. + public static void Write(HorizontalAlignment horizontalAlignment, string format, params object[] arg) + { + string text = string.Format(format, arg); + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Console.Write(text); + } + + /// + /// Writes the text representation of the specified object to the Console, + /// horizontally aligned relative to the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The value to write. + public static void Write(HorizontalAlignment horizontalAlignment, object o) + { + string text = o?.ToString() ?? string.Empty; + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Console.Write(text); + } + + /// + /// Writes the specified text to the Console, horizontally aligned relative to the Console's buffer, + /// followed by the current line terminator. + /// + /// The horizontal alignment in the Console's buffer. + /// The text to be written to the Console. + public static void WriteLine(HorizontalAlignment horizontalAlignment, string text) + { + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Console.WriteLine(text); + } + + /// + /// Writes the text representation of the specified array of objects to the Console, + /// using the specified format information, and + /// horizontally aligned relative to the Console's buffer, followed by the current line terminator. + /// + /// The horizontal alignment in the Console's buffer. + /// A composite format string. + /// An array of objects to write using format. + public static void WriteLine(HorizontalAlignment horizontalAlignment, string format, params object[] arg) + { + string text = string.Format(format, arg); + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Console.WriteLine(text); + } + + /// + /// Writes the text representation of the specified object to the Console, + /// horizontally aligned relative to the Console's buffer, followed by the current line terminator. + /// + /// The horizontal alignment in the Console's buffer. + /// The value to write. + public static void WriteLine(HorizontalAlignment horizontalAlignment, object o) + { + string text = o?.ToString() ?? string.Empty; + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Console.WriteLine(text); + } + + private static int CalculateStartPosition(string text, HorizontalAlignment horizontalAlignment) + { + AlignedText alignedText = new AlignedText + { + Text = text, + HorizontalAlignment = horizontalAlignment, + Width = Console.BufferWidth + }; + + return alignedText.SpaceLeftCount; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.ForegroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.ForegroundColor.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs index 71d1f441..b4865bc1 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteAligned.ForegroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs @@ -1,86 +1,86 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public static partial class CustomConsole - { - /// - /// Writes the specified text to the Console. - /// Additional parameters can be specified for the foreground color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The foreground color used to write the text. - /// The text to be written to the Console. - public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, string text) - { - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Write(foregroundColor, text); - } - - public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, string format, params object[] arg) - { - string text = string.Format(format, arg); - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Write(foregroundColor, text); - } - - public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, object o) - { - string text = o?.ToString() ?? string.Empty; - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - Write(foregroundColor, text); - } - - /// - /// Writes the specified text to the Console, followed by the current line terminator. - /// Additional parameters can be specified for the foreground color and the horizontal alignment in the Console's buffer. - /// - /// The horizontal alignment in the Console's buffer. - /// The foreground color used to write the text. - /// The text to be written to the Console. - public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, string text) - { - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - WriteLine(foregroundColor, text); - } - - public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, string format, params object[] arg) - { - string text = string.Format(format, arg); - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - WriteLine(foregroundColor, text); - } - - public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, object o) - { - string text = o?.ToString() ?? string.Empty; - - Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); - WriteLine(foregroundColor, text); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public static partial class CustomConsole + { + /// + /// Writes the specified text to the Console. + /// Additional parameters can be specified for the foreground color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The foreground color used to write the text. + /// The text to be written to the Console. + public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, string text) + { + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Write(foregroundColor, text); + } + + public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, string format, params object[] arg) + { + string text = string.Format(format, arg); + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Write(foregroundColor, text); + } + + public static void Write(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, object o) + { + string text = o?.ToString() ?? string.Empty; + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + Write(foregroundColor, text); + } + + /// + /// Writes the specified text to the Console, followed by the current line terminator. + /// Additional parameters can be specified for the foreground color and the horizontal alignment in the Console's buffer. + /// + /// The horizontal alignment in the Console's buffer. + /// The foreground color used to write the text. + /// The text to be written to the Console. + public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, string text) + { + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + WriteLine(foregroundColor, text); + } + + public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, string format, params object[] arg) + { + string text = string.Format(format, arg); + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + WriteLine(foregroundColor, text); + } + + public static void WriteLine(HorizontalAlignment horizontalAlignment, ConsoleColor foregroundColor, object o) + { + string text = o?.ToString() ?? string.Empty; + + Console.CursorLeft = CalculateStartPosition(text, horizontalAlignment); + WriteLine(foregroundColor, text); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs index 44ac1b85..a90f1de4 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteEmphasies.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs @@ -1,171 +1,171 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public partial class CustomConsole - { - public static void WriteEmphasies(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = EmphasizedColor; - if (EmphasizedBackgroundColor.HasValue) - Console.BackgroundColor = EmphasizedBackgroundColor.Value; - - Console.Write(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteEmphasies(string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = EmphasizedColor; - if (EmphasizedBackgroundColor.HasValue) - Console.BackgroundColor = EmphasizedBackgroundColor.Value; - - Console.Write(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteEmphasies(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = EmphasizedColor; - if (EmphasizedBackgroundColor.HasValue) - Console.BackgroundColor = EmphasizedBackgroundColor.Value; - - Console.Write(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineEmphasies(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = EmphasizedColor; - if (EmphasizedBackgroundColor.HasValue) - Console.BackgroundColor = EmphasizedBackgroundColor.Value; - - Console.WriteLine(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineEmphasies(string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = EmphasizedColor; - if (EmphasizedBackgroundColor.HasValue) - Console.BackgroundColor = EmphasizedBackgroundColor.Value; - - Console.WriteLine(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineEmphasies(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = EmphasizedColor; - if (EmphasizedBackgroundColor.HasValue) - Console.BackgroundColor = EmphasizedBackgroundColor.Value; - - Console.WriteLine(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Executes the specified action while the foreground and background colors - /// are changed to "Emphasies" colors. - /// - public static void WithEmphasiesColors(Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = EmphasizedColor; - if (EmphasizedBackgroundColor.HasValue) - Console.BackgroundColor = EmphasizedBackgroundColor.Value; - - try - { - action(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - - /// - /// Executes the specified function while the foreground and background colors - /// are changed to "Emphasies" colors. - /// - public static T WithEmphasiesColors(Func func) - { - if (func == null) throw new ArgumentNullException(nameof(func)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = EmphasizedColor; - - if (EmphasizedBackgroundColor.HasValue) - Console.BackgroundColor = EmphasizedBackgroundColor.Value; - - try - { - return func(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public partial class CustomConsole + { + public static void WriteEmphasies(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; + + Console.Write(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteEmphasies(string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; + + Console.Write(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteEmphasies(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; + + Console.Write(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineEmphasies(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; + + Console.WriteLine(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineEmphasies(string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; + + Console.WriteLine(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineEmphasies(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; + + Console.WriteLine(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Executes the specified action while the foreground and background colors + /// are changed to "Emphasies" colors. + /// + public static void WithEmphasiesColors(Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = EmphasizedColor; + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; + + try + { + action(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + + /// + /// Executes the specified function while the foreground and background colors + /// are changed to "Emphasies" colors. + /// + public static T WithEmphasiesColors(Func func) + { + if (func == null) throw new ArgumentNullException(nameof(func)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = EmphasizedColor; + + if (EmphasizedBackgroundColor.HasValue) + Console.BackgroundColor = EmphasizedBackgroundColor.Value; + + try + { + return func(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteError.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteError.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteError.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteError.cs index 20d9084e..3e10530f 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteError.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteError.cs @@ -1,186 +1,186 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public partial class CustomConsole - { - public static void WriteError(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = ErrorColor; - if (ErrorBackgroundColor.HasValue) - Console.BackgroundColor = ErrorBackgroundColor.Value; - - Console.Write(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteError(string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = ErrorColor; - if (ErrorBackgroundColor.HasValue) - Console.BackgroundColor = ErrorBackgroundColor.Value; - - Console.Write(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteError(Exception ex) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = ErrorColor; - if (ErrorBackgroundColor.HasValue) - Console.BackgroundColor = ErrorBackgroundColor.Value; - - Console.WriteLine(ex); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteError(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = ErrorColor; - if (ErrorBackgroundColor.HasValue) - Console.BackgroundColor = ErrorBackgroundColor.Value; - - Console.WriteLine(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineError(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = ErrorColor; - if (ErrorBackgroundColor.HasValue) - Console.BackgroundColor = ErrorBackgroundColor.Value; - - Console.WriteLine(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineError(string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = ErrorColor; - if (ErrorBackgroundColor.HasValue) - Console.BackgroundColor = ErrorBackgroundColor.Value; - - Console.WriteLine(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineError(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = ErrorColor; - if (ErrorBackgroundColor.HasValue) - Console.BackgroundColor = ErrorBackgroundColor.Value; - - Console.WriteLine(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Executes the specified action while the foreground and background colors - /// are changed to "Error" colors. - /// - public static void WithErrorColors(Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = ErrorColor; - if (ErrorBackgroundColor.HasValue) - Console.BackgroundColor = ErrorBackgroundColor.Value; - - try - { - action(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - - /// - /// Executes the specified function while the foreground and background colors - /// are changed to "Error" colors. - /// - public static T WithErrorColors(Func func) - { - if (func == null) throw new ArgumentNullException(nameof(func)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = ErrorColor; - - if (ErrorBackgroundColor.HasValue) - Console.BackgroundColor = ErrorBackgroundColor.Value; - - try - { - return func(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public partial class CustomConsole + { + public static void WriteError(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = ErrorColor; + if (ErrorBackgroundColor.HasValue) + Console.BackgroundColor = ErrorBackgroundColor.Value; + + Console.Write(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteError(string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = ErrorColor; + if (ErrorBackgroundColor.HasValue) + Console.BackgroundColor = ErrorBackgroundColor.Value; + + Console.Write(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteError(Exception ex) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = ErrorColor; + if (ErrorBackgroundColor.HasValue) + Console.BackgroundColor = ErrorBackgroundColor.Value; + + Console.WriteLine(ex); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteError(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = ErrorColor; + if (ErrorBackgroundColor.HasValue) + Console.BackgroundColor = ErrorBackgroundColor.Value; + + Console.WriteLine(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineError(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = ErrorColor; + if (ErrorBackgroundColor.HasValue) + Console.BackgroundColor = ErrorBackgroundColor.Value; + + Console.WriteLine(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineError(string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = ErrorColor; + if (ErrorBackgroundColor.HasValue) + Console.BackgroundColor = ErrorBackgroundColor.Value; + + Console.WriteLine(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineError(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = ErrorColor; + if (ErrorBackgroundColor.HasValue) + Console.BackgroundColor = ErrorBackgroundColor.Value; + + Console.WriteLine(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Executes the specified action while the foreground and background colors + /// are changed to "Error" colors. + /// + public static void WithErrorColors(Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = ErrorColor; + if (ErrorBackgroundColor.HasValue) + Console.BackgroundColor = ErrorBackgroundColor.Value; + + try + { + action(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + + /// + /// Executes the specified function while the foreground and background colors + /// are changed to "Error" colors. + /// + public static T WithErrorColors(Func func) + { + if (func == null) throw new ArgumentNullException(nameof(func)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = ErrorColor; + + if (ErrorBackgroundColor.HasValue) + Console.BackgroundColor = ErrorBackgroundColor.Value; + + try + { + return func(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteInverted.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteInverted.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteInverted.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteInverted.cs index df4ee25d..8f4a0184 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteInverted.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteInverted.cs @@ -1,162 +1,162 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public partial class CustomConsole - { - public static void WriteInverted(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = initialBackgroundColor; - Console.BackgroundColor = initialForegroundColor; - - Console.Write(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteInverted(string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = initialBackgroundColor; - Console.BackgroundColor = initialForegroundColor; - - Console.Write(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteInverted(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = initialBackgroundColor; - Console.BackgroundColor = initialForegroundColor; - - Console.Write(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineInverted(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = initialBackgroundColor; - Console.BackgroundColor = initialForegroundColor; - - Console.WriteLine(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineInverted(string text, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = initialBackgroundColor; - Console.BackgroundColor = initialForegroundColor; - - Console.WriteLine(text, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineInverted(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = initialBackgroundColor; - Console.BackgroundColor = initialForegroundColor; - - Console.WriteLine(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Executes the specified action while the foreground and background colors - /// are switched between them. - /// - public static void WithInvertedColors(Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = initialBackgroundColor; - Console.BackgroundColor = initialForegroundColor; - - try - { - action(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - - /// - /// Executes the specified function while the foreground and background colors - /// are switched between them. - /// - public static T WithInvertedColors(Func func) - { - if (func == null) throw new ArgumentNullException(nameof(func)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = initialBackgroundColor; - Console.BackgroundColor = initialForegroundColor; - - try - { - return func(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public partial class CustomConsole + { + public static void WriteInverted(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = initialBackgroundColor; + Console.BackgroundColor = initialForegroundColor; + + Console.Write(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteInverted(string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = initialBackgroundColor; + Console.BackgroundColor = initialForegroundColor; + + Console.Write(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteInverted(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = initialBackgroundColor; + Console.BackgroundColor = initialForegroundColor; + + Console.Write(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineInverted(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = initialBackgroundColor; + Console.BackgroundColor = initialForegroundColor; + + Console.WriteLine(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineInverted(string text, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = initialBackgroundColor; + Console.BackgroundColor = initialForegroundColor; + + Console.WriteLine(text, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineInverted(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = initialBackgroundColor; + Console.BackgroundColor = initialForegroundColor; + + Console.WriteLine(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Executes the specified action while the foreground and background colors + /// are switched between them. + /// + public static void WithInvertedColors(Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = initialBackgroundColor; + Console.BackgroundColor = initialForegroundColor; + + try + { + action(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + + /// + /// Executes the specified function while the foreground and background colors + /// are switched between them. + /// + public static T WithInvertedColors(Func func) + { + if (func == null) throw new ArgumentNullException(nameof(func)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = initialBackgroundColor; + Console.BackgroundColor = initialForegroundColor; + + try + { + return func(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteNormal.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteNormal.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteNormal.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteNormal.cs index c51e654d..12a24fb4 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteNormal.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteNormal.cs @@ -1,94 +1,94 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public partial class CustomConsole - { - /// - /// Writes the specified string value to the Console. - /// - /// The value to write. - public static void Write(string value) - { - Console.Write(value); - } - - /// - /// Writes the text representation of the specified array of objects to the Console, - /// using the specified format information. - /// - /// A composite format string. - /// An array of objects to write using format. - public static void Write(string format, params object[] arg) - { - Console.Write(format, arg); - } - - /// - /// Writes the text representation of the specified object to the Console. - /// - /// The value to write. - public static void Write(object o) - { - Console.Write(o); - } - - /// - /// Writes the current line terminator to the Console. - /// - public static void WriteLine() - { - Console.WriteLine(); - } - - /// - /// Writes the specified string value to the Console, followed by the current line terminator. - /// - /// The value to write. - public static void WriteLine(string value) - { - Console.WriteLine(value); - } - - /// - /// Writes the text representation of the specified array of objects to the Console, - /// using the specified format information, followed by the current line terminator. - /// - /// A composite format string. - /// An array of objects to write using format. - public static void WriteLine(string format, params object[] arg) - { - Console.WriteLine(format, arg); - } - - /// - /// Writes the text representation of the specified object to the Console, followed by the current line terminator. - /// - /// The value to write. - public static void WriteLine(object o) - { - Console.WriteLine(o); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public partial class CustomConsole + { + /// + /// Writes the specified string value to the Console. + /// + /// The value to write. + public static void Write(string value) + { + Console.Write(value); + } + + /// + /// Writes the text representation of the specified array of objects to the Console, + /// using the specified format information. + /// + /// A composite format string. + /// An array of objects to write using format. + public static void Write(string format, params object[] arg) + { + Console.Write(format, arg); + } + + /// + /// Writes the text representation of the specified object to the Console. + /// + /// The value to write. + public static void Write(object o) + { + Console.Write(o); + } + + /// + /// Writes the current line terminator to the Console. + /// + public static void WriteLine() + { + Console.WriteLine(); + } + + /// + /// Writes the specified string value to the Console, followed by the current line terminator. + /// + /// The value to write. + public static void WriteLine(string value) + { + Console.WriteLine(value); + } + + /// + /// Writes the text representation of the specified array of objects to the Console, + /// using the specified format information, followed by the current line terminator. + /// + /// A composite format string. + /// An array of objects to write using format. + public static void WriteLine(string format, params object[] arg) + { + Console.WriteLine(format, arg); + } + + /// + /// Writes the text representation of the specified object to the Console, followed by the current line terminator. + /// + /// The value to write. + public static void WriteLine(object o) + { + Console.WriteLine(o); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteSuccess.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteSuccess.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteSuccess.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteSuccess.cs index 3d3f719d..8050b30d 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteSuccess.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteSuccess.cs @@ -1,171 +1,171 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public partial class CustomConsole - { - public static void WriteSuccess(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = SuccessColor; - if (SuccessBackgroundColor.HasValue) - Console.BackgroundColor = SuccessBackgroundColor.Value; - - Console.Write(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteSuccess(string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = SuccessColor; - if (SuccessBackgroundColor.HasValue) - Console.BackgroundColor = SuccessBackgroundColor.Value; - - Console.Write(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteSuccess(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = SuccessColor; - if (SuccessBackgroundColor.HasValue) - Console.BackgroundColor = SuccessBackgroundColor.Value; - - Console.Write(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineSuccess(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = SuccessColor; - if (SuccessBackgroundColor.HasValue) - Console.BackgroundColor = SuccessBackgroundColor.Value; - - Console.WriteLine(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineSuccess(string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = SuccessColor; - if (SuccessBackgroundColor.HasValue) - Console.BackgroundColor = SuccessBackgroundColor.Value; - - Console.WriteLine(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - public static void WriteLineSuccess(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = SuccessColor; - if (SuccessBackgroundColor.HasValue) - Console.BackgroundColor = SuccessBackgroundColor.Value; - - Console.WriteLine(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Executes the specified action while the foreground and background colors - /// are changed to "Success" colors. - /// - public static void WithSuccessColors(Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = SuccessColor; - if (SuccessBackgroundColor.HasValue) - Console.BackgroundColor = SuccessBackgroundColor.Value; - - try - { - action(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - - /// - /// Executes the specified function while the foreground and background colors - /// are changed to "Success" colors. - /// - public static T WithSuccessColors(Func func) - { - if (func == null) throw new ArgumentNullException(nameof(func)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = SuccessColor; - - if (SuccessBackgroundColor.HasValue) - Console.BackgroundColor = SuccessBackgroundColor.Value; - - try - { - return func(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public partial class CustomConsole + { + public static void WriteSuccess(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = SuccessColor; + if (SuccessBackgroundColor.HasValue) + Console.BackgroundColor = SuccessBackgroundColor.Value; + + Console.Write(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteSuccess(string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = SuccessColor; + if (SuccessBackgroundColor.HasValue) + Console.BackgroundColor = SuccessBackgroundColor.Value; + + Console.Write(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteSuccess(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = SuccessColor; + if (SuccessBackgroundColor.HasValue) + Console.BackgroundColor = SuccessBackgroundColor.Value; + + Console.Write(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineSuccess(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = SuccessColor; + if (SuccessBackgroundColor.HasValue) + Console.BackgroundColor = SuccessBackgroundColor.Value; + + Console.WriteLine(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineSuccess(string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = SuccessColor; + if (SuccessBackgroundColor.HasValue) + Console.BackgroundColor = SuccessBackgroundColor.Value; + + Console.WriteLine(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + public static void WriteLineSuccess(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = SuccessColor; + if (SuccessBackgroundColor.HasValue) + Console.BackgroundColor = SuccessBackgroundColor.Value; + + Console.WriteLine(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Executes the specified action while the foreground and background colors + /// are changed to "Success" colors. + /// + public static void WithSuccessColors(Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = SuccessColor; + if (SuccessBackgroundColor.HasValue) + Console.BackgroundColor = SuccessBackgroundColor.Value; + + try + { + action(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + + /// + /// Executes the specified function while the foreground and background colors + /// are changed to "Success" colors. + /// + public static T WithSuccessColors(Func func) + { + if (func == null) throw new ArgumentNullException(nameof(func)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = SuccessColor; + + if (SuccessBackgroundColor.HasValue) + Console.BackgroundColor = SuccessBackgroundColor.Value; + + try + { + return func(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteWarning.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteWarning.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/CustomConsole.WriteWarning.cs rename to sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteWarning.cs index 8c50dccf..6eb7dd2a 100644 --- a/sources/ConsoleTools/ConsoleTools/CustomConsole.WriteWarning.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteWarning.cs @@ -1,204 +1,204 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - public partial class CustomConsole - { - /// - /// Writes the specified string value to the Console - /// using the "Warning" foreground and background colors. - /// - /// The value to write. - public static void WriteWarning(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = WarningColor; - if (WarningBackgroundColor.HasValue) - Console.BackgroundColor = WarningBackgroundColor.Value; - - Console.Write(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Writes the text representation of the specified array of objects to the Console, - /// using the specified format information and the "Warning" foreground and background colors. - /// - /// A composite format string. - /// An array of objects to write using format. - public static void WriteWarning(string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = WarningColor; - if (WarningBackgroundColor.HasValue) - Console.BackgroundColor = WarningBackgroundColor.Value; - - Console.Write(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Writes the text representation of the specified object to the Console - /// using the "Warning" foreground and background colors. - /// - /// The value to write. - public static void WriteWarning(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = WarningColor; - if (WarningBackgroundColor.HasValue) - Console.BackgroundColor = WarningBackgroundColor.Value; - - Console.Write(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Writes the specified string value to the Console, followed by the current line terminator - /// using the "Warning" foreground and background colors. - /// - /// The value to write. - public static void WriteLineWarning(string text) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = WarningColor; - if (WarningBackgroundColor.HasValue) - Console.BackgroundColor = WarningBackgroundColor.Value; - - Console.WriteLine(text); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Writes the text representation of the specified array of objects to the Console, - /// using the specified format information, followed by the current line terminator, - /// using the "Warning" foreground and background colors. - /// - /// A composite format string. - /// An array of objects to write using format. - public static void WriteLineWarning(string format, params object[] arg) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = WarningColor; - if (WarningBackgroundColor.HasValue) - Console.BackgroundColor = WarningBackgroundColor.Value; - - Console.WriteLine(format, arg); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Writes the text representation of the specified object to the Console, followed by the current line terminator - /// using the "Warning" foreground and background colors. - /// - /// The value to write. - public static void WriteLineWarning(object o) - { - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = WarningColor; - if (WarningBackgroundColor.HasValue) - Console.BackgroundColor = WarningBackgroundColor.Value; - - Console.WriteLine(o); - - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - - /// - /// Executes the specified action while the foreground and background colors - /// are changed to "Warning" colors. - /// - public static void WithWarningColors(Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = WarningColor; - if (WarningBackgroundColor.HasValue) - Console.BackgroundColor = WarningBackgroundColor.Value; - - try - { - action(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - - /// - /// Executes the specified function while the foreground and background colors - /// are changed to "Warning" colors. - /// - public static T WithWarningColors(Func func) - { - if (func == null) throw new ArgumentNullException(nameof(func)); - - ConsoleColor initialForegroundColor = Console.ForegroundColor; - ConsoleColor initialBackgroundColor = Console.BackgroundColor; - - Console.ForegroundColor = WarningColor; - - if (WarningBackgroundColor.HasValue) - Console.BackgroundColor = WarningBackgroundColor.Value; - - try - { - return func(); - } - finally - { - Console.ForegroundColor = initialForegroundColor; - Console.BackgroundColor = initialBackgroundColor; - } - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + public partial class CustomConsole + { + /// + /// Writes the specified string value to the Console + /// using the "Warning" foreground and background colors. + /// + /// The value to write. + public static void WriteWarning(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = WarningColor; + if (WarningBackgroundColor.HasValue) + Console.BackgroundColor = WarningBackgroundColor.Value; + + Console.Write(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Writes the text representation of the specified array of objects to the Console, + /// using the specified format information and the "Warning" foreground and background colors. + /// + /// A composite format string. + /// An array of objects to write using format. + public static void WriteWarning(string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = WarningColor; + if (WarningBackgroundColor.HasValue) + Console.BackgroundColor = WarningBackgroundColor.Value; + + Console.Write(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Writes the text representation of the specified object to the Console + /// using the "Warning" foreground and background colors. + /// + /// The value to write. + public static void WriteWarning(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = WarningColor; + if (WarningBackgroundColor.HasValue) + Console.BackgroundColor = WarningBackgroundColor.Value; + + Console.Write(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Writes the specified string value to the Console, followed by the current line terminator + /// using the "Warning" foreground and background colors. + /// + /// The value to write. + public static void WriteLineWarning(string text) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = WarningColor; + if (WarningBackgroundColor.HasValue) + Console.BackgroundColor = WarningBackgroundColor.Value; + + Console.WriteLine(text); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Writes the text representation of the specified array of objects to the Console, + /// using the specified format information, followed by the current line terminator, + /// using the "Warning" foreground and background colors. + /// + /// A composite format string. + /// An array of objects to write using format. + public static void WriteLineWarning(string format, params object[] arg) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = WarningColor; + if (WarningBackgroundColor.HasValue) + Console.BackgroundColor = WarningBackgroundColor.Value; + + Console.WriteLine(format, arg); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Writes the text representation of the specified object to the Console, followed by the current line terminator + /// using the "Warning" foreground and background colors. + /// + /// The value to write. + public static void WriteLineWarning(object o) + { + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = WarningColor; + if (WarningBackgroundColor.HasValue) + Console.BackgroundColor = WarningBackgroundColor.Value; + + Console.WriteLine(o); + + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + + /// + /// Executes the specified action while the foreground and background colors + /// are changed to "Warning" colors. + /// + public static void WithWarningColors(Action action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = WarningColor; + if (WarningBackgroundColor.HasValue) + Console.BackgroundColor = WarningBackgroundColor.Value; + + try + { + action(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + + /// + /// Executes the specified function while the foreground and background colors + /// are changed to "Warning" colors. + /// + public static T WithWarningColors(Func func) + { + if (func == null) throw new ArgumentNullException(nameof(func)); + + ConsoleColor initialForegroundColor = Console.ForegroundColor; + ConsoleColor initialBackgroundColor = Console.BackgroundColor; + + Console.ForegroundColor = WarningColor; + + if (WarningBackgroundColor.HasValue) + Console.BackgroundColor = WarningBackgroundColor.Value; + + try + { + return func(); + } + finally + { + Console.ForegroundColor = initialForegroundColor; + Console.BackgroundColor = initialBackgroundColor; + } + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/DefaultParent.cs b/sources/ConsoleTools/ConsoleTools.Core/DefaultParent.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/DefaultParent.cs rename to sources/ConsoleTools/ConsoleTools.Core/DefaultParent.cs diff --git a/sources/ConsoleTools/ConsoleTools/ErasableControl.cs b/sources/ConsoleTools/ConsoleTools.Core/ErasableControl.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools/ErasableControl.cs rename to sources/ConsoleTools/ConsoleTools.Core/ErasableControl.cs index d61909f7..f0d6ac10 100644 --- a/sources/ConsoleTools/ConsoleTools/ErasableControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ErasableControl.cs @@ -1,82 +1,82 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Provides functionality of erasing the control after it is displayed. - /// It is sometime useful for the controls that wait for an user input - /// and then must get themselves out of the way. - /// - /// - /// In order to be able to successfully erase the control, the inheritor must - /// calculate and set the of the control until the end - /// of the method. - /// - public abstract class ErasableControl : BlockControl - { - /// - /// Gets the size of the control after it was displayed. - /// Does not include the margins - /// - public Size InnerSize { get; protected set; } - - /// - /// Gets or sets a value that specifies if the control is erased from the Console - /// after it was displayed. - /// - public bool EraseAfterClose { get; set; } - - /// - /// When implemented by an inheritor it displays the content of the control to the console. - /// The inheritor must also calculate and set the proeprty. - /// - protected abstract override void DoDisplayContent(ControlDisplay display); - - /// - /// Method called at the very end, after all the control was displayed. - /// It Erases the control if requested. - /// - protected override void OnAfterDisplay() - { - if (EraseAfterClose && ControlDisplay.RowCount > 0) - EraseControl(); - - base.OnAfterDisplay(); - } - - private void EraseControl() - { - string emptyLine = new string(' ', Console.BufferWidth); - - int outerHeight = Margin.Top + ControlDisplay.RowCount + Margin.Bottom; - - Console.SetCursorPosition(0, Console.CursorTop - outerHeight); - - for (int i = 0; i < outerHeight; i++) - Console.Write(emptyLine); - - Console.SetCursorPosition(0, Console.CursorTop - outerHeight); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Provides functionality of erasing the control after it is displayed. + /// It is sometime useful for the controls that wait for an user input + /// and then must get themselves out of the way. + /// + /// + /// In order to be able to successfully erase the control, the inheritor must + /// calculate and set the of the control until the end + /// of the method. + /// + public abstract class ErasableControl : BlockControl + { + /// + /// Gets the size of the control after it was displayed. + /// Does not include the margins + /// + public Size InnerSize { get; protected set; } + + /// + /// Gets or sets a value that specifies if the control is erased from the Console + /// after it was displayed. + /// + public bool EraseAfterClose { get; set; } + + /// + /// When implemented by an inheritor it displays the content of the control to the console. + /// The inheritor must also calculate and set the property. + /// + protected abstract override void DoDisplayContent(ControlDisplay display); + + /// + /// Method called at the very end, after all the control was displayed. + /// It Erases the control if requested. + /// + protected override void OnAfterDisplay() + { + if (EraseAfterClose && ControlDisplay.RowCount > 0) + EraseControl(); + + base.OnAfterDisplay(); + } + + private void EraseControl() + { + string emptyLine = new string(' ', Console.BufferWidth); + + int outerHeight = Margin.Top + ControlDisplay.RowCount + Margin.Bottom; + + Console.SetCursorPosition(0, Console.CursorTop - outerHeight); + + for (int i = 0; i < outerHeight; i++) + Console.Write(emptyLine); + + Console.SetCursorPosition(0, Console.CursorTop - outerHeight); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/HorizontalAlignment.cs b/sources/ConsoleTools/ConsoleTools.Core/HorizontalAlignment.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/HorizontalAlignment.cs rename to sources/ConsoleTools/ConsoleTools.Core/HorizontalAlignment.cs index 1d139e54..7a970c55 100644 --- a/sources/ConsoleTools/ConsoleTools/HorizontalAlignment.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/HorizontalAlignment.cs @@ -1,54 +1,54 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Specifies the horizontal position of an element in a container. - /// - public enum HorizontalAlignment - { - /// - /// The container's default value will be used. - /// - Default, - - /// - /// The element is displayed in the left side of the container. - /// - Left, - - /// - /// The element is displayed in the center of the container. - /// - Center, - - /// - /// The element is displayed in the right side of the container. - /// - Right, - - /// - /// The element is stretched to fill the entire horizontal space. - /// - Stretch - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Specifies the horizontal position of an element in a container. + /// + public enum HorizontalAlignment + { + /// + /// The container's default value will be used. + /// + Default, + + /// + /// The element is displayed in the left side of the container. + /// + Left, + + /// + /// The element is displayed in the center of the container. + /// + Center, + + /// + /// The element is displayed in the right side of the container. + /// + Right, + + /// + /// The element is stretched to fill the entire horizontal space. + /// + Stretch + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs b/sources/ConsoleTools/ConsoleTools.Core/IRepeatableSupport.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/IRepeatableSupport.cs rename to sources/ConsoleTools/ConsoleTools.Core/IRepeatableSupport.cs diff --git a/sources/ConsoleTools/ConsoleTools/InlineControl.cs b/sources/ConsoleTools/ConsoleTools.Core/InlineControl.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InlineControl.cs rename to sources/ConsoleTools/ConsoleTools.Core/InlineControl.cs diff --git a/sources/ConsoleTools/ConsoleTools/InlineTextBlock.cs b/sources/ConsoleTools/ConsoleTools.Core/InlineTextBlock.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/InlineTextBlock.cs rename to sources/ConsoleTools/ConsoleTools.Core/InlineTextBlock.cs diff --git a/sources/ConsoleTools/ConsoleTools/Location.cs b/sources/ConsoleTools/ConsoleTools.Core/Location.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Location.cs rename to sources/ConsoleTools/ConsoleTools.Core/Location.cs index 3f9e70cb..90fb6bb3 100644 --- a/sources/ConsoleTools/ConsoleTools/Location.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Location.cs @@ -1,99 +1,99 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System.Globalization; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Represents a location in the 2D plane. - /// Immutable. - /// - public struct Location - { - /// - /// Gets the left component. - /// - public int Left { get; } - - /// - /// Gets the top component. - /// - public int Top { get; } - - /// - /// Gets the origin location: left = 0, top = 0 - /// - public static Location Origin { get; } = new Location(0, 0); - - /// - /// Gets a value that specifies if the current instance is the origin (left = 0, top = 0) - /// - public bool IsOrigin => Left == 0 && Top == 0; - - /// - /// Initializes a new instance of the structure with - /// the left and top values. - /// - /// The left component of the location. - /// The top component of the location. - public Location(int left, int top) - { - Left = left; - Top = top; - } - - /// - /// Indicates whether this instance and a specified object are equal. - /// - /// Another object to compare to. - /// true if obj and this instance are the same type and represent the same value; otherwise, false. - public override bool Equals(object obj) - { - if (!(obj is Location)) - return false; - - Location location = (Location) obj; - return location.Left == Left && location.Top == Top; - } - - /// - /// Returns the hash code for this instance. - /// - /// A 32-bit signed integer that is the hash code for this instance. - public override int GetHashCode() - { - return Left ^ Top; - } - - /// - /// Return the string representation of the current instance. - /// - /// The string representation of the current instance. - public override string ToString() - { - string widthAsString = Left.ToString(CultureInfo.CurrentCulture); - string heightAsString = Top.ToString(CultureInfo.CurrentCulture); - - return $"{{Left={widthAsString}, Top={heightAsString}}}"; - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Globalization; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Represents a location in the 2D plane. + /// Immutable. + /// + public struct Location + { + /// + /// Gets the left component. + /// + public int Left { get; } + + /// + /// Gets the top component. + /// + public int Top { get; } + + /// + /// Gets the origin location: left = 0, top = 0 + /// + public static Location Origin { get; } = new Location(0, 0); + + /// + /// Gets a value that specifies if the current instance is the origin (left = 0, top = 0) + /// + public bool IsOrigin => Left == 0 && Top == 0; + + /// + /// Initializes a new instance of the structure with + /// the left and top values. + /// + /// The left component of the location. + /// The top component of the location. + public Location(int left, int top) + { + Left = left; + Top = top; + } + + /// + /// Indicates whether this instance and a specified object are equal. + /// + /// Another object to compare to. + /// true if obj and this instance are the same type and represent the same value; otherwise, false. + public override bool Equals(object obj) + { + if (!(obj is Location)) + return false; + + Location location = (Location) obj; + return location.Left == Left && location.Top == Top; + } + + /// + /// Returns the hash code for this instance. + /// + /// A 32-bit signed integer that is the hash code for this instance. + public override int GetHashCode() + { + return Left ^ Top; + } + + /// + /// Return the string representation of the current instance. + /// + /// The string representation of the current instance. + public override string ToString() + { + string widthAsString = Left.ToString(CultureInfo.CurrentCulture); + string heightAsString = Top.ToString(CultureInfo.CurrentCulture); + + return $"{{Left={widthAsString}, Top={heightAsString}}}"; + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/LongRunningControl.cs b/sources/ConsoleTools/ConsoleTools.Core/LongRunningControl.cs similarity index 92% rename from sources/ConsoleTools/ConsoleTools/LongRunningControl.cs rename to sources/ConsoleTools/ConsoleTools.Core/LongRunningControl.cs index f5ee67a9..bcb20d9c 100644 --- a/sources/ConsoleTools/ConsoleTools/LongRunningControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/LongRunningControl.cs @@ -1,189 +1,189 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Provides base functionality for a control that continues to run after it is displayed, until it is explicitly closed. - /// - /// The provided functionality is: - /// - /// top/bottom margin, - /// optionally hides cursor while displaying, - /// optionally ensures the display of the control on a new line. - /// - /// - /// - public abstract class LongRunningControl - { - private bool initialCursorVisible; - - /// - /// Gets a value that specifies if the control is still active. - /// Active means that it will automatically refresh itself when its state is changed. - /// It become active when the method is called. - /// It is inactivated when the method is called. - /// - protected bool IsActive { get; private set; } - - /// - /// Gets or sets the number of empty lines displayed before the pause text. - /// Default value: 0 - /// - public int MarginTop { get; set; } - - /// - /// Gets or sets the number of empty lines displayed after the pause text, after the pause was ended. - /// Default value: 0 - /// - public int MarginBottom { get; set; } - - /// - /// Gets or sets a value that specifies if the cursor is visible while the control is displayed. - /// Default value: true - /// - public bool ShowCursor { get; set; } = true; - - /// - /// Gets or sets a value that specifies if the control should always be displayed at the beginning of the line. - /// If this value is true and the cursor is not at the beginning of the line, a new line is written before displaying the control. - /// - public bool EnsureBeginOfLine { get; set; } - - /// - /// Displays the control and changes its status to "running". - /// - public virtual void Display() - { - OnBeforeDisplay(); - - if (IsActive) - return; - - initialCursorVisible = Console.CursorVisible; - if (!ShowCursor) - Console.CursorVisible = false; - - MoveToNextLineIfNecessary(); - - WriteTopMargin(); - - DoDisplayContent(); - - IsActive = true; - - Refresh(); - } - - /// - /// Method called at the begining of the method, before doing anything else. - /// - protected virtual void OnBeforeDisplay() - { - } - - /// - /// Method called immediately before writting the top margin. - /// - protected virtual void OnBeforeTopMargin() - { - } - - /// - /// Method called immediately after writting the bottom margin. - /// - protected virtual void OnAfterBottomMargin() - { - } - - private void MoveToNextLineIfNecessary() - { - if (Console.CursorLeft != 0 && (EnsureBeginOfLine || MarginTop > 0)) - Console.WriteLine(); - } - - /// - /// When implemented by an inheritor it displays the content of the control to the console. - /// - protected abstract void DoDisplayContent(); - - private void WriteTopMargin() - { - OnBeforeTopMargin(); - - for (int i = 0; i < MarginTop; i++) - Console.WriteLine(); - } - - private void WriteBottomMargin() - { - for (int i = 0; i < MarginBottom; i++) - Console.WriteLine(); - - OnAfterBottomMargin(); - } - - protected void Refresh() - { - if (IsActive) - DoRefresh(); - } - - protected abstract void DoRefresh(); - - /// - /// Changes the status of the control to "not running" and ends its display. - /// - public void Close() - { - OnClosing(); - - if (!IsActive) - return; - - DoClose(); - - WriteBottomMargin(); - - if (!ShowCursor) - Console.CursorVisible = initialCursorVisible; - - IsActive = false; - - OnClosed(); - } - - protected virtual void OnClosing() - { - } - - protected abstract void DoClose(); - - /// - /// Method called at the very end of the method, before returning. - /// - protected virtual void OnClosed() - { - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Provides base functionality for a control that continues to run after it is displayed, until it is explicitly closed. + /// + /// The provided functionality is: + /// + /// top/bottom margin, + /// optionally hides cursor while displaying, + /// optionally ensures the display of the control on a new line. + /// + /// + /// + public abstract class LongRunningControl + { + private bool initialCursorVisible; + + /// + /// Gets a value that specifies if the control is still active. + /// Active means that it will automatically refresh itself when its state is changed. + /// It become active when the method is called. + /// It is inactivated when the method is called. + /// + protected bool IsActive { get; private set; } + + /// + /// Gets or sets the number of empty lines displayed before the pause text. + /// Default value: 0 + /// + public int MarginTop { get; set; } + + /// + /// Gets or sets the number of empty lines displayed after the pause text, after the pause was ended. + /// Default value: 0 + /// + public int MarginBottom { get; set; } + + /// + /// Gets or sets a value that specifies if the cursor is visible while the control is displayed. + /// Default value: true + /// + public bool ShowCursor { get; set; } = true; + + /// + /// Gets or sets a value that specifies if the control should always be displayed at the beginning of the line. + /// If this value is true and the cursor is not at the beginning of the line, a new line is written before displaying the control. + /// + public bool EnsureBeginOfLine { get; set; } + + /// + /// Displays the control and changes its status to "running". + /// + public virtual void Display() + { + OnBeforeDisplay(); + + if (IsActive) + return; + + initialCursorVisible = Console.CursorVisible; + if (!ShowCursor) + Console.CursorVisible = false; + + MoveToNextLineIfNecessary(); + + WriteTopMargin(); + + DoDisplayContent(); + + IsActive = true; + + Refresh(); + } + + /// + /// Method called at the beginning of the method, before doing anything else. + /// + protected virtual void OnBeforeDisplay() + { + } + + /// + /// Method called immediately before writing the top margin. + /// + protected virtual void OnBeforeTopMargin() + { + } + + /// + /// Method called immediately after writing the bottom margin. + /// + protected virtual void OnAfterBottomMargin() + { + } + + private void MoveToNextLineIfNecessary() + { + if (Console.CursorLeft != 0 && (EnsureBeginOfLine || MarginTop > 0)) + Console.WriteLine(); + } + + /// + /// When implemented by an inheritor it displays the content of the control to the console. + /// + protected abstract void DoDisplayContent(); + + private void WriteTopMargin() + { + OnBeforeTopMargin(); + + for (int i = 0; i < MarginTop; i++) + Console.WriteLine(); + } + + private void WriteBottomMargin() + { + for (int i = 0; i < MarginBottom; i++) + Console.WriteLine(); + + OnAfterBottomMargin(); + } + + protected void Refresh() + { + if (IsActive) + DoRefresh(); + } + + protected abstract void DoRefresh(); + + /// + /// Changes the status of the control to "not running" and ends its display. + /// + public void Close() + { + OnClosing(); + + if (!IsActive) + return; + + DoClose(); + + WriteBottomMargin(); + + if (!ShowCursor) + Console.CursorVisible = initialCursorVisible; + + IsActive = false; + + OnClosed(); + } + + protected virtual void OnClosing() + { + } + + protected abstract void DoClose(); + + /// + /// Method called at the very end of the method, before returning. + /// + protected virtual void OnClosed() + { + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/MultilineText.cs b/sources/ConsoleTools/ConsoleTools.Core/MultilineText.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/MultilineText.cs rename to sources/ConsoleTools/ConsoleTools.Core/MultilineText.cs index d2cd155f..4215972e 100644 --- a/sources/ConsoleTools/ConsoleTools/MultilineText.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/MultilineText.cs @@ -1,329 +1,329 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Represents a text on multiple lines. - /// - public class MultilineText : IEnumerable - { - /// - /// Gets the text as a single line. - /// - public string RawText { get; } - - /// - /// Gets the text split in lines. - /// - public ReadOnlyCollection Lines { get; } - - /// - /// Gets the size of the smallest rectangle in which the text will fit. - /// - public Size Size { get; } - - /// - /// Gets an instance of the containing no text. - /// - public static MultilineText Empty { get; } = new MultilineText(string.Empty); - - /// - /// Gets a value that specifies if the current instance contains no text. - /// - public bool IsEmpty => Size.IsEmpty; - - /// - /// Used only internally when splitting the string in multiple lines. - /// - private enum LineEndChar - { - None, - Cr, - Lf - } - - /// - /// Initializes a new instance of the class with - /// the an object to be displayed as text. - /// - /// - public MultilineText(object o) - : this(o.ToString()) - { - } - - /// - /// Initializes a new instance of the class with - /// the raw text. - /// - /// The text may contain line terminators: CR, LF or CRLF. - /// - public MultilineText(string text) - { - if (string.IsNullOrEmpty(text)) - { - RawText = string.Empty; - Lines = new ReadOnlyCollection(new string[0]); - Size = new Size(0, 0); - } - else - { - try - { - int width = 0; - int startLineIndex = 0; - LineEndChar lastLineEndChar = LineEndChar.None; - List lines = new List(); - - int i; - for (i = 0; i < text.Length; i++) - { - if (text[i] == '\r') - { - // A line is ended. - int lineWidth = i - startLineIndex; - lines.Add(text.Substring(startLineIndex, lineWidth)); - if (lineWidth > width) width = lineWidth; - - startLineIndex = i + 1; - lastLineEndChar = LineEndChar.Cr; - } - else if (text[i] == '\n') - { - if (i > startLineIndex || lastLineEndChar != LineEndChar.Cr) - { - // A line is ended. - int lineWidth = i - startLineIndex; - lines.Add(text.Substring(startLineIndex, lineWidth)); - if (lineWidth > width) width = lineWidth; - } - - startLineIndex = i + 1; - lastLineEndChar = LineEndChar.Lf; - } - } - - // Process the remaining text. - - { - int lineWidth = i - startLineIndex; - lines.Add(text.Substring(startLineIndex, lineWidth)); - if (lineWidth > width) width = lineWidth; - } - - RawText = text; - Lines = lines.AsReadOnly(); - Size = new Size(width, lines.Count); - } - catch (Exception ex) - { - throw new ApplicationException("Error splitting the text in multiple lines.", ex); - } - } - } - - /// - /// Initializes a new instance of the class with - /// the list of lines. - /// - public MultilineText(IEnumerable lines) - { - if (lines == null) throw new ArgumentNullException(nameof(lines)); - - List linesAsList = lines.ToList(); - - RawText = string.Join(Environment.NewLine, linesAsList); - Lines = linesAsList.AsReadOnly(); - - int width = linesAsList.Count == 0 - ? 0 - : linesAsList.Max(x => x.Length); - int height = linesAsList.Count; - Size = new Size(width, height); - } - - /// - /// Calculates the size of the text. - /// - /// The maximum width allowed. Negative value means no limit. - /// Returns a new instance of representing the size of the text. - public Size CalculateSize(int maxWidth = -1) - { - if (maxWidth < 0) - return Size; - - if (maxWidth == 0) - return Size.Empty; - - int totalWidth = 0; - int totalHeight = 0; - - foreach (string line in Lines) - { - int lineHeight = (int)Math.Ceiling((double)line.Length / maxWidth); - totalHeight += lineHeight; - - int lineWidth = Math.Min(line.Length, maxWidth); - totalWidth = Math.Max(totalWidth, lineWidth); - } - - return new Size(totalWidth, totalHeight); - } - - /// - /// Enumerates the lines. If a line is greater than , - /// the line is cut in chunks with the length of . - /// - /// The maximum width allowed. Negative value means no limit. - /// - public IEnumerable GetLines(int maxWidth = -1) - { - if (maxWidth < 0) - { - foreach (string line in Lines) - yield return line; - - yield break; - } - - if (maxWidth == 0) - yield break; - - foreach (string line in Lines) - { - int index = 0; - - while (index < line.Length) - { - int chunkLength = Math.Min(maxWidth, line.Length - index); - string chunk = line.Substring(index, chunkLength); - yield return chunk; - - index += chunkLength; - } - } - } - - /// - /// Indicates whether this instance and a specified object are equal. - /// - /// Another object to compare to. - /// true if obj and this instance are the same type and represent the same value; otherwise, false. - public override bool Equals(object obj) - { - if (obj is MultilineText multilineText) - return RawText == multilineText.RawText; - - return false; - } - - /// - /// Returns the hash code for this instance. - /// - /// A 32-bit signed integer that is the hash code for this instance. - public override int GetHashCode() - { - return RawText.GetHashCode(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - /// - /// Returns an enumerator that enumerates through the lines. - /// - public IEnumerator GetEnumerator() - { - return Lines.GetEnumerator(); - } - - /// - /// Returns a string representation of the current instance. - /// - public override string ToString() - { - return string.Join(Environment.NewLine, Lines); - } - - /// - /// Converts a simple text into a instance. - /// - /// The text to be converted. - public static implicit operator MultilineText(string text) - { - return new MultilineText(text); - } - - /// - /// Converts a instance into a simple . - /// - /// The instance to convert. - public static implicit operator string(MultilineText multilineText) - { - return multilineText.ToString(); - } - - /// - /// Converts a of into a instance. - /// - /// The list of lines to be contained by the new instance. - public static implicit operator MultilineText(List lines) - { - return new MultilineText(lines); - } - - /// - /// Converts a instance into a of . - /// - /// The instance to convert. - public static implicit operator List(MultilineText multilineText) - { - return multilineText.Lines.ToList(); - } - - /// - /// Converts a array into a instance. - /// - /// The list of lines to be contained by the new instance. - public static implicit operator MultilineText(string[] lines) - { - return new MultilineText(lines); - } - - /// - /// Converts a instance into an array of . - /// - /// The instance to convert. - public static implicit operator string[] (MultilineText multilineText) - { - return multilineText.Lines.ToArray(); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Represents a text on multiple lines. + /// + public class MultilineText : IEnumerable + { + /// + /// Gets the text as a single line. + /// + public string RawText { get; } + + /// + /// Gets the text split in lines. + /// + public ReadOnlyCollection Lines { get; } + + /// + /// Gets the size of the smallest rectangle in which the text will fit. + /// + public Size Size { get; } + + /// + /// Gets an instance of the containing no text. + /// + public static MultilineText Empty { get; } = new MultilineText(string.Empty); + + /// + /// Gets a value that specifies if the current instance contains no text. + /// + public bool IsEmpty => Size.IsEmpty; + + /// + /// Used only internally when splitting the string in multiple lines. + /// + private enum LineEndChar + { + None, + Cr, + Lf + } + + /// + /// Initializes a new instance of the class with + /// the an object to be displayed as text. + /// + /// + public MultilineText(object o) + : this(o.ToString()) + { + } + + /// + /// Initializes a new instance of the class with + /// the raw text. + /// + /// The text may contain line terminators: CR, LF or CRLF. + /// + public MultilineText(string text) + { + if (string.IsNullOrEmpty(text)) + { + RawText = string.Empty; + Lines = new ReadOnlyCollection(new string[0]); + Size = new Size(0, 0); + } + else + { + try + { + int width = 0; + int startLineIndex = 0; + LineEndChar lastLineEndChar = LineEndChar.None; + List lines = new List(); + + int i; + for (i = 0; i < text.Length; i++) + { + if (text[i] == '\r') + { + // A line is ended. + int lineWidth = i - startLineIndex; + lines.Add(text.Substring(startLineIndex, lineWidth)); + if (lineWidth > width) width = lineWidth; + + startLineIndex = i + 1; + lastLineEndChar = LineEndChar.Cr; + } + else if (text[i] == '\n') + { + if (i > startLineIndex || lastLineEndChar != LineEndChar.Cr) + { + // A line is ended. + int lineWidth = i - startLineIndex; + lines.Add(text.Substring(startLineIndex, lineWidth)); + if (lineWidth > width) width = lineWidth; + } + + startLineIndex = i + 1; + lastLineEndChar = LineEndChar.Lf; + } + } + + // Process the remaining text. + + { + int lineWidth = i - startLineIndex; + lines.Add(text.Substring(startLineIndex, lineWidth)); + if (lineWidth > width) width = lineWidth; + } + + RawText = text; + Lines = lines.AsReadOnly(); + Size = new Size(width, lines.Count); + } + catch (Exception ex) + { + throw new ApplicationException("Error splitting the text in multiple lines.", ex); + } + } + } + + /// + /// Initializes a new instance of the class with + /// the list of lines. + /// + public MultilineText(IEnumerable lines) + { + if (lines == null) throw new ArgumentNullException(nameof(lines)); + + List linesAsList = lines.ToList(); + + RawText = string.Join(Environment.NewLine, linesAsList); + Lines = linesAsList.AsReadOnly(); + + int width = linesAsList.Count == 0 + ? 0 + : linesAsList.Max(x => x.Length); + int height = linesAsList.Count; + Size = new Size(width, height); + } + + /// + /// Calculates the size of the text. + /// + /// The maximum width allowed. Negative value means no limit. + /// Returns a new instance of representing the size of the text. + public Size CalculateSize(int maxWidth = -1) + { + if (maxWidth < 0) + return Size; + + if (maxWidth == 0) + return Size.Empty; + + int totalWidth = 0; + int totalHeight = 0; + + foreach (string line in Lines) + { + int lineHeight = (int)Math.Ceiling((double)line.Length / maxWidth); + totalHeight += lineHeight; + + int lineWidth = Math.Min(line.Length, maxWidth); + totalWidth = Math.Max(totalWidth, lineWidth); + } + + return new Size(totalWidth, totalHeight); + } + + /// + /// Enumerates the lines. If a line is greater than , + /// the line is cut in chunks with the length of . + /// + /// The maximum width allowed. Negative value means no limit. + /// + public IEnumerable GetLines(int maxWidth = -1) + { + if (maxWidth < 0) + { + foreach (string line in Lines) + yield return line; + + yield break; + } + + if (maxWidth == 0) + yield break; + + foreach (string line in Lines) + { + int index = 0; + + while (index < line.Length) + { + int chunkLength = Math.Min(maxWidth, line.Length - index); + string chunk = line.Substring(index, chunkLength); + yield return chunk; + + index += chunkLength; + } + } + } + + /// + /// Indicates whether this instance and a specified object are equal. + /// + /// Another object to compare to. + /// true if obj and this instance are the same type and represent the same value; otherwise, false. + public override bool Equals(object obj) + { + if (obj is MultilineText multilineText) + return RawText == multilineText.RawText; + + return false; + } + + /// + /// Returns the hash code for this instance. + /// + /// A 32-bit signed integer that is the hash code for this instance. + public override int GetHashCode() + { + return RawText.GetHashCode(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// + /// Returns an enumerator that enumerates through the lines. + /// + public IEnumerator GetEnumerator() + { + return Lines.GetEnumerator(); + } + + /// + /// Returns a string representation of the current instance. + /// + public override string ToString() + { + return string.Join(Environment.NewLine, Lines); + } + + /// + /// Converts a simple text into a instance. + /// + /// The text to be converted. + public static implicit operator MultilineText(string text) + { + return new MultilineText(text); + } + + /// + /// Converts a instance into a simple . + /// + /// The instance to convert. + public static implicit operator string(MultilineText multilineText) + { + return multilineText.ToString(); + } + + /// + /// Converts a of into a instance. + /// + /// The list of lines to be contained by the new instance. + public static implicit operator MultilineText(List lines) + { + return new MultilineText(lines); + } + + /// + /// Converts a instance into a of . + /// + /// The instance to convert. + public static implicit operator List(MultilineText multilineText) + { + return multilineText.Lines.ToList(); + } + + /// + /// Converts a array into a instance. + /// + /// The list of lines to be contained by the new instance. + public static implicit operator MultilineText(string[] lines) + { + return new MultilineText(lines); + } + + /// + /// Converts a instance into an array of . + /// + /// The instance to convert. + public static implicit operator string[] (MultilineText multilineText) + { + return multilineText.Lines.ToArray(); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Size.cs b/sources/ConsoleTools/ConsoleTools.Core/Size.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools/Size.cs rename to sources/ConsoleTools/ConsoleTools.Core/Size.cs index 5f257184..0d1167b1 100644 --- a/sources/ConsoleTools/ConsoleTools/Size.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Size.cs @@ -1,192 +1,192 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new - -using System.Globalization; - -namespace DustInTheWind.ConsoleTools -{ - /// - /// Represents the size of a rectangle. - /// Immutable. - /// - public struct Size - { - /// - /// Gets the width component. - /// - public int Width { get; } - - /// - /// Gets the height component. - /// - public int Height { get; } - - /// - /// Gets the empty size: width = 0, height = 0 - /// - public static Size Empty { get; } = new Size(0, 0); - - /// - /// Gets a value that specifies if the current instance represents the empty size (width = 0, height = 0) - /// - public bool IsEmpty => Width == 0 && Height == 0; - - /// - /// Initializes a new instance of the structure with - /// the width and height values. - /// - /// The width component of the size. - /// The height component of the size. - public Size(int width, int height) - { - Width = width; - Height = height; - } - - /// - /// Indicates whether this instance and a specified object are equal. - /// - /// Another object to compare to. - /// true if obj and this instance are the same type and represent the same value; otherwise, false. - public override bool Equals(object obj) - { - if (!(obj is Size)) - return false; - - Size size = (Size)obj; - return size.Width == Width && size.Height == Height; - } - - /// - /// Returns the hash code for this instance. - /// - /// A 32-bit signed integer that is the hash code for this instance. - public override int GetHashCode() - { - return Width ^ Height; - } - - /// - /// Creates a new object having the and - /// incremented with the specified value. - /// - /// The value to be added to the width and height of the current instance. - /// A new object. - public Size Inflate(int value) - { - return new Size(Width + value, Height + value); - } - - /// - /// Creates a new object having its and - /// incremented with the specified values. - /// - /// The value to be added to the width of the size. - /// The value to be added to the height of the current instance. - /// A new object. - public Size Inflate(int width, int height) - { - return new Size(Width + width, Height + height); - } - - /// - /// Creates a new object having the and - /// values equal to the sum of the and values of the - /// current instance and the one specified as parameter. - /// - /// The object to be added to the current instance. - /// A new object. - public Size Inflate(Size size) - { - return new Size(Width + size.Width, Height + size.Height); - } - - /// - /// Creates a new object having only the - /// incremented with the specified value. - /// - /// The value to be added to the width of the current instance. - /// A new object. - public Size InflateWidth(int value) - { - return new Size(Width + value, Height); - } - - /// - /// Creates a new object having only the - /// incremented with the specified value. - /// - /// The value to be added to the height of the current instance. - /// A new object. - public Size InflateHeight(int value) - { - return new Size(Width, Height + value); - } - - /// - /// Return the string representation of the current instance. - /// - /// The string representation of the current instance. - public override string ToString() - { - string widthAsString = Width.ToString(CultureInfo.CurrentCulture); - string heightAsString = Height.ToString(CultureInfo.CurrentCulture); - - return $"{{Width={widthAsString}, Height={heightAsString}}}"; - } - - /// - /// Creates a new instance having the width and height equal to the sums - /// of the widths and heights of the instances received as parameters. - /// - public static Size operator +(Size size1, Size size2) - { - return new Size(size1.Width + size2.Width, size1.Height + size2.Height); - } - - /// - /// Creates a new instance having the width and height equal to the difference - /// of the widths and heights of the instances received as parameters. - /// - public static Size operator -(Size size1, Size size2) - { - return new Size(size1.Width - size2.Width, size1.Height - size2.Height); - } - - /// - /// Creates a new instance having the width and height equal to the original values - /// to which the integer value is added. - /// - public static Size operator +(Size size, int value) - { - return new Size(size.Width + value, size.Height + value); - } - - /// - /// Creates a new instance having the width and height equal to the original values - /// from which the integer value is subtracted. - /// - public static Size operator -(Size size, int value) - { - return new Size(size.Width - value, size.Height - value); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new + +using System.Globalization; + +namespace DustInTheWind.ConsoleTools +{ + /// + /// Represents the size of a rectangle. + /// Immutable. + /// + public struct Size + { + /// + /// Gets the width component. + /// + public int Width { get; } + + /// + /// Gets the height component. + /// + public int Height { get; } + + /// + /// Gets the empty size: width = 0, height = 0 + /// + public static Size Empty { get; } = new Size(0, 0); + + /// + /// Gets a value that specifies if the current instance represents the empty size (width = 0, height = 0) + /// + public bool IsEmpty => Width == 0 && Height == 0; + + /// + /// Initializes a new instance of the structure with + /// the width and height values. + /// + /// The width component of the size. + /// The height component of the size. + public Size(int width, int height) + { + Width = width; + Height = height; + } + + /// + /// Indicates whether this instance and a specified object are equal. + /// + /// Another object to compare to. + /// true if obj and this instance are the same type and represent the same value; otherwise, false. + public override bool Equals(object obj) + { + if (!(obj is Size)) + return false; + + Size size = (Size)obj; + return size.Width == Width && size.Height == Height; + } + + /// + /// Returns the hash code for this instance. + /// + /// A 32-bit signed integer that is the hash code for this instance. + public override int GetHashCode() + { + return Width ^ Height; + } + + /// + /// Creates a new object having the and + /// incremented with the specified value. + /// + /// The value to be added to the width and height of the current instance. + /// A new object. + public Size Inflate(int value) + { + return new Size(Width + value, Height + value); + } + + /// + /// Creates a new object having its and + /// incremented with the specified values. + /// + /// The value to be added to the width of the size. + /// The value to be added to the height of the current instance. + /// A new object. + public Size Inflate(int width, int height) + { + return new Size(Width + width, Height + height); + } + + /// + /// Creates a new object having the and + /// values equal to the sum of the and values of the + /// current instance and the one specified as parameter. + /// + /// The object to be added to the current instance. + /// A new object. + public Size Inflate(Size size) + { + return new Size(Width + size.Width, Height + size.Height); + } + + /// + /// Creates a new object having only the + /// incremented with the specified value. + /// + /// The value to be added to the width of the current instance. + /// A new object. + public Size InflateWidth(int value) + { + return new Size(Width + value, Height); + } + + /// + /// Creates a new object having only the + /// incremented with the specified value. + /// + /// The value to be added to the height of the current instance. + /// A new object. + public Size InflateHeight(int value) + { + return new Size(Width, Height + value); + } + + /// + /// Return the string representation of the current instance. + /// + /// The string representation of the current instance. + public override string ToString() + { + string widthAsString = Width.ToString(CultureInfo.CurrentCulture); + string heightAsString = Height.ToString(CultureInfo.CurrentCulture); + + return $"{{Width={widthAsString}, Height={heightAsString}}}"; + } + + /// + /// Creates a new instance having the width and height equal to the sums + /// of the widths and heights of the instances received as parameters. + /// + public static Size operator +(Size size1, Size size2) + { + return new Size(size1.Width + size2.Width, size1.Height + size2.Height); + } + + /// + /// Creates a new instance having the width and height equal to the difference + /// of the widths and heights of the instances received as parameters. + /// + public static Size operator -(Size size1, Size size2) + { + return new Size(size1.Width - size2.Width, size1.Height - size2.Height); + } + + /// + /// Creates a new instance having the width and height equal to the original values + /// to which the integer value is added. + /// + public static Size operator +(Size size, int value) + { + return new Size(size.Width + value, size.Height + value); + } + + /// + /// Creates a new instance having the width and height equal to the original values + /// from which the integer value is subtracted. + /// + public static Size operator -(Size size, int value) + { + return new Size(size.Width - value, size.Height - value); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Thickness.cs b/sources/ConsoleTools/ConsoleTools.Core/Thickness.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Thickness.cs rename to sources/ConsoleTools/ConsoleTools.Core/Thickness.cs diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Guard/App.config b/sources/ConsoleTools/ConsoleTools.Demo.Guard/App.config index 45437954..47c85e70 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Guard/App.config +++ b/sources/ConsoleTools/ConsoleTools.Demo.Guard/App.config @@ -1,6 +1,7 @@ + - - + + - + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Guard/ConsoleTools.Demo.GuardDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.Guard/ConsoleTools.Demo.GuardDemo.csproj index a2ada316..ebec5223 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Guard/ConsoleTools.Demo.GuardDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.Guard/ConsoleTools.Demo.GuardDemo.csproj @@ -72,9 +72,13 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs index 486eda32..adc53d3c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs @@ -41,8 +41,8 @@ private static int Main() } catch (ApplicationException) { - CustomConsole.WriteLineError("Another instace of this application is already running."); - CustomConsole.WriteLineError("Current instace will shutdown."); + CustomConsole.WriteLineError("Another instance of this application is already running."); + CustomConsole.WriteLineError("Current instance will shutdown."); Pause.QuickDisplay(); return 2; } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/CommandBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/CommandBase.cs index 56b2ec64..b47a3f8e 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/CommandBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/CommandBase.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/ConsoleTools.Demo.HorizontalLineDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/ConsoleTools.Demo.HorizontalLineDemo.csproj index bbc2d2e7..67836a18 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/ConsoleTools.Demo.HorizontalLineDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/ConsoleTools.Demo.HorizontalLineDemo.csproj @@ -80,9 +80,17 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {439c9c20-be41-4ae1-83d0-13af94114ede} + ConsoleTools.Controls.Menus + + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs index 96384444..ddcb09f6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs @@ -16,7 +16,7 @@ using System; using DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/App.config b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/App.config index 731f6de6..fb1fd830 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/App.config +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/App.config @@ -1,6 +1,7 @@ - + + - + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ExitCommand.cs index bb34a987..bd022c4b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ExitCommand.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs index a43cd6eb..da6f3601 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs index 38ce0318..2181fe6d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs index d7dec60a..280c74f4 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs @@ -16,8 +16,8 @@ using System; using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs index eb1bfb64..b7e8ccd5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs @@ -16,8 +16,8 @@ using System; using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { @@ -51,7 +51,7 @@ private static void DisplayColors(IReadOnlyList colors) private static IReadOnlyList ReadColors() { ListView colorsRead = new ListView("What are your prefered colors?"); - colorsRead.CustomParser = value => (ConsoleColor) Enum.Parse(typeof(ConsoleColor), value, true); + colorsRead.CustomParser = value => (ConsoleColor)Enum.Parse(typeof(ConsoleColor), value, true); return colorsRead.Read(); } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs index 1176fc4c..93776cb5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs @@ -16,8 +16,8 @@ using System; using System.Linq; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs index 4f30fda1..5f595e5d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs @@ -16,8 +16,8 @@ using System; using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs index 768416f4..1d37714f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs index 02205bab..8de5661a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs index d0795f1d..7111c351 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs index d7291ae8..dce3f2af 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs index f651eab2..fede7d6a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs index 3500d19b..3dede054 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs index c5c4130a..331c1f08 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs index 562197a0..76223790 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/ConsoleTools.Demo.InputControlsDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/ConsoleTools.Demo.InputControlsDemo.csproj index 6a44688d..048e2961 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/ConsoleTools.Demo.InputControlsDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/ConsoleTools.Demo.InputControlsDemo.csproj @@ -87,9 +87,17 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {439c9c20-be41-4ae1-83d0-13af94114ede} + ConsoleTools.Controls.Menus + + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs index cb77071c..9e0b3223 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs @@ -15,9 +15,9 @@ // along with this program. If not, see . using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Menus.MenuItems; using DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Menues.MenuItems; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs index 77d15be4..1490dd46 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs @@ -24,8 +24,8 @@ internal static class Program private static void Main() { - Console.SetBufferSize(80, 1024); Console.SetWindowSize(80, 60); + Console.SetBufferSize(80, 1024); DisplayApplicationHeader(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Musical/App.config b/sources/ConsoleTools/ConsoleTools.Demo.Musical/App.config index 45437954..47c85e70 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Musical/App.config +++ b/sources/ConsoleTools/ConsoleTools.Demo.Musical/App.config @@ -1,6 +1,7 @@ + - - + + - + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Musical/ConsoleTools.Demo.Musical.csproj b/sources/ConsoleTools/ConsoleTools.Demo.Musical/ConsoleTools.Demo.Musical.csproj index 2828d5a2..0e766a9c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Musical/ConsoleTools.Demo.Musical.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.Musical/ConsoleTools.Demo.Musical.csproj @@ -72,9 +72,13 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/App.config b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/App.config index 731f6de6..fb1fd830 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/App.config +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/App.config @@ -1,6 +1,7 @@ - + + - + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/CommandBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/CommandBase.cs index 10e61728..8dc619cd 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/CommandBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/CommandBase.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.PauseDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ConsoleTools.Demo.PauseDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ConsoleTools.Demo.PauseDemo.csproj index 6e0c769c..2a9ff9ec 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ConsoleTools.Demo.PauseDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ConsoleTools.Demo.PauseDemo.csproj @@ -81,9 +81,17 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {439c9c20-be41-4ae1-83d0-13af94114ede} + ConsoleTools.Controls.Menus + + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs index f71bf754..90913503 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.PauseDemo { @@ -52,7 +52,7 @@ private static void RunDemos() new ErasablePauseCommand(), new CustomMarginsCommand(), new CustomPaddingsCommand(), - new ForegroundColorCommand(), + new ForegroundColorCommand(), new BackgroundColorCommand() }; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/ConsoleTools.Demo.ProgressBarDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/ConsoleTools.Demo.ProgressBarDemo.csproj index dd540b07..6fe5f4f6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/ConsoleTools.Demo.ProgressBarDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/ConsoleTools.Demo.ProgressBarDemo.csproj @@ -76,9 +76,17 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {3c2b6dd0-cf97-4ea7-8565-a338892c0643} + ConsoleTools.Controls.Spinners + + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs index 0a96079b..69f9f8a5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs @@ -16,9 +16,8 @@ using System; using System.ComponentModel; +using DustInTheWind.ConsoleTools.Controls.Spinners; using DustInTheWind.ConsoleTools.Demo.ProgressBarDemo.BusinessLayer; -using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Spinners; namespace DustInTheWind.ConsoleTools.Demo.ProgressBarDemo.PresentationLayer { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/App.config b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/App.config index 731f6de6..fb1fd830 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/App.config +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/App.config @@ -1,6 +1,7 @@ - + + - + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs index 53a4b3e7..2babdd0b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using DustInTheWind.ConsoleTools.CommandLine; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.PrompterDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs index 4906aa1c..0f3e7892 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using DustInTheWind.ConsoleTools.CommandLine; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.PrompterDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs index c1e052d8..c8e8b737 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs @@ -16,8 +16,8 @@ using System; using DustInTheWind.ConsoleTools.CommandLine; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.InputControls; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.PrompterDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/WhaleCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/WhaleCommand.cs index 367776c3..77c36ec0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/WhaleCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/WhaleCommand.cs @@ -16,9 +16,9 @@ using System.Collections.Generic; using DustInTheWind.ConsoleTools.CommandLine; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; using DustInTheWind.ConsoleTools.Demo.PrompterDemo.Ocean; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; namespace DustInTheWind.ConsoleTools.Demo.PrompterDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/ConsoleTools.Demo.PrompterDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/ConsoleTools.Demo.PrompterDemo.csproj index c26ab50e..f296e681 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/ConsoleTools.Demo.PrompterDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/ConsoleTools.Demo.PrompterDemo.csproj @@ -78,13 +78,21 @@ - - {1378eec9-98b1-41ee-bf7e-b7ff7d3f9932} - ConsoleTools.Tables + + {439c9c20-be41-4ae1-83d0-13af94114ede} + ConsoleTools.Controls.Menus - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core + + + {08C40188-94F1-47EE-AAAA-08A372BCA026} + ConsoleTools.Controls.Tables diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/OceanPrompter.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/OceanPrompter.cs index 097fee22..da49d307 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/OceanPrompter.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/OceanPrompter.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.Demo.PrompterDemo.Commands; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.PrompterDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/CreditsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/CreditsCommand.cs index 58ee1ba6..71fbd6cd 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/CreditsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/CreditsCommand.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.ScrollMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/ExitCommand.cs index ed4d2ec5..83ebcbc0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/ExitCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.ScrollMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/LoadGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/LoadGameCommand.cs index d3fbd198..e386c102 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/LoadGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/LoadGameCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.ScrollMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/NewGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/NewGameCommand.cs index 62a2027c..a28bf108 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/NewGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/NewGameCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.ScrollMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SaveGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SaveGameCommand.cs index bb6a3e6d..3badd77f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SaveGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SaveGameCommand.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.ScrollMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SettingsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SettingsCommand.cs index 2750cbdc..61bb6c4a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SettingsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Commands/SettingsCommand.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.ScrollMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/ConsoleTools.Demo.ScrollMenuDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/ConsoleTools.Demo.ScrollMenuDemo.csproj index 67a60880..07394276 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/ConsoleTools.Demo.ScrollMenuDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/ConsoleTools.Demo.ScrollMenuDemo.csproj @@ -81,9 +81,17 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {439c9c20-be41-4ae1-83d0-13af94114ede} + ConsoleTools.Controls.Menus + + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/MainMenu.cs index 270b3504..a0dbd386 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/MainMenu.cs @@ -16,9 +16,9 @@ using System; using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Menus.MenuItems; using DustInTheWind.ConsoleTools.Demo.ScrollMenuDemo.Commands; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Menues.MenuItems; namespace DustInTheWind.ConsoleTools.Demo.ScrollMenuDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BoomerangCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BoomerangCommand.cs index fc8dafae..d29158d5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BoomerangCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BoomerangCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BubbleCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BubbleCommand.cs index d39e25ae..68fb3d62 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BubbleCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/BubbleCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/ExitCommand.cs index e8720283..9d98ce5b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/ExitCommand.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FanCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FanCommand.cs index 8f0f5551..04bd3b0b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FanCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FanCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillBlock10Command.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillBlock10Command.cs index a1f41a8f..074d7e1a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillBlock10Command.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillBlock10Command.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromEndCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromEndCommand.cs index 89d4290b..573273e6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromEndCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromEndCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromStartCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromStartCommand.cs index 33258863..897a2152 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromStartCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillEmptyFromStartCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillSuddenEmptyCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillSuddenEmptyCommand.cs index 2d462d27..b03a5071 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillSuddenEmptyCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillSuddenEmptyCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillWithBordersCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillWithBordersCommand.cs index 09feb5b1..2c561c31 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillWithBordersCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/FillWithBordersCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalfBlockVerticalCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalfBlockVerticalCommand.cs index f7c8f86f..e51e7e53 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalfBlockVerticalCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalfBlockVerticalCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalhBlockSpinCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalhBlockSpinCommand.cs index 0cbc1e1c..1505e939 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalhBlockSpinCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/HalhBlockSpinCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/StickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/StickCommand.cs index 797748d6..cfdb1809 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/StickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Commands/StickCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.Spinners.Templates; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Spinners.Templates; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/ConsoleTools.Demo.SpinnerDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/ConsoleTools.Demo.SpinnerDemo.csproj index 956f4af2..0e0e5566 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/ConsoleTools.Demo.SpinnerDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/ConsoleTools.Demo.SpinnerDemo.csproj @@ -59,12 +59,6 @@ - - - - - - @@ -91,9 +85,21 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {439c9c20-be41-4ae1-83d0-13af94114ede} + ConsoleTools.Controls.Menus + + + {3c2b6dd0-cf97-4ea7-8565-a338892c0643} + ConsoleTools.Controls.Spinners + + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/MainMenu.cs index 2a527e61..559fa589 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/MainMenu.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.Demo.SpinnerDemo.Commands; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs index 409d4ba2..c774d6e9 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs @@ -14,8 +14,6 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Spinners; - namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo { /// diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs index aba39db0..44761c8a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Worker.cs @@ -16,7 +16,7 @@ using System; using System.Threading; -using DustInTheWind.ConsoleTools.Spinners; +using DustInTheWind.ConsoleTools.Controls.Spinners; namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs index 06f85a22..f938b1ca 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs index 51bd5d1c..40808386 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs @@ -1,6 +1,6 @@ using System; -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs index d1645eaf..6844547b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DrawLinesBetweenRowsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DrawLinesBetweenRowsCommand.cs index 2fcf193f..80a5b2bf 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DrawLinesBetweenRowsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DrawLinesBetweenRowsCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { @@ -27,7 +27,7 @@ public void Execute() { DataGrid dataGrid = new DataGrid("DisplayBorderBetweenRows = true"); dataGrid.Rows.Add("This is a multiline row:\nline one\nline two\nline three", "1"); - dataGrid.Rows.Add("And this is another\nmuiltiline row", "2"); + dataGrid.Rows.Add("And this is another\nmultiline row", "2"); dataGrid.DisplayBorderBetweenRows = true; dataGrid.Display(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ExitDemoCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ExitDemoCommand.cs index d677c095..5c716c3a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ExitDemoCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ExitDemoCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/LongShortTitleCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/LongShortTitleCommand.cs index 8bd2c7dc..4238154e 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/LongShortTitleCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/LongShortTitleCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineCellCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineCellCommand.cs index a1d73545..702335f2 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineCellCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineCellCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { @@ -27,8 +27,8 @@ public void Execute() { DataGrid dataGrid = new DataGrid("Multiline Cell Content"); - dataGrid.Rows.Add("You may write also the\rcontent of the table\non muiltiple lines", "1"); - dataGrid.Rows.Add("And this is another\nmuiltiline row", "2"); + dataGrid.Rows.Add("You may write also the\rcontent of the table\non multiple lines", "1"); + dataGrid.Rows.Add("And this is another\nmultiline row", "2"); dataGrid.Display(); } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineTitleCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineTitleCommand.cs index 327e6d0b..d7c8fbd3 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineTitleCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/MultilineTitleCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs index 2aa1f0e5..f5d28e10 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs index a528eabb..5f85b514 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Menus; +using DustInTheWind.ConsoleTools.Controls.Tables; namespace DustInTheWind.ConsoleTools.Demo.TabularData.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/ConsoleTools.Demo.TabularData.csproj b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/ConsoleTools.Demo.TabularData.csproj index 67a2e791..643b65d9 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/ConsoleTools.Demo.TabularData.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/ConsoleTools.Demo.TabularData.csproj @@ -60,12 +60,6 @@ - - - - - - @@ -90,13 +84,21 @@ - - {1378eec9-98b1-41ee-bf7e-b7ff7d3f9932} - ConsoleTools.Tables + + {439C9C20-BE41-4AE1-83D0-13AF94114EDE} + ConsoleTools.Controls.Menus - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {08c40188-94f1-47ee-aaaa-08a372bca026} + ConsoleTools.Controls.Tables + + + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB} + ConsoleTools.Controls + + + {975D695D-1FD2-446F-BD7C-0F7839C1559D} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/MainMenu.cs index 0625e6fe..c7a72f65 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/MainMenu.cs @@ -16,8 +16,8 @@ using System; using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.Demo.TabularData.Commands; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.TabularData { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs index a279f9f1..2a2febc9 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ConsoleTools.Demo.TextBlockDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ConsoleTools.Demo.TextBlockDemo.csproj index 12b6f034..567f212d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ConsoleTools.Demo.TextBlockDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ConsoleTools.Demo.TextBlockDemo.csproj @@ -85,9 +85,17 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {439c9c20-be41-4ae1-83d0-13af94114ede} + ConsoleTools.Controls.Menus + + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs index 6bac2154..d9f013fd 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs @@ -16,7 +16,7 @@ using System; using DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/App.config b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/App.config index 731f6de6..fb1fd830 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/App.config +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/App.config @@ -1,6 +1,7 @@ - + + - + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CloseGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CloseGameCommand.cs index 57788a05..9f4dc904 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CloseGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CloseGameCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CreditsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CreditsCommand.cs index 40a10af1..45afdb5d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CreditsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/CreditsCommand.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/ExitCommand.cs index 94e5e625..34a0332c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/ExitCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/LoadGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/LoadGameCommand.cs index ada8efb7..c0167a11 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/LoadGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/LoadGameCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/NewGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/NewGameCommand.cs index c2d6f556..9f538b92 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/NewGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/NewGameCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SaveGameCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SaveGameCommand.cs index f5ed5c87..c741cd46 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SaveGameCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SaveGameCommand.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SettingsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SettingsCommand.cs index 527bbf1d..5a6bc628 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SettingsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Commands/SettingsCommand.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Menues; +using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextMenuDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/ConsoleTools.Demo.TextMenuDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/ConsoleTools.Demo.TextMenuDemo.csproj index 72f800e6..0dfa59e2 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/ConsoleTools.Demo.TextMenuDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/ConsoleTools.Demo.TextMenuDemo.csproj @@ -82,9 +82,17 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {439c9c20-be41-4ae1-83d0-13af94114ede} + ConsoleTools.Controls.Menus + + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls + + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/MainMenu.cs index d7994ab0..00943b5b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/MainMenu.cs @@ -16,8 +16,8 @@ using System; using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.Demo.TextMenuDemo.Commands; -using DustInTheWind.ConsoleTools.Menues; namespace DustInTheWind.ConsoleTools.Demo.TextMenuDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/ConsoleTools.Demo.WriteText.csproj b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/ConsoleTools.Demo.WriteText.csproj index e1280df8..2a8e3a23 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/ConsoleTools.Demo.WriteText.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/ConsoleTools.Demo.WriteText.csproj @@ -71,9 +71,13 @@ - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB} + ConsoleTools.Controls + + + {975D695D-1FD2-446F-BD7C-0F7839C1559D} + ConsoleTools.Core diff --git a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs index 63da7268..df5fe5b5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs @@ -24,8 +24,9 @@ private static void Main() { DisplayApplicationHeader(); + Console.SetWindowSize(80, 24); Console.SetBufferSize(80, 1024); - + try { CustomConsole.WriteLine(); @@ -56,7 +57,7 @@ private static void Main() private static void RunAlignmentExample() { CustomConsole.WriteLine(HorizontalAlignment.Left, "This is a text aligned to left."); - CustomConsole.WriteLine(HorizontalAlignment.Left, "This is anoter text aligned to left."); + CustomConsole.WriteLine(HorizontalAlignment.Left, "This is another text aligned to left."); CustomConsole.WriteLine(); CustomConsole.WriteLine(HorizontalAlignment.Center, "This is a text aligned to center."); CustomConsole.WriteLine(HorizontalAlignment.Center, "This is another text aligned to center."); @@ -77,7 +78,7 @@ private static void RunColorExample() CustomConsole.WriteLine(); CustomConsole.WriteLineWarning("Warning: But I have to warn you about the consequences of something not being done correctly."); CustomConsole.WriteLine(); - CustomConsole.WriteLineError("Error: If some error occures and the application will crush with an exception, I will display it on the screen immediately."); + CustomConsole.WriteLineError("Error: If some error occurred and the application will crush with an exception, I will display it on the screen immediately."); throw new Exception("Some demo exception occured."); } diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs index 74f68790..55fdae34 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs @@ -23,9 +23,9 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using DustInTheWind.ConsoleTools.Controls.Spinners; using DustInTheWind.ConsoleTools.Mvc.UseCases; using DustInTheWind.ConsoleTools.Mvc.UserControls; -using DustInTheWind.ConsoleTools.Spinners; namespace DustInTheWind.ConsoleTools.Mvc { diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj index 830615eb..e0312adf 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj @@ -13,6 +13,8 @@ + + diff --git a/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj b/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj deleted file mode 100644 index 32f76a34..00000000 --- a/sources/ConsoleTools/ConsoleTools.Tables/ConsoleTools.Tables.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netcoreapp2.2;net45 - DustInTheWind.ConsoleTools.TabularData - DustInTheWind.ConsoleTools.Tables - - - - - - - diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj index d2d9c894..9cf5bb47 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj @@ -86,7 +86,6 @@ True - ..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll @@ -180,13 +179,25 @@ - - {08c40188-94f1-47ee-aaaa-08a372bca026} - ConsoleTools.Tables + + {439c9c20-be41-4ae1-83d0-13af94114ede} + ConsoleTools.Controls.Menus + + + {3c2b6dd0-cf97-4ea7-8565-a338892c0643} + ConsoleTools.Controls.Spinners + + + {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} + ConsoleTools.Controls - - {e43718e9-3b14-4fcb-b47e-34460e817824} - ConsoleTools + + {975d695d-1fd2-446f-bd7c-0f7839c1559d} + ConsoleTools.Core + + + {08c40188-94f1-47ee-aaaa-08a372bca026} + ConsoleTools.Controls.Tables diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs index 596bcc2c..19a3a119 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs @@ -15,7 +15,6 @@ // along with this program. If not, see . using Moq; -using Moq.Protected; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.ControlLayoutTests @@ -32,7 +31,7 @@ public void HorizontalAlignment_is_null__returns_AvailableWidth_without_Margins_ ControlLayout controlLayout = new ControlLayout { - Control = control.Object, + Control = control.Object, AvailableWidth = 100 }; controlLayout.Calculate(); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs index 6c01f69a..c5b81b1d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs @@ -35,7 +35,7 @@ public void HorizontalAlignment_is_null_DesiredContentWidth_is_not_specified__re AvailableWidth = 100 }; controlLayout.Calculate(); - + int actual = controlLayout.ActualContentWidth; Assert.That(actual, Is.EqualTo(66)); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs index 36c8bed6..9697bbff 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs @@ -33,7 +33,7 @@ public void HorizontalAlignment_is_null__call_ActualFullWidth__returns_Available AvailableWidth = 100 }; controlLayout.Calculate(); - + int actual = controlLayout.ActualFullWidth; Assert.That(actual, Is.EqualTo(100)); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs index 6a5a79a8..357bf930 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs @@ -34,7 +34,7 @@ public void HorizontalAlignment_is_null__call_ActualWidth__returns_AvailableWidt AvailableWidth = 100 }; controlLayout.Calculate(); - + int actual = controlLayout.ActualWidth; Assert.That(actual, Is.EqualTo(80)); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/CustomAssert.cs b/sources/ConsoleTools/ConsoleTools.Tests/CustomAssert.cs index 50132bc0..f41fa00d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/CustomAssert.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/CustomAssert.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs index e3d08f46..04827ed2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Spinners; +using DustInTheWind.ConsoleTools.Controls.Spinners; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.Spinners.ProgressBarTests @@ -48,10 +48,7 @@ public void MinValue_is_10_set_MaxValue_to_8_throws() { ProgressBar progressBar = new ProgressBar { MinValue = 10 }; - Assert.Throws(() => - { - progressBar.MaxValue = 8; - }); + Assert.Throws(() => { progressBar.MaxValue = 8; }); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs index 0a9d4cea..b3de3217 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Spinners; +using DustInTheWind.ConsoleTools.Controls.Spinners; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.Spinners.ProgressBarTests @@ -48,10 +48,7 @@ public void MaxValue_is_10_set_MinValue_to_12_throws() { ProgressBar progressBar = new ProgressBar { MaxValue = 10 }; - Assert.Throws(() => - { - progressBar.MinValue = 12; - }); + Assert.Throws(() => { progressBar.MinValue = 12; }); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs index af0c4cc7..6f8b3c4b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs @@ -20,7 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Collections.Generic; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.BorderTemplateTests @@ -103,7 +103,7 @@ public void two_columns_with_length_5_and_5_List() { BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - string actual = borderTemplate.GenerateBottomBorder(new List { 5, 5}); + string actual = borderTemplate.GenerateBottomBorder(new List { 5, 5 }); Assert.That(actual, Is.EqualTo("└─────┴─────┘")); } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs index a7faa2d2..dbfa112f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs @@ -20,7 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Collections.Generic; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.BorderTemplateTests @@ -98,4 +98,4 @@ public void two_columns_with_length_5_and_5_List() Assert.That(actual, Is.EqualTo("├─────┼─────┤")); } } -} +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs index ca317b4b..16df6022 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs @@ -20,7 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Collections.Generic; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.BorderTemplateTests @@ -152,4 +152,4 @@ public void one_top_cell_greater_than_one_bottom_cell() Assert.That(actual, Is.EqualTo("├──┬───┘")); } } -} +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs index 5658d228..de3cb16e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs @@ -20,7 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Collections.Generic; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.BorderTemplateTests @@ -108,4 +108,4 @@ public void two_columns_with_length_5_and_5_List() Assert.That(actual, Is.EqualTo("┌─────┬─────┐")); } } -} +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs index 2c30b92e..e8ce1c0e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs index dcb0e8df..a1f9b053 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs index cdf56b48..0ee8d2f6 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs index 4b5c60af..58e01f75 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs index 73801c9f..82adf7db 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs index 33df3888..51cf5bbb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs index 1e15f4f7..26b8d9e9 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs index 6f0b05ca..7a65e407 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs @@ -16,7 +16,7 @@ using System.Collections.Generic; using System.Linq; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs index 61943850..1a026ced 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs @@ -20,7 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Data; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromDataTable diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs index 0b992fbb..16e956e1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs @@ -21,7 +21,7 @@ using System; using System.Data; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromDataTable diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs index 452fe2f5..3833da6b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs @@ -20,7 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Data; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromDataTable diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs index 9e112802..fbbd839a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs @@ -20,7 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Collections.Generic; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromList diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs index fb5fb230..c54fa78e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs @@ -20,7 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Collections.Generic; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromList @@ -66,7 +66,7 @@ public void first_cell_contains_the_value_of_first_property() { List data = new List { - new CustomClass {Number = 4, Text = "bla"} + new CustomClass { Number = 4, Text = "bla" } }; DataGrid actual = DataGrid.BuildFrom(data); @@ -79,7 +79,7 @@ public void second_cell_contains_the_value_of_second_property() { List data = new List { - new CustomClass {Number = 4, Text = "bla"} + new CustomClass { Number = 4, Text = "bla" } }; DataGrid actual = DataGrid.BuildFrom(data); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs index 9017c3a0..89f135a6 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs @@ -20,7 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Collections.Generic; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromList diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs index bdb8a82a..b5ffd515 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs index 5c8b0e83..4f1fd38d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs index 2f527578..06ae868d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs index 752256b0..ffde2980 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs index 38b35099..1736fceb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs index eccb9092..9c517f45 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs index 76314aff..eed72a26 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs index 472238d2..96ff5130 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs index ec6779d1..e197a03e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs index 01b71135..8c0b5cd2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs index 7c643d2e..9ae69b00 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs index 1c31723c..1c7d3b62 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs index 7df6768e..bf8fe445 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs index 8b3b67be..5910d90d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs index 984e38f4..d96a3283 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System.Collections.Generic; -using DustInTheWind.ConsoleTools.TabularData; +using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/packages.config b/sources/ConsoleTools/ConsoleTools.Tests/packages.config index 7fbc213b..44469687 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/packages.config +++ b/sources/ConsoleTools/ConsoleTools.Tests/packages.config @@ -1,8 +1,9 @@  + - - - - - + + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index 866c4c96..54e913f9 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -35,13 +35,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.TextMenuD EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.WriteText", "ConsoleTools.Demo.WriteText\ConsoleTools.Demo.WriteText.csproj", "{8DD165BA-78C3-48A0-BF61-9673458A260C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Tables", "ConsoleTools.Tables\ConsoleTools.Tables.csproj", "{08C40188-94F1-47EE-AAAA-08A372BCA026}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Controls.Tables", "ConsoleTools.Controls.Tables\ConsoleTools.Controls.Tables.csproj", "{08C40188-94F1-47EE-AAAA-08A372BCA026}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Cli", "ConsoleTools.Mvc\ConsoleTools.Cli.csproj", "{34D944CA-0276-4412-8387-58414E2F5631}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Core", "ConsoleTools.Core\ConsoleTools.Core.csproj", "{975D695D-1FD2-446F-BD7C-0F7839C1559D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Core", "ConsoleTools.Core\ConsoleTools.Core.csproj", "{975D695D-1FD2-446F-BD7C-0F7839C1559D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Controls", "ConsoleTools.Controls\ConsoleTools.Controls.csproj", "{94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Controls", "ConsoleTools.Controls\ConsoleTools.Controls.csproj", "{94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Controls.Spinners", "ConsoleTools.Controls.Spinners\ConsoleTools.Controls.Spinners.csproj", "{3C2B6DD0-CF97-4EA7-8565-A338892C0643}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Controls.Menus", "ConsoleTools.Controls.Menus\ConsoleTools.Controls.Menus.csproj", "{439C9C20-BE41-4AE1-83D0-13AF94114EDE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -281,6 +285,30 @@ Global {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Release-Net452|Any CPU.Build.0 = Release|Any CPU {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU {94A81B0E-6565-4BA1-A6CD-D55E7847D5FB}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Debug-Net452|Any CPU.ActiveCfg = Debug|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Debug-Net452|Any CPU.Build.0 = Debug|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Debug-Net461|Any CPU.ActiveCfg = Debug|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Debug-Net461|Any CPU.Build.0 = Debug|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Release|Any CPU.Build.0 = Release|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Release-Net452|Any CPU.ActiveCfg = Release|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Release-Net452|Any CPU.Build.0 = Release|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {3C2B6DD0-CF97-4EA7-8565-A338892C0643}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Debug-Net452|Any CPU.ActiveCfg = Debug|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Debug-Net452|Any CPU.Build.0 = Debug|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Debug-Net461|Any CPU.ActiveCfg = Debug|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Debug-Net461|Any CPU.Build.0 = Debug|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Release|Any CPU.Build.0 = Release|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Release-Net452|Any CPU.ActiveCfg = Release|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Release-Net452|Any CPU.Build.0 = Release|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Release-Net461|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj b/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj index d6f32650..76382fca 100644 --- a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj +++ b/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj @@ -12,6 +12,14 @@ true + + bin\Release\netcoreapp2.2\DustInTheWind.ConsoleTools.xml + + + + bin\Debug\netcoreapp2.2\DustInTheWind.ConsoleTools.xml + + @@ -23,63 +31,8 @@ - - ListInputResources.resx - True - True - - - ValueInputResources.resx - True - True - - - YesNoQuestionResources.resx - True - True - - - TextMenuResources.resx - True - True - - - PauseResources.resx - True - True - - - SpinnerResources.resx - True - True - - - - - - ListInputResources.Designer.cs - ResXFileCodeGenerator - - - ValueInputResources.Designer.cs - ResXFileCodeGenerator - - - YesNoQuestionResources.Designer.cs - ResXFileCodeGenerator - - - TextMenuResources.Designer.cs - ResXFileCodeGenerator - - - PauseResources.Designer.cs - ResXFileCodeGenerator - - - SpinnerResources.Designer.cs - ResXFileCodeGenerator - + + From 6f14fdbe913852bac535e23ea3180cb38f79f8f8 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 8 Mar 2020 13:05:58 +0200 Subject: [PATCH 17/57] updated namespaces. removed the empty ConsoleTools project. --- sources/ConsoleTools/AssemblyInfo.Shared.cs | 2 +- .../ApplicationHeader.cs | 2 +- .../ConsoleTools.Controls.csproj | 4 +- .../ConsoleTools.Controls/ControlRepeater.cs | 2 +- .../ConsoleTools.Controls/HorizontalLine.cs | 2 +- .../InputControls/DoubleListView.cs | 2 +- .../InputControls/DoubleView.cs | 2 +- .../InputControls/FloatListView.cs | 2 +- .../InputControls/FloatView.cs | 2 +- .../InputControls/Int32ListView.cs | 2 +- .../InputControls/Int32View.cs | 2 +- .../InputControls/Int64ListView.cs | 2 +- .../InputControls/Int64View.cs | 2 +- .../ListInputResources.Designer.cs | 4 +- .../InputControls/ListView.cs | 2 +- .../InputControls/ReadWriteMode.cs | 2 +- .../InputControls/StringListView.cs | 2 +- .../InputControls/StringView.cs | 2 +- .../ValueInputResources.Designer.cs | 4 +- .../InputControls/ValueView.cs | 2 +- .../InputControls/YesNoAnswer.cs | 2 +- .../InputControls/YesNoQuestion.cs | 2 +- .../YesNoQuestionResources.Designer.cs | 4 +- .../ConsoleTools.Controls/Label.cs | 2 +- .../MachineLevelGuardian.cs | 2 +- .../Musical/MusicalNote.cs | 2 +- .../Musical/MusicalNoteInfo.cs | 2 +- .../ConsoleTools.Controls/Musical/Sound.cs | 2 +- .../ConsoleTools.Controls/Pause.cs | 2 +- .../PauseResources.Designer.cs | 4 +- .../ConsoleTools.Controls/TextBlock.cs | 2 +- .../ConsoleTools.Controls/ThreeStageFile.cs | 2 +- .../TitleDisplayEventArgs.cs | 2 +- .../ConsoleWrapper/ConsoleX.cs | 0 .../Properties/AssemblyInfo.cs | 7 +- .../Themes/DefaultColorTheme.cs | 0 .../Themes/DefaultTextType.cs | 0 .../Themes/IColorTheme.cs | 0 .../Themes/TextType.cs | 0 .../ConsoleTools.Demo.Guard/Program.cs | 2 +- .../Commands/AlignedCenterCommand.cs | 2 + .../Commands/AlignedRightCommand.cs | 2 + .../Commands/CustomBackgroundColorCommand.cs | 1 + .../Commands/CustomCharCommand.cs | 2 + .../Commands/CustomForegroundColorCommand.cs | 1 + .../Commands/CustomMarginCommand.cs | 1 + .../Commands/CustomPaddingCommand.cs | 1 + .../Commands/CustomWidthCommand.cs | 2 + .../Commands/DefaultCommand.cs | 2 + .../Program.cs | 1 + .../Commands/ListReadNumbersCommand.cs | 2 +- .../Commands/ListReadQuickCommand.cs | 2 +- .../Commands/ListReadStringsCommand.cs | 3 +- .../ListReadWithCustomParserCommand.cs | 2 +- .../Commands/ListWriteCommand.cs | 3 +- .../Commands/ListWriteQuickCommand.cs | 2 +- .../Commands/ValueReadCommand.cs | 2 +- .../Commands/ValueReadNumberCommand.cs | 2 +- .../Commands/ValueReadQuickCommand.cs | 2 +- .../ValueReadWithDefaultValueCommand.cs | 2 +- .../Commands/ValueWriteCommand.cs | 2 +- .../Commands/ValueWriteQuickCommand.cs | 2 +- .../Commands/YesNoCancelCommand.cs | 2 +- .../Commands/YesNoCommand.cs | 2 +- .../Program.cs | 1 + .../ConsoleTools.Demo.Musical/Program.cs | 3 +- .../ApplicationHeader.cs | 1 + .../Commands/BackgroundColorCommand.cs | 1 + .../Commands/CustomMarginsCommand.cs | 1 + .../Commands/CustomPaddingsCommand.cs | 1 + .../Commands/CustomUnlockKeyCommand.cs | 1 + .../Commands/DefaultCommand.cs | 2 + .../Commands/ErasablePauseCommand.cs | 2 + .../Commands/ForegroundColorCommand.cs | 1 + .../ConsoleTools.Demo.PauseDemo/Program.cs | 1 + .../PresentationLayer/DataProcessingView.cs | 1 + .../Program.cs | 1 + .../Commands/ExitCommand.cs | 2 +- .../Commands/PrompterCommand.cs | 2 +- .../ConsoleTools.Demo.PrompterDemo/Program.cs | 2 + .../Program.cs | 1 + .../ConsoleTools.Demo.SpinnerDemo/Program.cs | 3 + .../DemoApplication.cs | 2 + .../ApplicationHeader.cs | 1 + .../CommandBase.cs | 1 + .../Commands/BackgroundColorCommand.cs | 1 + .../Commands/DefaultCommand.cs | 2 + .../Commands/ForegroundColorCommand.cs | 1 + .../HorizontalAlignmentCenterCommand.cs | 1 + .../HorizontalAlignmentRightCommand.cs | 1 + .../Commands/MarginsCommand.cs | 1 + .../Commands/MaxWidthCommand.cs | 1 + .../Commands/MinWidthCommand.cs | 1 + .../Commands/MultipleLongLinesCommand.cs | 2 + .../Commands/MultipleShortLinesCommand.cs | 2 + .../Commands/PaddingsCommand.cs | 1 + .../Commands/SingleLongLineCommand.cs | 2 + .../Commands/WidthCommand.cs | 1 + .../Program.cs | 1 + .../ConsoleTools.Demo.TextMenuDemo/Program.cs | 1 + .../ConsoleTools.Demo.WriteText/Program.cs | 1 + .../ConsoleApplicationBase.cs | 1 + .../ConsoleTools.Mvc/ConsoleTools.Cli.csproj | 1 - .../ConsoleTools.Tests.csproj | 236 ++---------------- .../TextBlockTests/TextBlockTests.cs | 1 + sources/ConsoleTools/ConsoleTools.sln | 38 +-- .../ConsoleTools/ConsoleTools.csproj | 38 --- 107 files changed, 160 insertions(+), 336 deletions(-) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/ConsoleWrapper/ConsoleX.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Properties/AssemblyInfo.cs (89%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Themes/DefaultColorTheme.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Themes/DefaultTextType.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Themes/IColorTheme.cs (100%) rename sources/ConsoleTools/{ConsoleTools => ConsoleTools.Core}/Themes/TextType.cs (100%) delete mode 100644 sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj diff --git a/sources/ConsoleTools/AssemblyInfo.Shared.cs b/sources/ConsoleTools/AssemblyInfo.Shared.cs index 91876d5a..b18522ae 100644 --- a/sources/ConsoleTools/AssemblyInfo.Shared.cs +++ b/sources/ConsoleTools/AssemblyInfo.Shared.cs @@ -26,7 +26,7 @@ // associated with an assembly. [assembly: AssemblyCompany("Dust in the Wind")] [assembly: AssemblyProduct("Console Tools")] -[assembly: AssemblyCopyright("Copyright © Dust in the Wind 2017-2018")] +[assembly: AssemblyCopyright("Copyright © Dust in the Wind 2017-2020")] [assembly: AssemblyTrademark("")] // Version information for an assembly consists of the following four values: diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs index 2b435562..b4ed1bda 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs @@ -23,7 +23,7 @@ using System.Reflection; using System.Text; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Displays a header containing the application's name and version. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj index b1b6471f..1c4e8c50 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj @@ -1,8 +1,8 @@ - + netcoreapp2.2;net45 - DustInTheWind.ConsoleTools + DustInTheWind.ConsoleTools.Controls DustInTheWind.ConsoleTools.Controls true false diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs b/sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs index 884ab27b..fbe9212f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Displays a control repeatedly until the method is called. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs b/sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs index 99e2fee0..af1d5834 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Displays a horizontal line by repeating a specific character. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleListView.cs index 9fed5cb6..28a169ae 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleListView.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads or writes a list of values from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleView.cs index fd479cc8..bad5f212 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleView.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads a value from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatListView.cs index 0e9dd2d3..ddd8780f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatListView.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads or writes a list of values from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatView.cs index 32eac3be..e9dae751 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatView.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads a value from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ListView.cs index 1c1bd520..57557f9f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ListView.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads or writes a list of values from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32View.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32View.cs index 2023e185..2328caed 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32View.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32View.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads a value from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ListView.cs index f95645c7..2b62f2aa 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ListView.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads or writes a list of values from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64View.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64View.cs index b53f9a75..4d844e43 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64View.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64View.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads a value from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.Designer.cs index 31efec13..da053553 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListInputResources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace DustInTheWind.ConsoleTools.InputControls { +namespace DustInTheWind.ConsoleTools.Controls.InputControls { using System; @@ -39,7 +39,7 @@ internal ListInputResources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.InputControls.ListInputResources", typeof(ListInputResources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.Controls.InputControls.ListInputResources", typeof(ListInputResources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListView.cs index 5816aaf9..71230aa9 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListView.cs @@ -24,7 +24,7 @@ using System.Linq; using System.Text; -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads or writes a list of values from/to the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs index ad438ccf..fc23a9cf 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { public enum ReadWriteMode { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringListView.cs index eec861ec..6e6f51f3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringListView.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads or writes a list of values from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringView.cs index 743fc193..a642f8e3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringView.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { public class StringView : ValueView { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.Designer.cs index 91b6d483..ae26fd04 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueInputResources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace DustInTheWind.ConsoleTools.InputControls { +namespace DustInTheWind.ConsoleTools.Controls.InputControls { using System; @@ -39,7 +39,7 @@ internal ValueInputResources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.InputControls.ValueInputResources", typeof(ValueInputResources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.Controls.InputControls.ValueInputResources", typeof(ValueInputResources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueView.cs index 5dd3a4a6..0a1945fe 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueView.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Reads a value from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs index d51bafcd..3f598346 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// Contains the answers that can be returned by the . diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs index ed215f23..ba0722b0 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs @@ -22,7 +22,7 @@ using System; using System.Text; -namespace DustInTheWind.ConsoleTools.InputControls +namespace DustInTheWind.ConsoleTools.Controls.InputControls { /// /// This control reads a yes/no answer from the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.Designer.cs index dc361df4..47173a41 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestionResources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace DustInTheWind.ConsoleTools.InputControls { +namespace DustInTheWind.ConsoleTools.Controls.InputControls { using System; @@ -39,7 +39,7 @@ internal YesNoQuestionResources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.InputControls.YesNoQuestionResources", typeof(YesNoQuestionResources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.Controls.InputControls.YesNoQuestionResources", typeof(YesNoQuestionResources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Label.cs b/sources/ConsoleTools/ConsoleTools.Controls/Label.cs index fca26f3b..7e4849d5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Label.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Label.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { public class Label : InlineTextBlock { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs b/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs index 3669b51d..c6ceb803 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs @@ -22,7 +22,7 @@ using System; using System.Threading; -namespace DustInTheWind.ConsoleTools.Guard +namespace DustInTheWind.ConsoleTools.Controls { public class MachineLevelGuardian { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs index 6167cb51..0d6eada2 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.Musical +namespace DustInTheWind.ConsoleTools.Controls.Musical { /// /// Represents a musical note. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs index 6a6e6a3c..1c3ce69f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new -namespace DustInTheWind.ConsoleTools.Musical +namespace DustInTheWind.ConsoleTools.Controls.Musical { public struct MusicalNoteInfo { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs index d1e9b557..e46580b3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools.Musical +namespace DustInTheWind.ConsoleTools.Controls.Musical { public static class Sound { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs index b4c06a50..f02dc6ac 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// A control that displays a message and waits for the user to press any key. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.Designer.cs b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.Designer.cs index 64efbb97..efcb126c 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.Designer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/PauseResources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace DustInTheWind.ConsoleTools { +namespace DustInTheWind.ConsoleTools.Controls { using System; @@ -39,7 +39,7 @@ internal PauseResources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.PauseResources", typeof(PauseResources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DustInTheWind.ConsoleTools.Controls.PauseResources", typeof(PauseResources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs b/sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs index edbf2a2d..358bf191 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs @@ -21,7 +21,7 @@ using System.Collections.Generic; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// This control displays a multiline text to the console. diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs b/sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs index f534db26..c43cca68 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs @@ -22,7 +22,7 @@ using System; using System.IO; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { internal abstract class ThreeStageFile : IDisposable { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs b/sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs index b895ca60..b33076c8 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { public class TitleDisplayEventArgs : EventArgs { diff --git a/sources/ConsoleTools/ConsoleTools/ConsoleWrapper/ConsoleX.cs b/sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/ConsoleWrapper/ConsoleX.cs rename to sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs diff --git a/sources/ConsoleTools/ConsoleTools/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs similarity index 89% rename from sources/ConsoleTools/ConsoleTools/Properties/AssemblyInfo.cs rename to sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs index 6ec5d84a..7b46c704 100644 --- a/sources/ConsoleTools/ConsoleTools/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs @@ -20,13 +20,12 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("DustInTheWind.ConsoleTools")] +[assembly: AssemblyTitle("DustInTheWind.ConsoleTools.Core")] [assembly: AssemblyDescription("This is a set of tools for the .net Console.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] @@ -37,6 +36,4 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5a50aa3d-e14a-4e0c-bc6a-06aa1d6a5524")] - -[assembly: InternalsVisibleTo("DustInTheWind.ConsoleTools.Tests")] \ No newline at end of file +[assembly: Guid("5a50aa3d-e14a-4e0c-bc6a-06aa1d6a5524")] \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools/Themes/DefaultColorTheme.cs b/sources/ConsoleTools/ConsoleTools.Core/Themes/DefaultColorTheme.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Themes/DefaultColorTheme.cs rename to sources/ConsoleTools/ConsoleTools.Core/Themes/DefaultColorTheme.cs diff --git a/sources/ConsoleTools/ConsoleTools/Themes/DefaultTextType.cs b/sources/ConsoleTools/ConsoleTools.Core/Themes/DefaultTextType.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Themes/DefaultTextType.cs rename to sources/ConsoleTools/ConsoleTools.Core/Themes/DefaultTextType.cs diff --git a/sources/ConsoleTools/ConsoleTools/Themes/IColorTheme.cs b/sources/ConsoleTools/ConsoleTools.Core/Themes/IColorTheme.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Themes/IColorTheme.cs rename to sources/ConsoleTools/ConsoleTools.Core/Themes/IColorTheme.cs diff --git a/sources/ConsoleTools/ConsoleTools/Themes/TextType.cs b/sources/ConsoleTools/ConsoleTools.Core/Themes/TextType.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools/Themes/TextType.cs rename to sources/ConsoleTools/ConsoleTools.Core/Themes/TextType.cs diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs index adc53d3c..ebd5a998 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs @@ -15,7 +15,7 @@ // along with this program. If not, see . using System; -using DustInTheWind.ConsoleTools.Guard; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.GuardDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedCenterCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedCenterCommand.cs index 1a325e2d..7214e659 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedCenterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedCenterCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands { internal class AlignedCenterCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedRightCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedRightCommand.cs index f458d814..45d56e9d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedRightCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/AlignedRightCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands { internal class AlignedRightCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomBackgroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomBackgroundColorCommand.cs index 5644ce1d..9c72ae03 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomBackgroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomBackgroundColorCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomCharCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomCharCommand.cs index 61dbb305..da894e82 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomCharCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomCharCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands { internal class CustomCharCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomForegroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomForegroundColorCommand.cs index 5c50798e..e5eaf31f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomForegroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomForegroundColorCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomMarginCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomMarginCommand.cs index caa3755a..73cedcfe 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomMarginCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomMarginCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomPaddingCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomPaddingCommand.cs index 9bc72e1d..7de07dae 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomPaddingCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomPaddingCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomWidthCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomWidthCommand.cs index 61bd67c0..d2262f58 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomWidthCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/CustomWidthCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands { internal class CustomWidthCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/DefaultCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/DefaultCommand.cs index 8bab59ea..f4204d97 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/DefaultCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Commands/DefaultCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands { internal class DefaultCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs index ddcb09f6..f534884b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.HorizontalLineDemo/Program.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; using DustInTheWind.ConsoleTools.Demo.HorizontalLineDemo.Commands; using DustInTheWind.ConsoleTools.Controls.Menus; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs index da6f3601..673aafc1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs index 2181fe6d..ecd3312b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs index 280c74f4..6584ac1d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs @@ -16,8 +16,9 @@ using System; using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs index b7e8ccd5..f157a564 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs @@ -16,8 +16,8 @@ using System; using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs index 93776cb5..f3ca4054 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs @@ -16,8 +16,9 @@ using System; using System.Linq; +using DustInTheWind.ConsoleTools.Controls; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs index 5f595e5d..0c645e38 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs @@ -16,8 +16,8 @@ using System; using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs index 1d37714f..f25fb113 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs index 8de5661a..e6406dcd 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs index 7111c351..02d0ebc7 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs index dce3f2af..9422791a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs index fede7d6a..e3c61339 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs index 3dede054..41fcd15a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs index 331c1f08..67a4e664 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs index 76223790..4ee36ae7 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs index 1490dd46..7c795f8c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.InputControlsDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs index 66e7866d..752fa2ed 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using DustInTheWind.ConsoleTools.Musical; +using DustInTheWind.ConsoleTools.Controls; +using DustInTheWind.ConsoleTools.Controls.Musical; namespace DustInTheWind.ConsoleTools.Demo.Musical { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs index d9e0b484..a59828a1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/ApplicationHeader.cs @@ -16,6 +16,7 @@ using System; using System.Reflection; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.PauseDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/BackgroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/BackgroundColorCommand.cs index b59c4327..84c841cf 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/BackgroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/BackgroundColorCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomMarginsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomMarginsCommand.cs index 1e18b15f..d5035779 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomMarginsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomMarginsCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomPaddingsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomPaddingsCommand.cs index 507ca428..d016f964 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomPaddingsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomPaddingsCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomUnlockKeyCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomUnlockKeyCommand.cs index 9af09b4a..b91801f7 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomUnlockKeyCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/CustomUnlockKeyCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/DefaultCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/DefaultCommand.cs index 7dc1bb5e..382379d6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/DefaultCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/DefaultCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands { internal class DefaultCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ErasablePauseCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ErasablePauseCommand.cs index caa26914..bc9d3ed6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ErasablePauseCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ErasablePauseCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands { internal class ErasablePauseCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ForegroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ForegroundColorCommand.cs index 8c601ff8..fee40d30 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ForegroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Commands/ForegroundColorCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs index 90913503..29a3d4fb 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs index 69f9f8a5..0ea6bd44 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/PresentationLayer/DataProcessingView.cs @@ -16,6 +16,7 @@ using System; using System.ComponentModel; +using DustInTheWind.ConsoleTools.Controls; using DustInTheWind.ConsoleTools.Controls.Spinners; using DustInTheWind.ConsoleTools.Demo.ProgressBarDemo.BusinessLayer; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs index d69720ed..a90d8677 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; using DustInTheWind.ConsoleTools.Demo.ProgressBarDemo.PresentationLayer; namespace DustInTheWind.ConsoleTools.Demo.ProgressBarDemo diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs index 2babdd0b..57706dee 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/ExitCommand.cs @@ -15,8 +15,8 @@ // along with this program. If not, see . using DustInTheWind.ConsoleTools.CommandLine; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.PrompterDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs index c8e8b737..37c6a43a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs @@ -16,8 +16,8 @@ using System; using DustInTheWind.ConsoleTools.CommandLine; +using DustInTheWind.ConsoleTools.Controls.InputControls; using DustInTheWind.ConsoleTools.Controls.Menus; -using DustInTheWind.ConsoleTools.InputControls; namespace DustInTheWind.ConsoleTools.Demo.PrompterDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs index 9c488b54..27a96cf8 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.PrompterDemo { internal class Program diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs index 57895876..450e9997 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.ScrollMenuDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs index c774d6e9..5bf9c123 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs @@ -14,6 +14,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; +using DustInTheWind.ConsoleTools.Controls.Spinners; + namespace DustInTheWind.ConsoleTools.Demo.SpinnerDemo { /// diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/DemoApplication.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/DemoApplication.cs index eb5384d4..60f01154 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/DemoApplication.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/DemoApplication.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.TabularData { internal class DemoApplication diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs index 28d42d3e..ece200c4 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/ApplicationHeader.cs @@ -16,6 +16,7 @@ using System; using System.Reflection; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs index 2a2febc9..1ea37fcd 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/CommandBase.cs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; using DustInTheWind.ConsoleTools.Controls.Menus; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/BackgroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/BackgroundColorCommand.cs index d47592e5..83f4b7d5 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/BackgroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/BackgroundColorCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/DefaultCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/DefaultCommand.cs index 97bbcdb2..113e856b 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/DefaultCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/DefaultCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { internal class SingleShortLineCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/ForegroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/ForegroundColorCommand.cs index 81dfeda1..5b4bd00a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/ForegroundColorCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/ForegroundColorCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentCenterCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentCenterCommand.cs index 1504174a..1f8443cc 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentCenterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentCenterCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentRightCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentRightCommand.cs index 19ff6bc2..9efa0a71 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentRightCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/HorizontalAlignmentRightCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MarginsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MarginsCommand.cs index 09d9d12e..9ef4fa6f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MarginsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MarginsCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MaxWidthCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MaxWidthCommand.cs index 671417d2..169732a6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MaxWidthCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MaxWidthCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MinWidthCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MinWidthCommand.cs index 7f256ec4..0c0f1209 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MinWidthCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MinWidthCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleLongLinesCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleLongLinesCommand.cs index c20b80a5..0504d046 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleLongLinesCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleLongLinesCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { internal class MultipleLongLinesCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleShortLinesCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleShortLinesCommand.cs index edcb5cf0..d3a5a111 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleShortLinesCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/MultipleShortLinesCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { internal class MultipleShortLinesCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/PaddingsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/PaddingsCommand.cs index e72db81b..11b0f79a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/PaddingsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/PaddingsCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/SingleLongLineCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/SingleLongLineCommand.cs index cf8dea46..6e82aedc 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/SingleLongLineCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/SingleLongLineCommand.cs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; + namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { internal class SingleLongLineCommand : CommandBase diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/WidthCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/WidthCommand.cs index 65c37bfd..605def8c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/WidthCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Commands/WidthCommand.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs index d9f013fd..054757a6 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextBlockDemo/Program.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; using DustInTheWind.ConsoleTools.Demo.TextBlockDemo.Commands; using DustInTheWind.ConsoleTools.Controls.Menus; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs index 7dd36338..42d44320 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.TextMenuDemo { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs index df5fe5b5..8915e873 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools.Demo.WriteText { diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs index 55fdae34..d2e7c9be 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs @@ -23,6 +23,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using DustInTheWind.ConsoleTools.Controls; using DustInTheWind.ConsoleTools.Controls.Spinners; using DustInTheWind.ConsoleTools.Mvc.UseCases; using DustInTheWind.ConsoleTools.Mvc.UserControls; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj index e0312adf..73d7f529 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj @@ -15,7 +15,6 @@ - diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj index 9cf5bb47..6f891e6c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj @@ -1,211 +1,27 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {54D61983-996F-436E-A265-01C616099367} - Library - Properties - DustInTheWind.ConsoleTools.Tests - DustInTheWind.ConsoleTools.Tests - 512 - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - v4.5.2 - full - false - bin\Debug-Net452\ - DEBUG;TRACE - prompt - 4 - false - - - true - bin\Debug-Net461\ - v4.6.1 - DEBUG;TRACE - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - bin\Release-Net452\ - v4.5.2 - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - bin\Release-Net461\ - v4.6.1 - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - ..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll - - - ..\packages\Moq.4.10.0\lib\net45\Moq.dll - - - ..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll - True - - - - - ..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll - - - ..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll - - - - - - Properties\AssemblyInfo.Shared.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 - true - - - - - Designer - - - PreserveNewest - - - - - PreserveNewest - - - - - {439c9c20-be41-4ae1-83d0-13af94114ede} - ConsoleTools.Controls.Menus - - - {3c2b6dd0-cf97-4ea7-8565-a338892c0643} - ConsoleTools.Controls.Spinners - - - {94a81b0e-6565-4ba1-a6cd-d55e7847d5fb} - ConsoleTools.Controls - - - {975d695d-1fd2-446f-bd7c-0f7839c1559d} - ConsoleTools.Core - - - {08c40188-94f1-47ee-aaaa-08a372bca026} - ConsoleTools.Controls.Tables - - - - + + + + netcoreapp2.2;net45 + DustInTheWind.ConsoleTools.Tests + DustInTheWind.ConsoleTools.Tests + false + false + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs index e74f8f45..710b7596 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using DustInTheWind.ConsoleTools.Controls; using NUnit.Framework; namespace DustInTheWind.ConsoleTools.Tests.TextBlockTests diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index 54e913f9..53ee03e8 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29709.97 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools", "ConsoleTools\ConsoleTools.csproj", "{E43718E9-3B14-4FCB-B47E-34460E817824}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Tests", "ConsoleTools.Tests\ConsoleTools.Tests.csproj", "{54D61983-996F-436E-A265-01C616099367}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{2C2BFA30-8815-4269-AC92-DDE5589BD958}" @@ -57,30 +55,18 @@ Global Release-Net461|Any CPU = Release-Net461|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E43718E9-3B14-4FCB-B47E-34460E817824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Debug-Net452|Any CPU.ActiveCfg = Debug|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Debug-Net452|Any CPU.Build.0 = Debug|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Debug-Net461|Any CPU.ActiveCfg = Debug|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Debug-Net461|Any CPU.Build.0 = Debug|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Release|Any CPU.Build.0 = Release|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Release-Net452|Any CPU.ActiveCfg = Release|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Release-Net452|Any CPU.Build.0 = Release|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU - {E43718E9-3B14-4FCB-B47E-34460E817824}.Release-Net461|Any CPU.Build.0 = Release|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Debug|Any CPU.ActiveCfg = Debug-Net461|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Debug|Any CPU.Build.0 = Debug-Net461|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Debug-Net452|Any CPU.ActiveCfg = Debug-Net452|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Debug-Net452|Any CPU.Build.0 = Debug-Net452|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Debug-Net461|Any CPU.ActiveCfg = Debug-Net461|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Debug-Net461|Any CPU.Build.0 = Debug-Net461|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Release|Any CPU.ActiveCfg = Release-Net461|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Release|Any CPU.Build.0 = Release-Net461|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Release-Net452|Any CPU.ActiveCfg = Release-Net452|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Release-Net452|Any CPU.Build.0 = Release-Net452|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Release-Net461|Any CPU.ActiveCfg = Release-Net461|Any CPU - {54D61983-996F-436E-A265-01C616099367}.Release-Net461|Any CPU.Build.0 = Release-Net461|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Debug-Net452|Any CPU.ActiveCfg = Debug|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Debug-Net452|Any CPU.Build.0 = Debug|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Debug-Net461|Any CPU.ActiveCfg = Debug|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Debug-Net461|Any CPU.Build.0 = Debug|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Release|Any CPU.Build.0 = Release|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Release-Net452|Any CPU.ActiveCfg = Release|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Release-Net452|Any CPU.Build.0 = Release|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {54D61983-996F-436E-A265-01C616099367}.Release-Net461|Any CPU.Build.0 = Release|Any CPU {64FBFC9E-C9A4-46C6-84ED-6A8A811ECFBC}.Debug|Any CPU.ActiveCfg = Debug-Net461|Any CPU {64FBFC9E-C9A4-46C6-84ED-6A8A811ECFBC}.Debug|Any CPU.Build.0 = Debug-Net461|Any CPU {64FBFC9E-C9A4-46C6-84ED-6A8A811ECFBC}.Debug-Net452|Any CPU.ActiveCfg = Debug-Net452|Any CPU diff --git a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj b/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj deleted file mode 100644 index 76382fca..00000000 --- a/sources/ConsoleTools/ConsoleTools/ConsoleTools.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - Library - netcoreapp2.2;net45 - - - DustInTheWind.ConsoleTools - DustInTheWind.ConsoleTools - false - false - true - - - - bin\Release\netcoreapp2.2\DustInTheWind.ConsoleTools.xml - - - - bin\Debug\netcoreapp2.2\DustInTheWind.ConsoleTools.xml - - - - - - - - - - - - - - - - - - From f5fe50349034cdcb52c444adcbc87c638f586372 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 8 Mar 2020 13:14:14 +0200 Subject: [PATCH 18/57] fixed all namespaces --- .../ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs | 2 +- .../ThreeStageFile.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename sources/ConsoleTools/{ConsoleTools.Controls => ConsoleTools.Core}/ThreeStageFile.cs (98%) diff --git a/sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs b/sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs index ca3701ff..343b7b4b 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs @@ -1,7 +1,7 @@ using System; using DustInTheWind.ConsoleTools.Themes; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.ConsoleWrapper { internal class ConsoleX { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs b/sources/ConsoleTools/ConsoleTools.Core/ThreeStageFile.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs rename to sources/ConsoleTools/ConsoleTools.Core/ThreeStageFile.cs index c43cca68..f534db26 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ThreeStageFile.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ThreeStageFile.cs @@ -22,7 +22,7 @@ using System; using System.IO; -namespace DustInTheWind.ConsoleTools.Controls +namespace DustInTheWind.ConsoleTools { internal abstract class ThreeStageFile : IDisposable { From fc79b98192722878367c169a19e82ccdd6de8938 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 8 Mar 2020 13:28:21 +0200 Subject: [PATCH 19/57] fixed the menus's assembly name --- .../ConsoleTools.Controls.Menus.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj index 95d6a160..8ad60aea 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj @@ -3,7 +3,7 @@ netcoreapp2.2;net45 DustInTheWind.ConsoleTools.Controls.Menus - DustInTheWind.ConsoleTools.Constorls.Menus + DustInTheWind.ConsoleTools.Controls.Menus true false false From 2e04dc1191fdd8a79fdd4874e4d9d6253cc3c307 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 8 Mar 2020 13:32:16 +0200 Subject: [PATCH 20/57] updated the nuget build script --- nuget/build.ps1 | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/nuget/build.ps1 b/nuget/build.ps1 index a8ff14ed..f85b2e2e 100644 --- a/nuget/build.ps1 +++ b/nuget/build.ps1 @@ -31,32 +31,35 @@ Write-Output "------------------------------------------------------------------ Write-Output "Retrieve all files." Write-Output "----------------------------------------------------------------------------------------------------" -Write-Output "---" -Write-Output "--- Retrieve assemblies - net45" -Write-Output "---" - New-Item -ItemType Directory -Force -Path "lib\net45" -Copy-Item -Path "$rootDirectory\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.dll" -Destination "lib\net45" -Recurse -Container -Copy-Item -Path "$rootDirectory\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.xml" -Destination "lib\net45" -Recurse -Container - -Write-Output "---" -Write-Output "--- Retrieve assemblies - netcoreapp2.2" -Write-Output "---" - New-Item -ItemType Directory -Force -Path "lib\netcoreapp2.2" -Copy-Item -Path "$rootDirectory\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.dll" -Destination "lib\netcoreapp2.2" -Recurse -Container -Copy-Item -Path "$rootDirectory\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.xml" -Destination "lib\netcoreapp2.2" -Recurse -Container -Write-Output "---" -Write-Output "--- Retrieve changelog file" -Write-Output "---" +$projectDirs = @( +"$rootDirectory\sources\ConsoleTools\ConsoleTools.Core", +"$rootDirectory\sources\ConsoleTools\ConsoleTools.Controls", +"$rootDirectory\sources\ConsoleTools\ConsoleTools.Controls.Menus" +"$rootDirectory\sources\ConsoleTools\ConsoleTools.Controls.Spinners" +"$rootDirectory\sources\ConsoleTools\ConsoleTools.Controls.Tables" +) -Copy-Item -Path "$rootDirectory\doc\changelog.txt" -Destination "." -Recurse -Container +for ($i = 0; $i -lt $projectDirs.length; $i++) +{ + $projectDir = $projectDirs[$i] + + Write-Output "---> Retrieve assemblies from project: $projectDir" + + Copy-Item -Path "$projectDir\bin\Release\net45\*.dll" -Destination "lib\net45" -Recurse -Container + Copy-Item -Path "$projectDir\bin\Release\net45\*.xml" -Destination "lib\net45" -Recurse -Container + + Copy-Item -Path "$projectDir\bin\Release\netcoreapp2.2\*.dll" -Destination "lib\netcoreapp2.2" -Recurse -Container + Copy-Item -Path "$projectDir\bin\Release\netcoreapp2.2\*.xml" -Destination "lib\netcoreapp2.2" -Recurse -Container + Copy-Item -Path "$projectDir\bin\Release\netcoreapp2.2\*.json" -Destination "lib\netcoreapp2.2" -Recurse -Container +} -Write-Output "---" -Write-Output "--- Retrieve readme file" -Write-Output "---" +Write-Output "---> Retrieve changelog file" +Copy-Item -Path "$rootDirectory\doc\changelog.txt" -Destination "." -Recurse -Container +Write-Output "---> Retrieve readme file" Copy-Item -Path "$rootDirectory\readme.txt" -Destination "." -Recurse -Container @@ -71,7 +74,6 @@ Write-Output "------------------------------------------------------------------ Write-Output "Clean up files." Write-Output "----------------------------------------------------------------------------------------------------" - if (Test-Path "lib") { Remove-Item "lib" -Recurse -Force; From 03fc2a8c8a6bd9125f9d47c9fd5644567d96033f Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 8 Mar 2020 13:41:08 +0200 Subject: [PATCH 21/57] removed the old nuget build script --- nuget/build.bat | 159 ------------------------------------------------ 1 file changed, 159 deletions(-) delete mode 100644 nuget/build.bat diff --git a/nuget/build.bat b/nuget/build.bat deleted file mode 100644 index 5f669f0a..00000000 --- a/nuget/build.bat +++ /dev/null @@ -1,159 +0,0 @@ -@echo off - -set root_directory=.. - -rem ---------------------------------------------------------------------------------------------------- -rem Clean up existing files. -rem ---------------------------------------------------------------------------------------------------- - -echo. -echo --- -echo --- Clean up existing files - lib directory -echo --- -echo. -if EXIST "lib" ( - rmdir /S/Q "lib" - if %errorlevel% neq 0 goto :error -) - -echo. -echo --- -echo --- Clean up existing files - .nupkg files -echo --- -echo. -if EXIST "*.nupkg" ( - del *.nupkg - if %errorlevel% neq 0 goto :error -) - -echo. -echo --- -echo --- Clean up existing files - changelog file -echo --- -echo. -if EXIST "changelog.txt" ( - del "changelog.txt" - if %errorlevel% neq 0 goto :error -) - -echo. -echo --- -echo --- Clean up existing files - readme file -echo --- -echo. -if EXIST "readme.txt" ( - del "readme.txt" - if %errorlevel% neq 0 goto :error -) - -rem ---------------------------------------------------------------------------------------------------- -rem Retrieve all files. -rem ---------------------------------------------------------------------------------------------------- - -echo. -echo --- -echo --- Retrieve assemblies - net45 -echo --- -echo. -xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.dll" "lib\net45" -if %errorlevel% neq 0 goto :error -xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\net45\*.xml" "lib\net45" -if %errorlevel% neq 0 goto :error - -echo. -echo --- -echo --- Retrieve assemblies - netcoreapp2.2 -echo --- -echo. -xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.dll" "lib\netcoreapp2.2" -if %errorlevel% neq 0 goto :error -xcopy /R/Y/S/I "%root_directory%\sources\ConsoleTools\ConsoleTools\bin\Release\netcoreapp2.2\*.xml" "lib\netcoreapp2.2" -if %errorlevel% neq 0 goto :error - -echo. -echo --- -echo --- Retrieve changelog file -echo --- -echo. -xcopy /Y "%root_directory%\doc\changelog.txt" . -if %errorlevel% neq 0 goto :error - -echo. -echo --- -echo --- Retrieve readme file -echo --- -echo. -xcopy /Y "%root_directory%\readme.txt" . -if %errorlevel% neq 0 goto :error - -rem ---------------------------------------------------------------------------------------------------- -rem Create package -rem ---------------------------------------------------------------------------------------------------- - -echo. -echo --- -echo --- Create nuget package -echo --- -echo. -nuget pack - -rem ---------------------------------------------------------------------------------------------------- -rem Clean up files. -rem ---------------------------------------------------------------------------------------------------- - -echo. -echo --- -echo --- Clean up files - lib directory -echo --- -echo. -rmdir /S/Q "lib" -if %errorlevel% neq 0 goto :error - -echo. -echo --- -echo --- Clean up files - changelog file -echo --- -echo. -del "changelog.txt" -if %errorlevel% neq 0 goto :error - -echo. -echo --- -echo --- Clean up files - readme file -echo --- -echo. -del "readme.txt" -if %errorlevel% neq 0 goto :error - -rem ---------------------------------------------------------------------------------------------------- -rem Success -rem ---------------------------------------------------------------------------------------------------- - -:success -echo. -echo. -echo --- -echo --- -echo --- Success -echo --- -echo --- -goto :end - -rem ---------------------------------------------------------------------------------------------------- -rem Error -rem ---------------------------------------------------------------------------------------------------- - -:error -echo. -echo. -echo --- -echo --- -echo --- Error -echo --- -echo --- - -rem ---------------------------------------------------------------------------------------------------- -rem End -rem ---------------------------------------------------------------------------------------------------- - -:end \ No newline at end of file From 80e7e4b72aae59d4fb56c256b0d485812d02425b Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 8 Mar 2020 15:24:31 +0200 Subject: [PATCH 22/57] renamed the Emphasies to Emphasized. renamed input controls to "Value". --- .../MenuItemCollection.cs | 4 ++-- .../MenuItems/LabelMenuItem.cs | 12 +++++----- .../MenuItems/SeparatorMenuItem.cs | 10 ++++---- .../MenuItems/YesNoMenuItem.cs | 4 ++-- .../ConsoleTools.Controls.Menus/Prompter.cs | 14 +++++------ .../ConsoleTools.Controls.Tables/TitleCell.cs | 4 ++-- .../ConsoleTools.Controls.Tables/TitleRow.cs | 2 +- .../{DoubleView.cs => DoubleValue.cs} | 10 ++++---- .../{DoubleListView.cs => DoubleValueList.cs} | 10 ++++---- .../{FloatView.cs => FloatValue.cs} | 10 ++++---- .../{FloatListView.cs => FloatValueList.cs} | 10 ++++---- .../{Int32View.cs => Int32Value.cs} | 10 ++++---- .../{Int32ListView.cs => Int32ValueList.cs} | 10 ++++---- .../{Int64View.cs => Int64Value.cs} | 10 ++++---- .../{Int64ListView.cs => Int64ValueList.cs} | 10 ++++---- .../{StringView.cs => StringValue.cs} | 10 ++++---- .../{StringListView.cs => StringValueList.cs} | 10 ++++---- .../{ValueView.cs => ValueControl.cs} | 24 +++++++++---------- .../{ListView.cs => ValueList.cs} | 18 +++++++------- .../InputControls/YesNoQuestion.cs | 2 +- .../Musical/MusicalNote.cs | 6 +++++ .../ConsoleTools.Core/ConsoleReader.cs | 10 ++++---- .../ConsoleTools/ConsoleTools.Core/Control.cs | 3 +++ .../CustomConsole.WriteEmphasies.cs | 20 ++++++++-------- .../ConsoleTools.Demo.Guard/Program.cs | 4 ++-- .../Commands/ListReadNumbersCommand.cs | 4 ++-- .../Commands/ListReadQuickCommand.cs | 6 ++--- .../Commands/ListReadStringsCommand.cs | 4 ++-- .../ListReadWithCustomParserCommand.cs | 8 ++++--- .../Commands/ListWriteCommand.cs | 2 +- .../Commands/ListWriteQuickCommand.cs | 4 ++-- .../Commands/ValueReadCommand.cs | 12 +++++----- .../Commands/ValueReadNumberCommand.cs | 6 ++--- .../Commands/ValueReadQuickCommand.cs | 6 ++--- .../ValueReadWithDefaultValueCommand.cs | 10 ++++---- .../Commands/ValueWriteCommand.cs | 24 +++++++++---------- .../Commands/ValueWriteQuickCommand.cs | 12 +++++----- .../Commands/YesNoCancelCommand.cs | 2 +- .../Commands/YesNoCommand.cs | 2 +- .../MainMenu.cs | 2 +- .../Program.cs | 4 ++-- .../ConsoleTools.Demo.Musical/Program.cs | 4 ++-- .../Program.cs | 2 +- .../Commands/HelpCommand.cs | 10 ++++---- .../Commands/PrompterCommand.cs | 4 ++-- .../ConsoleTools.Demo.PrompterDemo/Program.cs | 6 ++--- .../Program.cs | 4 ++-- .../ConsoleTools.Demo.SpinnerDemo/Program.cs | 2 +- .../ConsoleTools.Demo.TabularData/Program.cs | 4 ++-- .../ConsoleTools.Demo.TextMenuDemo/Program.cs | 4 ++-- .../ConsoleTools.Demo.WriteText/Program.cs | 6 ++--- .../ConsoleTools.Tests.csproj | 5 ++++ 52 files changed, 206 insertions(+), 190 deletions(-) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{DoubleView.cs => DoubleValue.cs} (91%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{DoubleListView.cs => DoubleValueList.cs} (84%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{FloatView.cs => FloatValue.cs} (84%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{FloatListView.cs => FloatValueList.cs} (84%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{Int32View.cs => Int32Value.cs} (85%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{Int32ListView.cs => Int32ValueList.cs} (84%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{Int64View.cs => Int64Value.cs} (85%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{Int64ListView.cs => Int64ValueList.cs} (84%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{StringView.cs => StringValue.cs} (91%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{StringListView.cs => StringValueList.cs} (84%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{ValueView.cs => ValueControl.cs} (92%) rename sources/ConsoleTools/ConsoleTools.Controls/InputControls/{ListView.cs => ValueList.cs} (95%) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs index 2f94f6e6..a55170cd 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs @@ -37,7 +37,7 @@ public class MenuItemCollection : List /// public int? CurrentIndex { - get { return currentIndex; } + get => currentIndex; private set { if (value < 0 || value >= Count) @@ -74,7 +74,7 @@ public int? CurrentVisibleIndex } /// - /// Gets or sets a vlue that specifies if circular selection is allowed. + /// Gets or sets a value that specifies if circular selection is allowed. /// When reaching the first item go to the last item. /// When reaching the last item go to the first item. /// Default value: true diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs index 88a1e858..d4263928 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs @@ -66,8 +66,8 @@ public Size Size /// public bool IsVisible { - get { return VisibilityProvider?.Invoke() ?? isVisible; } - set { isVisible = value; } + get => VisibilityProvider?.Invoke() ?? isVisible; + set => isVisible = value; } /// @@ -77,7 +77,7 @@ public bool IsVisible /// /// Gets or sets the horizontal alignment of the current instance inside the menu. - /// Default value: . + /// Default value: . /// public HorizontalAlignment HorizontalAlignment { get; set; } = HorizontalAlignment.Default; @@ -87,8 +87,8 @@ public bool IsVisible /// public bool IsEnabled { - get { return Command?.IsActive ?? isEnabled; } - set { isEnabled = value; } + get => Command?.IsActive ?? isEnabled; + set => isEnabled = value; } /// @@ -125,7 +125,7 @@ public bool IsEnabled /// /// Event raised before the current instance is selected. - /// It gives the oportunity for a subscriber to cancel the selection of the menu item. + /// It gives the opportunity for a subscriber to cancel the selection of the menu item. /// public event EventHandler BeforeSelect; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs index a229d015..854925db 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs @@ -25,7 +25,7 @@ namespace DustInTheWind.ConsoleTools.Controls.Menus.MenuItems { /// - /// Represents a separator used to create a spae between groups of menu items in a menu. + /// Represents a separator used to create a space between groups of menu items in a menu. /// public class SeparatorMenuItem : IMenuItem { @@ -35,7 +35,7 @@ public class SeparatorMenuItem : IMenuItem /// public string Text { - get { return string.Empty; } + get => string.Empty; set { } } @@ -57,7 +57,7 @@ public string Text /// public bool IsEnabled { - get { return false; } + get => false; set { } } @@ -67,7 +67,7 @@ public bool IsEnabled /// public ConsoleKey? ShortcutKey { - get { return null; } + get => null; set { } } @@ -78,7 +78,7 @@ public ConsoleKey? ShortcutKey /// public ICommand Command { - get { return null; } + get => null; set { } } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs index 5ca04f98..97e5f04a 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs @@ -26,7 +26,7 @@ namespace DustInTheWind.ConsoleTools.Controls.Menus.MenuItems { /// /// Displays a yes/no question at the right of the menu item. - /// If the user respondes with "No", the menu item is canceled (not selected). + /// If the user responds with "No", the menu item is canceled (not selected). /// public class YesNoMenuItem : LabelMenuItem { @@ -70,7 +70,7 @@ private string BuildQuestionText() : QuestionText + " [Y/n]"; } - private void DisplayQuestion(Location questionLocation, string questionText) + private static void DisplayQuestion(Location questionLocation, string questionText) { Console.SetCursorPosition(questionLocation.Left, questionLocation.Top); Console.Write(questionText); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs index e749ad27..9437657e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs @@ -107,17 +107,17 @@ public void AddItem(PrompterItem prompterItem) /// /// Adds a list of items to the current instance. /// - /// The list of items to be added to the current instance. - public void AddItems(IEnumerable prompterItems) + /// The list of items to be added to the current instance. + public void AddItems(IEnumerable items) { - if (prompterItems == null) throw new ArgumentNullException(nameof(prompterItems)); + if (items == null) throw new ArgumentNullException(nameof(items)); - bool existsNullItems = prompterItems.Any(x => x == null); + bool existsNullItems = items.Any(x => x == null); if (existsNullItems) - throw new ArgumentException("Null items are not accepted.", nameof(prompterItems)); + throw new ArgumentException("Null items are not accepted.", nameof(items)); - this.prompterItems.AddRange(prompterItems.Where(x => x != null)); + prompterItems.AddRange(items); } /// @@ -200,7 +200,7 @@ private bool ReadUserInput() /// /// If a command is available it is processed by raising the event, - /// by calling the associated and, if none of the above suceeded, + /// by calling the associated and, if none of the above succeeded, /// by raising the event. /// protected override void OnAfterDisplay() diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs index 9703e858..9b99191d 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs @@ -37,12 +37,12 @@ public class TitleCell : CellBase public TitleRow ParentRow { get; internal set; } /// - /// Gets or sets the padding applyed to the left side of the cell. + /// Gets or sets the padding applied to the left side of the cell. /// public int? PaddingLeft { get; set; } /// - /// Gets or sets the padding applyed to the right side of the cell. + /// Gets or sets the padding applied to the right side of the cell. /// public int? PaddingRight { get; set; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs index 0f6403b8..2bd8d76c 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs @@ -108,7 +108,7 @@ public TitleRow(object title) } /// - /// Calculates the space (in characters) the current instance ocupies without other restrictions. + /// Calculates the space (in characters) the current instance occupies without other restrictions. /// public Size CalculatePreferredSize() { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValue.cs similarity index 91% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValue.cs index bad5f212..a149fc1b 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValue.cs @@ -24,21 +24,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads a value from the console. /// - public class DoubleView : ValueView + public class DoubleValue : ValueControl { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public DoubleView() + public DoubleValue() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the value. /// /// The label to be displayed when the user is requested to provide the value. - public DoubleView(string label) + public DoubleValue(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValueList.cs similarity index 84% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValueList.cs index 28a169ae..d19a14ba 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValueList.cs @@ -24,21 +24,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads or writes a list of values from the console. /// - public class DoubleListView : ListView + public class DoubleValueList : ValueList { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public DoubleListView() + public DoubleValueList() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the values. /// /// The label to be displayed when the user is requested to provide the values. - public DoubleListView(string label) + public DoubleValueList(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValue.cs similarity index 84% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValue.cs index e9dae751..2621486c 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValue.cs @@ -24,21 +24,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads a value from the console. /// - public class FloatView : ValueView + public class FloatValue : ValueControl { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public FloatView() + public FloatValue() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the value. /// /// The label to be displayed when the user is requested to provide the value. - public FloatView(string label) + public FloatValue(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValueList.cs similarity index 84% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValueList.cs index ddd8780f..8c4e5c26 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValueList.cs @@ -24,21 +24,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads or writes a list of values from the console. /// - public class FloatListView : ListView + public class FloatValueList : ValueList { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public FloatListView() + public FloatValueList() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the values. /// /// The label to be displayed when the user is requested to provide the values. - public FloatListView(string label) + public FloatValueList(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32View.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32Value.cs similarity index 85% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32View.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32Value.cs index 2328caed..591082c4 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32View.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32Value.cs @@ -24,21 +24,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads a value from the console. /// - public class Int32View : ValueView + public class Int32Value : ValueControl { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public Int32View() + public Int32Value() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the value. /// /// The label to be displayed when the user is requested to provide the value. - public Int32View(string label) + public Int32Value(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ValueList.cs similarity index 84% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ValueList.cs index 57557f9f..775a269b 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ValueList.cs @@ -24,21 +24,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads or writes a list of values from the console. /// - public class Int32ListView : ListView + public class Int32ValueList : ValueList { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public Int32ListView() + public Int32ValueList() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the values. /// /// The label to be displayed when the user is requested to provide the values. - public Int32ListView(string label) + public Int32ValueList(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64View.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64Value.cs similarity index 85% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64View.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64Value.cs index 4d844e43..52fe4e96 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64View.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64Value.cs @@ -24,21 +24,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads a value from the console. /// - public class Int64View : ValueView + public class Int64Value : ValueControl { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public Int64View() + public Int64Value() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the value. /// /// The label to be displayed when the user is requested to provide the value. - public Int64View(string label) + public Int64Value(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ValueList.cs similarity index 84% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ValueList.cs index 2b62f2aa..022a28d8 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ValueList.cs @@ -24,21 +24,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads or writes a list of values from the console. /// - public class Int64ListView : ListView + public class Int64ValueList : ValueList { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public Int64ListView() + public Int64ValueList() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the values. /// /// The label to be displayed when the user is requested to provide the values. - public Int64ListView(string label) + public Int64ValueList(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValue.cs similarity index 91% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValue.cs index a642f8e3..a7f38fe3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValue.cs @@ -21,21 +21,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls { - public class StringView : ValueView + public class StringValue : ValueControl { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public StringView() + public StringValue() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the value. /// /// The label to be displayed when the user is requested to provide the value. - public StringView(string label) + public StringValue(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValueList.cs similarity index 84% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValueList.cs index 6e6f51f3..3990fcd9 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValueList.cs @@ -24,21 +24,21 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads or writes a list of values from the console. /// - public class StringListView : ListView + public class StringValueList : ValueList { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public StringListView() + public StringValueList() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the values. /// /// The label to be displayed when the user is requested to provide the values. - public StringListView(string label) + public StringValueList(string label) : base(label) { } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueControl.cs similarity index 92% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueControl.cs index 0a1945fe..079ce0d7 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueControl.cs @@ -27,12 +27,12 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// Reads a value from the console. /// /// The type of the value that is requested from the user. - public class ValueView : BlockControl + public class ValueControl : BlockControl { /// /// Gets or sets a value that specifies if the control should read or write the property. /// - public ReadWriteMode ReadWriteMode { get; set; } = ReadWriteMode.Unknown; + public ReadWriteMode ReadWriteMode { get; set; } = ReadWriteMode.Read; /// /// Gets or sets the label text to be displayed before the content. @@ -86,18 +86,18 @@ public class ValueView : BlockControl public Func CustomParser { get; set; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ValueView() + public ValueControl() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the value. /// /// The label to be displayed when the user is requested to provide the value. - public ValueView(string label) + public ValueControl(string label) { Label.Text = label; } @@ -226,29 +226,29 @@ private T ConvertRawValue(string value) } /// - /// Reads a value from the console using a with default configuration. + /// Reads a value from the console using a with default configuration. /// /// The label text to be displayed. /// The value read from the console. public static T QuickRead(string label) { - ValueView valueView = new ValueView(label); - return valueView.Read(); + ValueControl valueControl = new ValueControl(label); + return valueControl.Read(); } /// - /// Reads a value from the console using a with default configuration. + /// Reads a value from the console using a with default configuration. /// /// The label text to be displayed. /// The value to be displayed. /// The value read from the console. public static void QuickWrite(string label, T value) { - ValueView valueView = new ValueView(label) + ValueControl valueControl = new ValueControl(label) { Value = value }; - valueView.Write(); + valueControl.Write(); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListView.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListView.cs rename to sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs index 71230aa9..8aa9eaa8 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ListView.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs @@ -29,7 +29,7 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls /// /// Reads or writes a list of values from/to the console. /// - public class ListView : BlockControl + public class ValueList : BlockControl { /// /// Gets or sets a value that specifies if the control should read or write the list represented by the property. @@ -86,18 +86,18 @@ public class ListView : BlockControl public Func CustomParser { get; set; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ListView() + public ValueList() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the label to be displayed when the user is requested to provide the values. /// /// The label to be displayed before the content. - public ListView(string label) + public ValueList(string label) { Label.Text = label; } @@ -245,11 +245,11 @@ private void WriteAllValues() /// The value read from the console. public static List QuickRead(string label = null) { - ListView listView = new ListView(label) + ValueList valueList = new ValueList(label) { ReadWriteMode = ReadWriteMode.Read, }; - return listView.Read(); + return valueList.Read(); } /// @@ -260,12 +260,12 @@ public static List QuickRead(string label = null) /// The value read from the console. public static void QuickWrite(string label, IEnumerable values) { - ListView listView = new ListView(label) + ValueList valueList = new ValueList(label) { ReadWriteMode = ReadWriteMode.Write, Values = values.ToList() }; - listView.Write(); + valueList.Write(); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs index ba0722b0..2d7ca436 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs @@ -30,7 +30,7 @@ namespace DustInTheWind.ConsoleTools.Controls.InputControls public class YesNoQuestion : BlockControl { /// - /// Gets or sets trhe question that is displayed to the user. + /// Gets or sets the question that is displayed to the user. /// public string QuestionText { get; set; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs index 0d6eada2..1f3d7f01 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs @@ -26,6 +26,9 @@ namespace DustInTheWind.ConsoleTools.Controls.Musical /// public enum MusicalNote { + +#pragma warning disable 1591 + None, C0, @@ -178,5 +181,8 @@ public enum MusicalNote D8, Dd8, Eb8 + +#pragma warning restore 1591 + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs b/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs index c6367b15..e9c1fbc6 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs @@ -57,22 +57,22 @@ private static void reader() } } - public static string ReadLine(int timeOutMillisecs = Timeout.Infinite) + public static string ReadLine(int timeOutMilliseconds = Timeout.Infinite) { getInput.Set(); - bool success = gotInput.WaitOne(timeOutMillisecs); + bool success = gotInput.WaitOne(timeOutMilliseconds); if (!success) - throw new TimeoutException("User did not provide input within the timelimit."); + throw new TimeoutException("User did not provide input within the time limit."); return input; } - public static bool TryReadLine(out string line, int timeOutMillisecs = Timeout.Infinite) + public static bool TryReadLine(out string line, int timeOutMilliseconds = Timeout.Infinite) { getInput.Set(); - bool success = gotInput.WaitOne(timeOutMillisecs); + bool success = gotInput.WaitOne(timeOutMilliseconds); line = success ? input : null; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Control.cs b/sources/ConsoleTools/ConsoleTools.Core/Control.cs index 783284eb..84df6604 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Control.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Control.cs @@ -26,6 +26,9 @@ namespace DustInTheWind.ConsoleTools /// /// Provides base functionality for a control. /// + /// + /// + /// public abstract class Control { private bool originalCursorVisibility; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs index a90f1de4..6438783b 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs @@ -25,7 +25,7 @@ namespace DustInTheWind.ConsoleTools { public partial class CustomConsole { - public static void WriteEmphasies(string text) + public static void WriteEmphasized(string text) { ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; @@ -40,7 +40,7 @@ public static void WriteEmphasies(string text) Console.BackgroundColor = initialBackgroundColor; } - public static void WriteEmphasies(string format, params object[] arg) + public static void WriteEmphasized(string format, params object[] arg) { ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; @@ -55,7 +55,7 @@ public static void WriteEmphasies(string format, params object[] arg) Console.BackgroundColor = initialBackgroundColor; } - public static void WriteEmphasies(object o) + public static void WriteEmphasized(object o) { ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; @@ -70,7 +70,7 @@ public static void WriteEmphasies(object o) Console.BackgroundColor = initialBackgroundColor; } - public static void WriteLineEmphasies(string text) + public static void WriteLineEmphasized(string text) { ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; @@ -85,7 +85,7 @@ public static void WriteLineEmphasies(string text) Console.BackgroundColor = initialBackgroundColor; } - public static void WriteLineEmphasies(string format, params object[] arg) + public static void WriteLineEmphasized(string format, params object[] arg) { ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; @@ -100,7 +100,7 @@ public static void WriteLineEmphasies(string format, params object[] arg) Console.BackgroundColor = initialBackgroundColor; } - public static void WriteLineEmphasies(object o) + public static void WriteLineEmphasized(object o) { ConsoleColor initialForegroundColor = Console.ForegroundColor; ConsoleColor initialBackgroundColor = Console.BackgroundColor; @@ -117,9 +117,9 @@ public static void WriteLineEmphasies(object o) /// /// Executes the specified action while the foreground and background colors - /// are changed to "Emphasies" colors. + /// are changed to "Emphasized" colors. /// - public static void WithEmphasiesColors(Action action) + public static void WithEmphasizedColors(Action action) { if (action == null) throw new ArgumentNullException(nameof(action)); @@ -143,9 +143,9 @@ public static void WithEmphasiesColors(Action action) /// /// Executes the specified function while the foreground and background colors - /// are changed to "Emphasies" colors. + /// are changed to "Emphasized" colors. /// - public static T WithEmphasiesColors(Func func) + public static T WithEmphasizedColors(Func func) { if (func == null) throw new ArgumentNullException(nameof(func)); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs index ebd5a998..b5e9d7cf 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.Guard/Program.cs @@ -58,8 +58,8 @@ private static int Main() private static void DisplayApplicationHeader() { - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - Guard"); - CustomConsole.WriteLineEmphasies("==============================================================================="); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - Guard"); + CustomConsole.WriteLineEmphasized("==============================================================================="); CustomConsole.WriteLine(); CustomConsole.WriteLine("This demo shows the usage of the Guardian class."); CustomConsole.WriteLine(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs index 673aafc1..d666da68 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadNumbersCommand.cs @@ -33,12 +33,12 @@ public void Execute() CustomConsole.WriteLine(); CustomConsole.Write("Your lucky numbers: "); - CustomConsole.WriteLineEmphasies(string.Join(", ", numbers)); + CustomConsole.WriteLineEmphasized(string.Join(", ", numbers)); } private static IEnumerable ReadNumbers() { - ListView luckyNumbersRead = new ListView("What are your lucky number?"); + ValueList luckyNumbersRead = new ValueList("What are your lucky number?"); luckyNumbersRead.Read(); return luckyNumbersRead.Values; } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs index ecd3312b..7ed20071 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadQuickCommand.cs @@ -33,16 +33,16 @@ public void Execute() CustomConsole.WriteLine(); CustomConsole.Write("Beverages you like: "); - CustomConsole.WriteLineEmphasies(string.Join(", ", beverages)); + CustomConsole.WriteLineEmphasized(string.Join(", ", beverages)); } /// - /// Using the static method falls back + /// Using the static method falls back /// to the default properties for colors, bullet, spaces, etc. /// private static IEnumerable ReadBeveragesQuick() { - return ListView.QuickRead("What are your prefered beverages?"); + return ValueList.QuickRead("What are your prefered beverages?"); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs index 6584ac1d..09b5d7a0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadStringsCommand.cs @@ -40,7 +40,7 @@ public void Execute() CustomConsole.WriteLine(); CustomConsole.Write("Beverages you like: "); - CustomConsole.WriteLineEmphasies(string.Join(", ", beverages)); + CustomConsole.WriteLineEmphasized(string.Join(", ", beverages)); } /// @@ -48,7 +48,7 @@ public void Execute() /// private static List ReadBeverages() { - ListView beveragesRead = new ListView + ValueList beveragesRead = new ValueList { Label = new TextBlock { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs index f157a564..126f32a1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListReadWithCustomParserCommand.cs @@ -35,7 +35,7 @@ public void Execute() private static void DisplayColors(IReadOnlyList colors) { - CustomConsole.Write("Your prefered colors: "); + CustomConsole.Write("Your preferred colors: "); for (int i = 0; i < colors.Count; i++) { @@ -50,8 +50,10 @@ private static void DisplayColors(IReadOnlyList colors) private static IReadOnlyList ReadColors() { - ListView colorsRead = new ListView("What are your prefered colors?"); - colorsRead.CustomParser = value => (ConsoleColor)Enum.Parse(typeof(ConsoleColor), value, true); + ValueList colorsRead = new ValueList("What are your preferred colors?") + { + CustomParser = value => (ConsoleColor)Enum.Parse(typeof(ConsoleColor), value, true) + }; return colorsRead.Read(); } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs index f3ca4054..9c7d112c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteCommand.cs @@ -38,7 +38,7 @@ public void Execute() /// private static void DisplayColors(string[] colors) { - ListView colorsWrite = new ListView + ValueList colorsWrite = new ValueList { Label = new TextBlock { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs index 0c645e38..dc1073a4 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ListWriteQuickCommand.cs @@ -33,12 +33,12 @@ public void Execute() } /// - /// Using the static method falls back + /// Using the static method falls back /// to the default properties for colors, bullet, spaces, etc. /// private static void DisplayColorsQuick(IEnumerable colors) { - ListView.QuickWrite("Colors:", colors); + ValueList.QuickWrite("Colors:", colors); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs index f25fb113..fff4cc24 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadCommand.cs @@ -37,15 +37,15 @@ private static void RunExample() { // Create the input controls - ValueView firstNameView = new ValueView("First Name:"); - firstNameView.Label.ForegroundColor = ConsoleColor.Cyan; + ValueControl firstNameControl = new ValueControl("First Name:"); + firstNameControl.Label.ForegroundColor = ConsoleColor.Cyan; - ValueView lastNameView = new ValueView("Last Name:"); - lastNameView.Label.ForegroundColor = ConsoleColor.Cyan; + ValueControl lastNameControl = new ValueControl("Last Name:"); + lastNameControl.Label.ForegroundColor = ConsoleColor.Cyan; // Read values using the input controls - string firstName = firstNameView.Read(); - string lastName = lastNameView.Read(); + string firstName = firstNameControl.Read(); + string lastName = lastNameControl.Read(); // Display the read values. CustomConsole.WriteLine(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs index e6406dcd..d9cce8c0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadNumberCommand.cs @@ -36,11 +36,11 @@ public void Execute() private static void RunExample() { // Create the input controls - ValueView ageView = new ValueView("Age:"); - ageView.Label.ForegroundColor = ConsoleColor.DarkGreen; + ValueControl ageControl = new ValueControl("Age:"); + ageControl.Label.ForegroundColor = ConsoleColor.DarkGreen; // Read values using the input controls - int age = ageView.Read(); + int age = ageControl.Read(); // Display th read values. CustomConsole.WriteLine(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs index 02d0ebc7..358a143f 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadQuickCommand.cs @@ -33,10 +33,10 @@ public void Execute() /// private static void RunExample() { - string firstName = ValueView.QuickRead("First Name:"); - string lastName = ValueView.QuickRead("Last Name:"); + string firstName = ValueControl.QuickRead("First Name:"); + string lastName = ValueControl.QuickRead("Last Name:"); - // Display th read values. + // Display the read values. CustomConsole.WriteLine(); CustomConsole.WriteLine("Hi, {0} {1}!", firstName, lastName); } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs index 9422791a..8363dbcf 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueReadWithDefaultValueCommand.cs @@ -30,14 +30,14 @@ public void Execute() private static void RunExample() { - ValueView numberView = new ValueView("Number ({0}):"); - numberView.AcceptDefaultValue = true; - numberView.DefaultValue = 42; + ValueControl numberControl = new ValueControl("Number ({0}):"); + numberControl.AcceptDefaultValue = true; + numberControl.DefaultValue = 42; - CustomConsole.WriteLine("Just hit enter. The default value, 42, is returned by the ValueView control."); + CustomConsole.WriteLine("Just hit enter. The default value, 42, is returned by the ValueControl control."); CustomConsole.WriteLine(); - int number = numberView.Read(); + int number = numberControl.Read(); CustomConsole.WriteLine(); CustomConsole.WriteLine("You selected {0}.", number); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs index e3c61339..2f807204 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteCommand.cs @@ -26,24 +26,24 @@ internal class ValueWriteCommand : ICommand public void Execute() { - StringView firstNameView = new StringView("First Name:"); - firstNameView.Label.ForegroundColor = ConsoleColor.DarkGreen; + StringValue firstNameControl = new StringValue("First Name:"); + firstNameControl.Label.ForegroundColor = ConsoleColor.DarkGreen; - StringView lastNameView = new StringView("Last Name:"); - lastNameView.Label.ForegroundColor = ConsoleColor.DarkGreen; + StringValue lastNameControl = new StringValue("Last Name:"); + lastNameControl.Label.ForegroundColor = ConsoleColor.DarkGreen; - Int32View ageView = new Int32View("Age:"); - ageView.Label.ForegroundColor = ConsoleColor.DarkGreen; + Int32Value ageControl = new Int32Value("Age:"); + ageControl.Label.ForegroundColor = ConsoleColor.DarkGreen; - firstNameView.Value = "Joe"; - firstNameView.Write(); + firstNameControl.Value = "Joe"; + firstNameControl.Write(); - lastNameView.Value = "Doe"; - lastNameView.Write(); + lastNameControl.Value = "Doe"; + lastNameControl.Write(); - ageView.Value = 25; - ageView.Write(); + ageControl.Value = 25; + ageControl.Write(); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs index 41fcd15a..c594d3c8 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/ValueWriteQuickCommand.cs @@ -25,15 +25,15 @@ internal class ValueWriteQuickCommand : ICommand public void Execute() { - StringView.QuickWrite("First Name:", "John"); - StringView.QuickWrite("Last Name:", "Doe"); - Int32View.QuickWrite("Age:", 25); + StringValue.QuickWrite("First Name:", "John"); + StringValue.QuickWrite("Last Name:", "Doe"); + Int32Value.QuickWrite("Age:", 25); // or - ValueView.QuickWrite("First Name:", "John"); - ValueView.QuickWrite("Last Name:", "Doe"); - ValueView.QuickWrite("Age:", 25); + ValueControl.QuickWrite("First Name:", "John"); + ValueControl.QuickWrite("Last Name:", "Doe"); + ValueControl.QuickWrite("Age:", 25); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs index 67a4e664..0b850b0a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCancelCommand.cs @@ -47,7 +47,7 @@ private static void DisplayAnswer(YesNoAnswer answer) { CustomConsole.WriteLine(); CustomConsole.Write("Your answer: "); - CustomConsole.WriteLineEmphasies(answer); + CustomConsole.WriteLineEmphasized(answer); CustomConsole.WriteLine(); } } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs index 4ee36ae7..fc5b14b1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Commands/YesNoCommand.cs @@ -42,7 +42,7 @@ private static void DisplayAnswer(YesNoAnswer answer) { CustomConsole.WriteLine(); CustomConsole.Write("Your answer: "); - CustomConsole.WriteLineEmphasies(answer); + CustomConsole.WriteLineEmphasized(answer); CustomConsole.WriteLine(); } } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs index 9e0b3223..ab0146ba 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/MainMenu.cs @@ -32,7 +32,7 @@ public MainMenu() AddItems(menuItems); } - private IEnumerable CreateMenuItems() + private static IEnumerable CreateMenuItems() { return new List { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs index 7c795f8c..3fd75655 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.InputControlsDemo/Program.cs @@ -65,8 +65,8 @@ private static void DisplayApplicationHeader() // //stackPanel.Display(); - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - InputControls"); - CustomConsole.WriteLineEmphasies("==============================================================================="); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - InputControls"); + CustomConsole.WriteLineEmphasized("==============================================================================="); CustomConsole.WriteLine(); CustomConsole.WriteLine("This demo shows the usage of the input controls (text and list)."); CustomConsole.WriteLine(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs index 752fa2ed..2bfe8edc 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.Musical/Program.cs @@ -34,8 +34,8 @@ private static void Main() private static void DisplayApplicationHeader() { - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - Musical"); - CustomConsole.WriteLineEmphasies("==============================================================================="); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - Musical"); + CustomConsole.WriteLineEmphasized("==============================================================================="); CustomConsole.WriteLine(); CustomConsole.WriteLine("This demo shows how to make sounds in Console."); CustomConsole.WriteLine(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs index a90d8677..fe594807 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ProgressBarDemo/Program.cs @@ -40,7 +40,7 @@ private static void Main() private static void DisplayApplicationHeader() { - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - ProgressBar"); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - ProgressBar"); CustomConsole.WriteLine("==============================================================================="); CustomConsole.WriteLine(); CustomConsole.WriteLine("This demo shows the usage of the ProgressBar control."); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs index 0f3e7892..6ea2e30c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/HelpCommand.cs @@ -30,19 +30,19 @@ public void Execute(CliCommand cliCommand) private static void DisplayHelp() { - CustomConsole.WriteLineEmphasies("Valid commands:"); + CustomConsole.WriteLineEmphasized("Valid commands:"); CustomConsole.WriteLine(); - CustomConsole.WriteEmphasies(" - whale, whales "); + CustomConsole.WriteEmphasized(" - whale, whales "); CustomConsole.WriteLine("- Displays a table with whales."); - CustomConsole.WriteEmphasies(" - prompter "); + CustomConsole.WriteEmphasized(" - prompter "); CustomConsole.WriteLine("- Asks the user to provide a new prompter text."); - CustomConsole.WriteEmphasies(" - help "); + CustomConsole.WriteEmphasized(" - help "); CustomConsole.WriteLine("- Displays this help page"); - CustomConsole.WriteEmphasies(" - quit, q, exit "); + CustomConsole.WriteEmphasized(" - quit, q, exit "); CustomConsole.WriteLine("- Exits the application."); } } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs index 37c6a43a..b6678432 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Commands/PrompterCommand.cs @@ -42,8 +42,8 @@ public void Execute(CliCommand cliCommand) private void ChangePrompter() { - ValueView valueView = new ValueView("New Prompter Text:"); - prompter.Text = valueView.Read(); + ValueControl valueControl = new ValueControl("New Prompter Text:"); + prompter.Text = valueControl.Read(); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs index 27a96cf8..706f4ae7 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/Program.cs @@ -31,11 +31,11 @@ private static void Main() private static void DisplayApplicationHeader() { - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - Prompter"); - CustomConsole.WriteLineEmphasies("==============================================================================="); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - Prompter"); + CustomConsole.WriteLineEmphasized("==============================================================================="); CustomConsole.WriteLine(); - CustomConsole.WriteEmphasies("Note: "); + CustomConsole.WriteEmphasized("Note: "); CustomConsole.WriteLine("type 'help' for a list of commands."); CustomConsole.WriteLine(); } diff --git a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs index 450e9997..4360e096 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.ScrollMenuDemo/Program.cs @@ -74,8 +74,8 @@ private static void HandleMenuBeforeDisplay(object sender, EventArgs args) private static void DisplayApplicationHeader() { - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - ScrollMenu"); - CustomConsole.WriteLineEmphasies("==============================================================================="); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - ScrollMenu"); + CustomConsole.WriteLineEmphasized("==============================================================================="); CustomConsole.WriteLine(); CustomConsole.WriteLine("This demo shows how the ScrollMenu can be used."); CustomConsole.WriteLine("Press the up/down arrow keys to navigate through the menu."); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs index 5bf9c123..5aee5bf1 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.SpinnerDemo/Program.cs @@ -40,7 +40,7 @@ private static void Main() private static void DisplayApplicationHeader() { - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - Progress spinner"); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - Progress spinner"); HorizontalLine horizontalLine1 = new HorizontalLine { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Program.cs index 2f4205ff..9f9d51c0 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Program.cs @@ -37,8 +37,8 @@ private static void Main() private static void DisplayApplicationHeader() { - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - TabularData"); - CustomConsole.WriteLineEmphasies(new string('=', 79)); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - TabularData"); + CustomConsole.WriteLineEmphasized(new string('=', 79)); CustomConsole.WriteLine(); CustomConsole.WriteLine("This demo shows how to display data in tables."); CustomConsole.WriteLine(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs index 42d44320..5976b42c 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TextMenuDemo/Program.cs @@ -66,8 +66,8 @@ private static void HandleGameApplicationExited(object sender, EventArgs e) private static void DisplayApplicationHeader() { - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - TextMenu"); - CustomConsole.WriteLineEmphasies("==============================================================================="); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - TextMenu"); + CustomConsole.WriteLineEmphasized("==============================================================================="); CustomConsole.WriteLine(); CustomConsole.WriteLine("This demo shows how the TextMenu can be used."); CustomConsole.WriteLine("Press the up/down arrow keys to navigate through the menu."); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs index 8915e873..90e823bd 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.WriteText/Program.cs @@ -73,7 +73,7 @@ private static void RunColorExample() { CustomConsole.WriteLine("Normal: This is a normal line of text."); CustomConsole.WriteLine(); - CustomConsole.WriteLineEmphasies("Emphasies: But I can also write an emphasized text."); + CustomConsole.WriteLineEmphasized("Emphasies: But I can also write an emphasized text."); CustomConsole.WriteLine(); CustomConsole.WriteLineSuccess("Success: And everything is ok if it finishes well :)"); CustomConsole.WriteLine(); @@ -92,8 +92,8 @@ private static void RunColorExample() private static void DisplayApplicationHeader() { - CustomConsole.WriteLineEmphasies("ConsoleTools Demo - Write Normal/Emphasized/Warning/Error"); - CustomConsole.WriteLineEmphasies("==============================================================================="); + CustomConsole.WriteLineEmphasized("ConsoleTools Demo - Write Normal/Emphasized/Warning/Error"); + CustomConsole.WriteLineEmphasized("==============================================================================="); CustomConsole.WriteLine(); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj index 6f891e6c..e8fcf2cc 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj @@ -13,8 +13,13 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + From d0d12fbd44ea5940bb92d3a82bc89fe60fb6bd26 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 8 Mar 2020 15:30:37 +0200 Subject: [PATCH 23/57] small refactorings --- .../ConsoleTools.Controls.Tables/Column.cs | 6 +++--- .../ColumnList.cs | 5 ++--- .../ConsoleTools.Controls.Tables/DataCell.cs | 4 ++-- .../ConsoleTools.Controls.Tables/DataRow.cs | 20 +++++++++---------- .../DataRowList.cs | 5 ++--- .../HeaderCell.cs | 4 ++-- .../RenderingModel/BottomBorderData.cs | 5 ++--- .../RenderingModel/DataDataSeparator.cs | 5 ++--- .../RenderingModel/DataTopBorder.cs | 5 ++--- .../RenderingModel/HeaderBottomBorder.cs | 5 ++--- .../RenderingModel/HeaderDataSeparator.cs | 5 ++--- .../RenderingModel/HeaderRowX.cs | 4 +--- .../RenderingModel/TitleBottomBorder.cs | 5 ++--- .../RenderingModel/TitleDataSeparator.cs | 5 ++--- .../RenderingModel/TitleHeaderSeparator.cs | 5 ++--- .../RenderingModel/TitleTopBorder.cs | 5 ++--- 16 files changed, 40 insertions(+), 53 deletions(-) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs index 2584d138..14b72884 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs @@ -42,12 +42,12 @@ public class Column public DataGrid ParentDataGrid { get; set; } /// - /// Gets or sets the padding applyed to the left side of every cell. + /// Gets or sets the padding applied to the left side of every cell. /// public int? PaddingLeft { get; set; } /// - /// Gets or sets the padding applyed to the right side of every cell. + /// Gets or sets the padding applied to the right side of every cell. /// public int? PaddingRight { get; set; } @@ -78,7 +78,7 @@ public Column(string header) /// /// Initializes a new instance of the class with - /// the a name and the horizontal alignment applyed to the cells represented by the column. + /// the a name and the horizontal alignment applied to the cells represented by the column. /// public Column(string header, HorizontalAlignment horizontalAlignment) { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs index a26da2d3..16b08a03 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs @@ -58,8 +58,7 @@ public class ColumnList : IEnumerable /// The table that owns the new instance. public ColumnList(DataGrid parentDataGrid) { - if (parentDataGrid == null) throw new ArgumentNullException(nameof(parentDataGrid)); - this.parentDataGrid = parentDataGrid; + this.parentDataGrid = parentDataGrid ?? throw new ArgumentNullException(nameof(parentDataGrid)); } /// @@ -136,7 +135,7 @@ public void RenderHeaderRow(ITablePrinter tablePrinter, List cellWidths, in } /// - /// Returns an enumerator that iterates through the s containined by the current instance. + /// Returns an enumerator that iterates through the s contained by the current instance. /// public IEnumerator GetEnumerator() { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs index 6692f2c1..7bff5a19 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs @@ -37,12 +37,12 @@ public class DataCell : CellBase public DataRow ParentRow { get; internal set; } /// - /// Gets or sets the padding applyed to the left side of the cell. + /// Gets or sets the padding applied to the left side of the cell. /// public int? PaddingLeft { get; set; } /// - /// Gets or sets the padding applyed to the right side of the cell. + /// Gets or sets the padding applied to the right side of the cell. /// public int? PaddingRight { get; set; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs index 0a938ac9..350890d0 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs @@ -52,12 +52,12 @@ public class DataRow public HorizontalAlignment CellHorizontalAlignment { get; set; } /// - /// Gets or sets the padding applyed to the left side of every cell. + /// Gets or sets the padding applied to the left side of every cell. /// public int? PaddingLeft { get; set; } /// - /// Gets or sets the padding applyed to the right side of every cell. + /// Gets or sets the padding applied to the right side of every cell. /// public int? PaddingRight { get; set; } @@ -126,7 +126,7 @@ public DataRow(params string[] cellContents) /// /// Initializes a new instance of the class with - /// the list of ojects representing the cells content. + /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. public DataRow(IEnumerable cellContents) @@ -140,7 +140,7 @@ public DataRow(IEnumerable cellContents) /// /// Initializes a new instance of the class with - /// the list of ojects representing the cells content. + /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. public DataRow(params MultilineText[] cellContents) @@ -181,7 +181,7 @@ public DataRow(params object[] cellContents) } /// - /// Adds a new cell to the current instace of . + /// Adds a new cell to the current instance of . /// public void AddCell(DataCell cell) { @@ -201,7 +201,7 @@ public void AddCell(DataCell cell) } /// - /// Adds a new cell to the current instace of . + /// Adds a new cell to the current instance of . /// public void AddCell(string cellContent) { @@ -217,7 +217,7 @@ public void AddCell(string cellContent) } /// - /// Adds a new cell to the current instace of . + /// Adds a new cell to the current instance of . /// public void AddCell(MultilineText cellContent) { @@ -233,7 +233,7 @@ public void AddCell(MultilineText cellContent) } /// - /// Adds a new cell to the current instace of . + /// Adds a new cell to the current instance of . /// public void AddCell(object cellContent) { @@ -256,8 +256,8 @@ public void AddCell(object cellContent) /// public DataCell this[int index] { - get { return cells[index]; } - set { cells[index] = value; } + get => cells[index]; + set => cells[index] = value; } /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs index 7f5ccdc2..16d1f8b1 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs @@ -56,8 +56,7 @@ public class DataRowList : IEnumerable /// The table that owns the new instance. public DataRowList(DataGrid parentDataGrid) { - if (parentDataGrid == null) throw new ArgumentNullException(nameof(parentDataGrid)); - this.parentDataGrid = parentDataGrid; + this.parentDataGrid = parentDataGrid ?? throw new ArgumentNullException(nameof(parentDataGrid)); } /// @@ -245,7 +244,7 @@ public void Clear() } /// - /// Returns an enumerator that iterates through the s containined by the current instance. + /// Returns an enumerator that iterates through the s contained by the current instance. /// public IEnumerator GetEnumerator() { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs index 57c21a97..28618ffa 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs @@ -37,12 +37,12 @@ public class HeaderCell : CellBase public Column ParentColumn { get; internal set; } /// - /// Gets or sets the padding applyed to the left side of the cell. + /// Gets or sets the padding applied to the left side of the cell. /// public int? PaddingLeft { get; set; } /// - /// Gets or sets the padding applyed to the right side of the cell. + /// Gets or sets the padding applied to the right side of the cell. /// public int? PaddingRight { get; set; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs index cc141732..c9fa1c6e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs @@ -32,7 +32,7 @@ internal class BottomBorderData public List ColumnsWidths { - get { return columnsWidths; } + get => columnsWidths; set { if (value == columnsWidths) @@ -45,8 +45,7 @@ public List ColumnsWidths public BottomBorderData(BorderTemplate borderTemplate) { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; + this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); } public void Render(ITablePrinter tablePrinter) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs index 0f7c4571..48fd4475 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs @@ -33,7 +33,7 @@ internal class DataDataSeparator public List ColumnsWidths { - get { return columnsWidths; } + get => columnsWidths; set { if (value == columnsWidths) @@ -46,8 +46,7 @@ public List ColumnsWidths public DataDataSeparator(BorderTemplate borderTemplate) { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; + this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); } public void Render(ITablePrinter tablePrinter) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs index 5fb42a3b..3e5584d8 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs @@ -32,7 +32,7 @@ internal class DataTopBorder public List ColumnsWidths { - get { return columnsWidths; } + get => columnsWidths; set { if (value == columnsWidths) @@ -45,8 +45,7 @@ public List ColumnsWidths public DataTopBorder(BorderTemplate borderTemplate) { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; + this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); } public void Render(ITablePrinter tablePrinter) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs index 4cfbbae5..331d0a05 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs @@ -32,7 +32,7 @@ internal class HeaderBottomBorder public List ColumnsWidths { - get { return columnsWidths; } + get => columnsWidths; set { if (value == columnsWidths) @@ -45,8 +45,7 @@ public List ColumnsWidths public HeaderBottomBorder(BorderTemplate borderTemplate) { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; + this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); } public void Render(ITablePrinter tablePrinter) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs index 6cb4b8f7..c092011f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs @@ -33,7 +33,7 @@ internal class HeaderDataSeparator public List ColumnsWidths { - get { return columnsWidths; } + get => columnsWidths; set { if (value == columnsWidths) @@ -46,8 +46,7 @@ public List ColumnsWidths public HeaderDataSeparator(BorderTemplate borderTemplate) { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; + this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); } public void Render(ITablePrinter tablePrinter) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs index 7070c757..adde95ca 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs @@ -34,9 +34,7 @@ internal class HeaderRowX public HeaderRowX(ColumnList columns, bool hasBorder) { - if (columns == null) throw new ArgumentNullException(nameof(columns)); - - this.columns = columns; + this.columns = columns ?? throw new ArgumentNullException(nameof(columns)); this.hasBorder = hasBorder; CreateCells(); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs index dc4ea160..272f5107 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs @@ -31,7 +31,7 @@ internal class TitleBottomBorder public int Width { - get { return width; } + get => width; set { if (value == width) @@ -44,8 +44,7 @@ public int Width public TitleBottomBorder(BorderTemplate borderTemplate) { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; + this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); } public void Render(ITablePrinter tablePrinter) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs index 6158c301..4afcb9be 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs @@ -33,7 +33,7 @@ internal class TitleDataSeparator public List ColumnsWidths { - get { return columnsWidths; } + get => columnsWidths; set { if (value == columnsWidths) @@ -46,8 +46,7 @@ public List ColumnsWidths public TitleDataSeparator(BorderTemplate borderTemplate) { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; + this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); } public void Render(ITablePrinter tablePrinter) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs index 749796e2..6974eaf9 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs @@ -33,7 +33,7 @@ internal class TitleHeaderSeparator public List ColumnsWidths { - get { return columnsWidths; } + get => columnsWidths; set { if (value == columnsWidths) @@ -46,8 +46,7 @@ public List ColumnsWidths public TitleHeaderSeparator(BorderTemplate borderTemplate) { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; + this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); } public void Render(ITablePrinter tablePrinter) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs index 24592701..119179a5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs @@ -31,7 +31,7 @@ internal class TitleTopBorder public int Width { - get { return width; } + get => width; set { if (value == width) @@ -44,8 +44,7 @@ public int Width public TitleTopBorder(BorderTemplate borderTemplate) { - if (borderTemplate == null) throw new ArgumentNullException(nameof(borderTemplate)); - this.borderTemplate = borderTemplate; + this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); } public void Render(ITablePrinter tablePrinter) From d3c11a660bd8ad0b35f84f3f17af376a3e89793c Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Mon, 9 Mar 2020 15:47:56 +0200 Subject: [PATCH 24/57] moved the core classes related to controls into the Controls namespace. --- doc/changelog.txt | 3 ++- .../InputControls/ValueList.cs | 16 ++++++++-------- .../{ => Controls}/AlignedText.cs | 0 .../BlockControl.MarginsAndPaddings.cs | 0 .../BlockControl.WidthAndAlignment.cs | 0 .../{ => Controls}/BlockControl.cs | 0 .../ConsoleTools.Core/{ => Controls}/Control.cs | 0 .../{ => Controls}/ControlDisplay.cs | 0 .../{ => Controls}/ControlLayout.cs | 0 .../{ => Controls}/ErasableControl.cs | 0 .../{ => Controls}/HorizontalAlignment.cs | 0 .../{ => Controls}/IRepeatableSupport.cs | 0 .../{ => Controls}/InlineControl.cs | 0 .../{ => Controls}/InlineTextBlock.cs | 0 .../ConsoleTools.Core/{ => Controls}/Location.cs | 0 .../{ => Controls}/LongRunningControl.cs | 0 .../{ => Controls}/MultilineText.cs | 0 .../ConsoleTools.Core/{ => Controls}/Size.cs | 0 .../{ => Controls}/Thickness.cs | 0 19 files changed, 10 insertions(+), 9 deletions(-) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/AlignedText.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/BlockControl.MarginsAndPaddings.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/BlockControl.WidthAndAlignment.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/BlockControl.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/Control.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/ControlDisplay.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/ControlLayout.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/ErasableControl.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/HorizontalAlignment.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/IRepeatableSupport.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/InlineControl.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/InlineTextBlock.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/Location.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/LongRunningControl.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/MultilineText.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/Size.cs (100%) rename sources/ConsoleTools/ConsoleTools.Core/{ => Controls}/Thickness.cs (100%) diff --git a/doc/changelog.txt b/doc/changelog.txt index b15f1f88..22f5b0db 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -5,9 +5,10 @@ Note: For any bug or feature request please add a new issue on GitHub: https://g ver next --------- -- CustomConsole - removed the methods for building and writing a horizontal line. +- CustomConsole: removed the methods for building and writing a horizontal line. - ApplicationHeader: Added new control. - Splitted the library in multiple assemblies. +- Breaking changes: Renamed multiple controls and moved them in other namespaces. ver 0.5.4 --------- diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs index 8aa9eaa8..807faa83 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs @@ -34,7 +34,7 @@ public class ValueList : BlockControl /// /// Gets or sets a value that specifies if the control should read or write the list represented by the property. /// - public ReadWriteMode ReadWriteMode { get; set; } = ReadWriteMode.Unknown; + public ReadWriteMode ReadWriteMode { get; set; } = ReadWriteMode.Read; /// /// Gets or sets the label text to be displayed before the content. @@ -165,20 +165,20 @@ private void ReadAllValues() { Values = new List(); - string leftpart = BuildItemLeftPart(); + string leftPart = BuildItemLeftPart(); while (true) { int cursorLeft = Console.CursorLeft; int cursorTop = Console.CursorTop; - CustomConsole.Write(leftpart); + CustomConsole.Write(leftPart); string rawValue = Console.ReadLine(); if (string.IsNullOrEmpty(rawValue)) { Console.SetCursorPosition(cursorLeft, cursorTop); - string emptyText = new string(' ', leftpart.Length); + string emptyText = new string(' ', leftPart.Length); Console.Write(emptyText); Console.SetCursorPosition(cursorLeft, cursorTop); break; @@ -229,17 +229,17 @@ private string BuildItemLeftPart() private void WriteAllValues() { - string leftpart = BuildItemLeftPart(); + string leftPart = BuildItemLeftPart(); foreach (T value in Values) { - CustomConsole.Write(leftpart); + CustomConsole.Write(leftPart); CustomConsole.WriteLine(value); } } /// - /// Reads a list of values from the console using a with default configuration. + /// Reads a list of values from the console using a with default configuration. /// /// The label text to be displayed. /// The value read from the console. @@ -253,7 +253,7 @@ public static List QuickRead(string label = null) } /// - /// Reads a list of values from the console using a with default configuration. + /// Reads a list of values from the console using a with default configuration. /// /// The label text to be displayed. /// The list of values to be displayed. diff --git a/sources/ConsoleTools/ConsoleTools.Core/AlignedText.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/AlignedText.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/BlockControl.MarginsAndPaddings.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/BlockControl.MarginsAndPaddings.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/BlockControl.WidthAndAlignment.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/BlockControl.WidthAndAlignment.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/BlockControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/BlockControl.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/Control.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/Control.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/ControlDisplay.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/ControlDisplay.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/ControlLayout.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/ControlLayout.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/ErasableControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/ErasableControl.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/HorizontalAlignment.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/HorizontalAlignment.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/IRepeatableSupport.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/IRepeatableSupport.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/InlineControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/InlineControl.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/InlineTextBlock.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/InlineTextBlock.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/Location.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/Location.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/LongRunningControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/LongRunningControl.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/MultilineText.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/MultilineText.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/Size.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/Size.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs diff --git a/sources/ConsoleTools/ConsoleTools.Core/Thickness.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Core/Thickness.cs rename to sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs From 8414ed57f042dbd2085cc94093211c766efc18e8 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Fri, 27 Mar 2020 14:12:00 +0200 Subject: [PATCH 25/57] added ConsoleInputMode and ConsoleOutputMode classes --- .../ConsoleTools.Controls.Tables/DataGrid.cs | 85 ++++----------- .../DataGridBuilderFromDataTable.cs | 29 +++++ .../DataGridBuilderFromObject.cs | 74 +++++++++++++ .../ConsoleTools.Controls/Pause.cs | 2 +- .../Advanced/ConsoleInputMode.cs | 102 ++++++++++++++++++ .../Advanced/ConsoleOutputMode.cs | 82 ++++++++++++++ .../ConsoleTools.Core/Advanced/Kernel32.cs | 17 +++ .../Advanced/StandardHandleType.cs | 9 ++ .../Controls/ControlDisplay.cs | 23 +++- .../ApplicationHeader.cs | 84 +++++++++++++++ .../CommandBase.cs | 35 ++++++ .../Commands/BackgroundColorCommand.cs | 35 ++++++ .../Commands/CustomMarginsCommand.cs | 36 +++++++ .../Commands/CustomPaddingsCommand.cs | 36 +++++++ .../Commands/CustomUnlockKeyCommand.cs | 36 +++++++ .../Commands/DefaultCommand.cs | 30 ++++++ .../Commands/ErasablePauseCommand.cs | 34 ++++++ .../Commands/ForegroundColorCommand.cs | 35 ++++++ ...ConsoleTools.Demo.PauseDemo.NetCore.csproj | 20 ++++ .../DummyText.cs | 33 ++++++ .../KeyValueControl.cs | 40 +++++++ .../Program.cs | 64 +++++++++++ .../Program2.cs | 91 ++++++++++++++++ sources/ConsoleTools/ConsoleTools.sln | 19 +++- 24 files changed, 982 insertions(+), 69 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Core/Advanced/ConsoleInputMode.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Core/Advanced/ConsoleOutputMode.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Core/Advanced/Kernel32.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Core/Advanced/StandardHandleType.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ApplicationHeader.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/CommandBase.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/BackgroundColorCommand.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomMarginsCommand.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomPaddingsCommand.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomUnlockKeyCommand.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/DefaultCommand.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/ErasablePauseCommand.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/ForegroundColorCommand.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/DummyText.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/KeyValueControl.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program2.cs diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index bed091ff..0697e820 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -22,8 +22,6 @@ using System; using System.Collections.Generic; using System.Data; -using System.Linq; -using System.Reflection; using DustInTheWind.ConsoleTools.Controls.Tables.Printers; using DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel; @@ -280,80 +278,37 @@ public override string ToString() /// The newly created instance. public static DataGrid BuildFrom(DataTable dataTable) { - DataGrid dataGrid = new DataGrid(dataTable.TableName); + if (dataTable == null) throw new ArgumentNullException(nameof(dataTable)); - foreach (DataColumn dataColumn in dataTable.Columns) - { - string columnHeader = string.IsNullOrEmpty(dataColumn.Caption) - ? dataColumn.ColumnName - : dataColumn.Caption; - - dataGrid.Columns.Add(columnHeader); - } - - foreach (System.Data.DataRow dataRow in dataTable.Rows) - { - DataRow row = new DataRow(dataRow.ItemArray); - dataGrid.Rows.Add(row); - } - - return dataGrid; + DataGridBuilderFromDataTable builder = new DataGridBuilderFromDataTable(dataTable); + return builder.DataGrid; } + /// + /// Creates a new instance of the and populates it with the + /// fields and properties from the specified collection of objects. + /// + /// The type of the objects used to populate the . + /// The collection of objects to be added to the . + /// The newly created instance. public static DataGrid BuildFrom(IEnumerable data) { if (data == null) throw new ArgumentNullException(nameof(data)); - Type type = typeof(T); - - DataGrid dataGrid = new DataGrid(type.Name); + DataGridBuilderFromObject builder = new DataGridBuilderFromObject(typeof(T)); + builder.Add(data); - List members = new List(); - - FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public); - - foreach (FieldInfo fieldInfo in fields) - { - dataGrid.Columns.Add(fieldInfo.Name); - members.Add(fieldInfo); - } + return builder.DataGrid; + } - IEnumerable properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public) - .Where(x => x.CanRead); + public static DataGrid BuildFrom(T data) + { + if (data == null) throw new ArgumentNullException(nameof(data)); - foreach (PropertyInfo propertyInfo in properties) - { - dataGrid.Columns.Add(propertyInfo.Name); - members.Add(propertyInfo); - } + DataGridBuilderFromObject builder = new DataGridBuilderFromObject(typeof(T)); + builder.Add(data); - foreach (T item in data) - { - DataRow dataRow = new DataRow(); - - foreach (MemberInfo memberInfo in members) - { - switch (memberInfo) - { - case FieldInfo fieldInfo: - { - object value = fieldInfo.GetValue(item); - dataRow.AddCell(value); - break; - } - case PropertyInfo propertyInfo: - { - object value = propertyInfo.GetValue(item); - dataRow.AddCell(value); - break; - } - } - } - - dataGrid.Rows.Add(dataRow); - } - - return dataGrid; + return builder.DataGrid; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs new file mode 100644 index 00000000..e142d93b --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs @@ -0,0 +1,29 @@ +using System.Data; + +namespace DustInTheWind.ConsoleTools.Controls.Tables +{ + internal class DataGridBuilderFromDataTable + { + public DataGrid DataGrid { get; } + + public DataGridBuilderFromDataTable(DataTable dataTable) + { + DataGrid = new DataGrid(dataTable.TableName); + + foreach (DataColumn dataColumn in dataTable.Columns) + { + string columnHeader = string.IsNullOrEmpty(dataColumn.Caption) + ? dataColumn.ColumnName + : dataColumn.Caption; + + DataGrid.Columns.Add(columnHeader); + } + + foreach (System.Data.DataRow dataRow in dataTable.Rows) + { + DataRow row = new DataRow(dataRow.ItemArray); + DataGrid.Rows.Add(row); + } + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs new file mode 100644 index 00000000..19a9166c --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +namespace DustInTheWind.ConsoleTools.Controls.Tables +{ + internal class DataGridBuilderFromObject + { + private readonly IEnumerable members; + + public DataGrid DataGrid { get; } + + public DataGridBuilderFromObject(Type type) + { + DataGrid = new DataGrid(type.Name); + + members = EnumerateMembers(type); + + foreach (MemberInfo memberInfo in members) + DataGrid.Columns.Add(memberInfo.Name); + } + + private static IEnumerable EnumerateMembers(IReflect type) + { + FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public); + + foreach (FieldInfo fieldInfo in fields) + yield return fieldInfo; + + IEnumerable properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public) + .Where(x => x.CanRead); + + foreach (PropertyInfo propertyInfo in properties) + yield return propertyInfo; + } + + public void Add(IEnumerable items) + { + foreach (object item in items) + Add(item); + } + + public void Add(object item) + { + if (item == null) + return; + + DataRow dataRow = new DataRow(); + + foreach (MemberInfo memberInfo in members) + { + switch (memberInfo) + { + case FieldInfo fieldInfo: + { + object value = fieldInfo.GetValue(item); + dataRow.AddCell(value); + break; + } + case PropertyInfo propertyInfo: + { + object value = propertyInfo.GetValue(item); + dataRow.AddCell(value); + break; + } + } + } + + DataGrid.Rows.Add(dataRow); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs index f02dc6ac..9b9726b0 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs @@ -94,7 +94,7 @@ protected override void OnAfterDisplay() Console.SetCursorPosition(oldCursorLeft, oldCursorTop); base.OnAfterDisplay(); - } + } private void WaitForUnlockKey() { diff --git a/sources/ConsoleTools/ConsoleTools.Core/Advanced/ConsoleInputMode.cs b/sources/ConsoleTools/ConsoleTools.Core/Advanced/ConsoleInputMode.cs new file mode 100644 index 00000000..2b4ab9f8 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Core/Advanced/ConsoleInputMode.cs @@ -0,0 +1,102 @@ +using System; + +namespace DustInTheWind.ConsoleTools.Advanced +{ + public class ConsoleInputMode + { + private readonly IntPtr consoleHandle; + + private const int ENABLE_PROCESSED_INPUT = 0x0001; + private const int ENABLE_LINE_INPUT = 0x0002; + private const int ENABLE_ECHO_INPUT = 0x0004; + private const int ENABLE_WINDOW_INPUT = 0x0008; + private const int ENABLE_MOUSE_INPUT = 0x0010; + private const int ENABLE_INSERT_MODE = 0x0020; + private const int ENABLE_QUICK_EDIT_MODE = 0x0040; + private const int ENABLE_VIRTUAL_TERMINAL_INPUT = 0x0200; + + public uint Value + { + get + { + uint rawValue = 0; + Kernel32.GetConsoleMode(consoleHandle, ref rawValue); + + return rawValue; + } + set => Kernel32.SetConsoleMode(consoleHandle, value); + } + + public bool IsEnableProcessedInput + { + get => GetFlagValue(ENABLE_PROCESSED_INPUT); + set => SetFlagValue(ENABLE_PROCESSED_INPUT, value); + } + + public bool IsEnableLineInput + { + get => GetFlagValue(ENABLE_LINE_INPUT); + set => SetFlagValue(ENABLE_LINE_INPUT, value); + } + + public bool IsEnableEchoInput + { + get => GetFlagValue(ENABLE_ECHO_INPUT); + set => SetFlagValue(ENABLE_ECHO_INPUT, value); + } + + public bool IsEnableWindowInput + { + get => GetFlagValue(ENABLE_WINDOW_INPUT); + set => SetFlagValue(ENABLE_WINDOW_INPUT, value); + } + + public bool IsEnableMouseInput + { + get => GetFlagValue(ENABLE_MOUSE_INPUT); + set => SetFlagValue(ENABLE_MOUSE_INPUT, value); + } + + public bool IsEnableInsertMode + { + get => GetFlagValue(ENABLE_INSERT_MODE); + set => SetFlagValue(ENABLE_INSERT_MODE, value); + } + + public bool IsEnableQuickEditMode + { + get => GetFlagValue(ENABLE_QUICK_EDIT_MODE); + set => SetFlagValue(ENABLE_QUICK_EDIT_MODE, value); + } + + public bool IsEnableVirtualTerminalInput + { + get => GetFlagValue(ENABLE_VIRTUAL_TERMINAL_INPUT); + set => SetFlagValue(ENABLE_VIRTUAL_TERMINAL_INPUT, value); + } + + public ConsoleInputMode() + { + consoleHandle = Kernel32.GetStdHandle(StandardHandleType.STD_INPUT_HANDLE); + + // check for null + + // check for errors + // if consoleHandle == INVALID_HANDLE_VALUE; + // GetLastError + } + + private bool GetFlagValue(uint flag) + { + return (Value & flag) == flag; + } + + private void SetFlagValue(uint flag, bool value) + { + if (value) + Value |= flag; + else + Value &= ~flag; + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Core/Advanced/ConsoleOutputMode.cs b/sources/ConsoleTools/ConsoleTools.Core/Advanced/ConsoleOutputMode.cs new file mode 100644 index 00000000..2d6df46c --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Core/Advanced/ConsoleOutputMode.cs @@ -0,0 +1,82 @@ +using System; + +namespace DustInTheWind.ConsoleTools.Advanced +{ + /// + /// https://docs.microsoft.com/en-us/windows/console/console-handles + /// + /// https://docs.microsoft.com/en-us/windows/console/getstdhandle + /// https://docs.microsoft.com/en-us/windows/console/getconsolemode + /// https://docs.microsoft.com/en-us/windows/console/setconsolemode + /// + public class ConsoleOutputMode + { + private readonly IntPtr consoleHandle; + + private const uint ENABLE_PROCESSED_OUTPUT = 0x0001; + private const uint ENABLE_WRAP_AT_EOL_OUTPUT = 0x0002; + private const uint ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004; + private const uint DISABLE_NEWLINE_AUTO_RETURN = 0x0008; + private const uint ENABLE_LVB_GRID_WORLDWIDE = 0x0010; + + public uint Value + { + get + { + uint rawValue = 0; + Kernel32.GetConsoleMode(consoleHandle, ref rawValue); + + return rawValue; + } + set => Kernel32.SetConsoleMode(consoleHandle, value); + } + + public bool IsEnableProcessedOutput + { + get => GetFlagValue(ENABLE_PROCESSED_OUTPUT); + set => SetFlagValue(ENABLE_PROCESSED_OUTPUT, value); + } + + public bool IsEnableWrapAtEolOutput + { + get => GetFlagValue(ENABLE_WRAP_AT_EOL_OUTPUT); + set => SetFlagValue(ENABLE_WRAP_AT_EOL_OUTPUT, value); + } + + public bool IsEnableVirtualTerminalProcessing + { + get => GetFlagValue(ENABLE_VIRTUAL_TERMINAL_PROCESSING); + set => SetFlagValue(ENABLE_VIRTUAL_TERMINAL_PROCESSING, value); + } + + public bool IsDisabledNewLineAutoReturn + { + get => GetFlagValue(DISABLE_NEWLINE_AUTO_RETURN); + set => SetFlagValue(DISABLE_NEWLINE_AUTO_RETURN, value); + } + + public bool IsEnableLvbGridWorldwide + { + get => GetFlagValue(ENABLE_LVB_GRID_WORLDWIDE); + set => SetFlagValue(ENABLE_LVB_GRID_WORLDWIDE, value); + } + + public ConsoleOutputMode() + { + consoleHandle = Kernel32.GetStdHandle(StandardHandleType.STD_OUTPUT_HANDLE); + } + + private bool GetFlagValue(uint flag) + { + return (Value & flag) == flag; + } + + private void SetFlagValue(uint flag, bool value) + { + if (value) + Value |= flag; + else + Value &= ~flag; + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Core/Advanced/Kernel32.cs b/sources/ConsoleTools/ConsoleTools.Core/Advanced/Kernel32.cs new file mode 100644 index 00000000..dafa4326 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Core/Advanced/Kernel32.cs @@ -0,0 +1,17 @@ +using System; +using System.Runtime.InteropServices; + +namespace DustInTheWind.ConsoleTools.Advanced +{ + public static class Kernel32 + { + [DllImport("kernel32.dll", EntryPoint = "GetStdHandle", SetLastError = true, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] + public static extern IntPtr GetStdHandle(StandardHandleType nStdHandle); + + [DllImport("kernel32.dll", EntryPoint = "SetConsoleMode", SetLastError = true, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] + public static extern int SetConsoleMode(IntPtr hConsoleHandle, uint dwMode); + + [DllImport("kernel32.dll", EntryPoint = "GetConsoleMode", SetLastError = true, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] + public static extern int GetConsoleMode(IntPtr hConsoleHandle, ref uint dwMode); + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Core/Advanced/StandardHandleType.cs b/sources/ConsoleTools/ConsoleTools.Core/Advanced/StandardHandleType.cs new file mode 100644 index 00000000..fa8730ba --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Core/Advanced/StandardHandleType.cs @@ -0,0 +1,9 @@ +namespace DustInTheWind.ConsoleTools.Advanced +{ + public enum StandardHandleType + { + STD_INPUT_HANDLE = -10, + STD_OUTPUT_HANDLE = -11, + STD_ERROR_HANDLE = -12 + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs index d5f2ef70..874fac75 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs @@ -124,7 +124,7 @@ private bool FillEmptySpace() string rightContentEmptySpace = new string(' ', emptySpaceRight); CustomConsole.Write(rightContentEmptySpace); - bool isConsoleRowFilled = cursorLeft + emptySpaceRight == Console.BufferWidth; + bool isConsoleRowFilled = cursorLeft + emptySpaceRight + paddingRight + marginRight == Console.BufferWidth; return isConsoleRowFilled; } @@ -180,6 +180,27 @@ public void Write(string text) //} } + public void Write(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor, string text) + { + if (text == null) + return; + + if (foregroundColor.HasValue) + { + if (backgroundColor.HasValue) + CustomConsole.Write(foregroundColor.Value, backgroundColor.Value, text); + else + CustomConsole.Write(foregroundColor.Value, text); + } + else + { + if (backgroundColor.HasValue) + CustomConsole.WriteBackgroundColor(backgroundColor.Value, text); + else + CustomConsole.Write(text); + } + } + private void WriteOuterLeftEmptySpace() { int spaces = Layout.OuterEmptySpaceLeft; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ApplicationHeader.cs new file mode 100644 index 00000000..e84ecc90 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ApplicationHeader.cs @@ -0,0 +1,84 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Reflection; +using DustInTheWind.ConsoleTools; +using DustInTheWind.ConsoleTools.Controls; + +namespace ConsoleTools.Demo.PauseDemo.NetCore +{ + internal class ApplicationHeader + { + private TextBlock titleBlock; + private HorizontalLine horizontalLine; + + public string Title { get; set; } + + public ApplicationHeader() + { + InitializeControls(); + } + + private void InitializeControls() + { + titleBlock = new TextBlock + { + ForegroundColor = CustomConsole.EmphasizedColor + }; + + horizontalLine = new HorizontalLine + { + Character = '=', + ForegroundColor = CustomConsole.EmphasizedColor, + Margin = "0 0 0 1" + }; + } + + private static Version GetAssemblyVersion() + { + Assembly assembly = Assembly.GetEntryAssembly(); + AssemblyName assemblyName = assembly.GetName(); + return assemblyName.Version; + } + + private static string GetAssemblyTitle() + { + Assembly assembly = Assembly.GetEntryAssembly(); + AssemblyTitleAttribute assemblyTitleAttribute = assembly.GetCustomAttribute(); + + return assemblyTitleAttribute?.Title; + } + + public void Display() + { + OnBeforeDisplay(); + + titleBlock.Display(); + horizontalLine.Display(); + } + + private void OnBeforeDisplay() + { + string title = Title ?? GetAssemblyTitle(); + + Version version = GetAssemblyVersion(); + string versionAsString = version.ToString(3); + + titleBlock.Text = $"{title} - ver {versionAsString}"; + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/CommandBase.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/CommandBase.cs new file mode 100644 index 00000000..06e85260 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/CommandBase.cs @@ -0,0 +1,35 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Menus; + +namespace ConsoleTools.Demo.PauseDemo.NetCore +{ + internal abstract class CommandBase : ICommand + { + public bool IsActive { get; } = true; + + public abstract string Title { get; } + + public void Execute() + { + DummyText.Display($"- {Title}:", 3); + DoExecute(); + } + + protected abstract void DoExecute(); + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/BackgroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/BackgroundColorCommand.cs new file mode 100644 index 00000000..5d0272b6 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/BackgroundColorCommand.cs @@ -0,0 +1,35 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using DustInTheWind.ConsoleTools.Controls; + +namespace ConsoleTools.Demo.PauseDemo.NetCore.Commands +{ + internal class BackgroundColorCommand : CommandBase + { + public override string Title => "Background Color (Blue)"; + + protected override void DoExecute() + { + Pause pause = new Pause + { + BackgroundColor = ConsoleColor.Blue + }; + pause.Display(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomMarginsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomMarginsCommand.cs new file mode 100644 index 00000000..c5fc6698 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomMarginsCommand.cs @@ -0,0 +1,36 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using DustInTheWind.ConsoleTools.Controls; + +namespace ConsoleTools.Demo.PauseDemo.NetCore.Commands +{ + internal class CustomMarginsCommand : CommandBase + { + public override string Title => "Custom margins (3 3 3 3)"; + + protected override void DoExecute() + { + Pause pause = new Pause + { + Margin = 3, + BackgroundColor = ConsoleColor.DarkGray // Added to easyer see the margins. + }; + pause.Display(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomPaddingsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomPaddingsCommand.cs new file mode 100644 index 00000000..a1ea7cd1 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomPaddingsCommand.cs @@ -0,0 +1,36 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using DustInTheWind.ConsoleTools.Controls; + +namespace ConsoleTools.Demo.PauseDemo.NetCore.Commands +{ + internal class CustomPaddingsCommand : CommandBase + { + public override string Title => "Custom paddings (3 3 3 3)"; + + protected override void DoExecute() + { + Pause pause = new Pause + { + Padding = 3, + BackgroundColor = ConsoleColor.DarkGray // Added to easyer see the paddings. + }; + pause.Display(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomUnlockKeyCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomUnlockKeyCommand.cs new file mode 100644 index 00000000..8a1254f9 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/CustomUnlockKeyCommand.cs @@ -0,0 +1,36 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using DustInTheWind.ConsoleTools.Controls; + +namespace ConsoleTools.Demo.PauseDemo.NetCore.Commands +{ + internal class CustomUnlockKeyCommand : CommandBase + { + public override string Title => "This is the pause with custom Text and custom UnlockKey"; + + protected override void DoExecute() + { + Pause pause = new Pause + { + Text = "Press P key to continue...", + UnlockKey = ConsoleKey.P + }; + pause.Display(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/DefaultCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/DefaultCommand.cs new file mode 100644 index 00000000..e8421fd8 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/DefaultCommand.cs @@ -0,0 +1,30 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls; + +namespace ConsoleTools.Demo.PauseDemo.NetCore.Commands +{ + internal class DefaultCommand : CommandBase + { + public override string Title => "Default Pause"; + + protected override void DoExecute() + { + Pause.QuickDisplay(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/ErasablePauseCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/ErasablePauseCommand.cs new file mode 100644 index 00000000..82db2fa9 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/ErasablePauseCommand.cs @@ -0,0 +1,34 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls; + +namespace ConsoleTools.Demo.PauseDemo.NetCore.Commands +{ + internal class ErasablePauseCommand : CommandBase + { + public override string Title => "This pause will erase itself at the end"; + + protected override void DoExecute() + { + Pause pause = new Pause + { + EraseAfterClose = true + }; + pause.Display(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/ForegroundColorCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/ForegroundColorCommand.cs new file mode 100644 index 00000000..8dcb799f --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Commands/ForegroundColorCommand.cs @@ -0,0 +1,35 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using DustInTheWind.ConsoleTools.Controls; + +namespace ConsoleTools.Demo.PauseDemo.NetCore.Commands +{ + internal class ForegroundColorCommand : CommandBase + { + public override string Title => "Foreground Color (Magenta)"; + + protected override void DoExecute() + { + Pause pause = new Pause + { + ForegroundColor = ConsoleColor.Magenta + }; + pause.Display(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj new file mode 100644 index 00000000..633e61c3 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj @@ -0,0 +1,20 @@ + + + + Exe + netcoreapp3.1 + DustInTheWind.ConsoleTools.Demo.PauseDemo.NetCore + + + + + + + + + + + + + + diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/DummyText.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/DummyText.cs new file mode 100644 index 00000000..4799e9aa --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/DummyText.cs @@ -0,0 +1,33 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System.Threading; +using DustInTheWind.ConsoleTools; + +namespace ConsoleTools.Demo.PauseDemo.NetCore +{ + internal static class DummyText + { + public static void Display(string text, int count) + { + for (int i = 0; i < count; i++) + { + CustomConsole.WriteLine(text); + Thread.Sleep(200); + } + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/KeyValueControl.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/KeyValueControl.cs new file mode 100644 index 00000000..c0d30c5c --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/KeyValueControl.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using DustInTheWind.ConsoleTools; + +namespace ConsoleTools.Demo.PauseDemo.NetCore +{ + internal class KeyValueControl : BlockControl + { + public List> Items { get; set; } + + protected override void DoDisplayContent(ControlDisplay display) + { + foreach ((TKey key, TValue value) in Items) + { + DisplayLine(display, key, value); + } + } + + private static void DisplayLine(ControlDisplay display, object key, object value) + { + display.StartRow(); + display.Write($"{key}: "); + + if (value is bool boolValue) + { + ConsoleColor foregroundColor = boolValue + ? CustomConsole.SuccessColor + : CustomConsole.ErrorColor; + + display.Write(foregroundColor, null, value.ToString()); + } + else + { + display.Write(value.ToString()); + } + + display.EndRow(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program.cs new file mode 100644 index 00000000..570abd27 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program.cs @@ -0,0 +1,64 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using ConsoleTools.Demo.PauseDemo.NetCore.Commands; +using DustInTheWind.ConsoleTools.Controls; +using DustInTheWind.ConsoleTools.Controls.Menus; + +namespace ConsoleTools.Demo.PauseDemo.NetCore +{ + internal class Program + { + private static void Main() + { + Console.SetWindowSize(80, 50); + Console.SetBufferSize(160, 512); + + DisplayApplicationHeader(); + RunDemos(); + + DummyText.Display("- This demo is over.", 3); + Pause.QuickDisplay(); + } + + private static void DisplayApplicationHeader() + { + ApplicationHeader applicationHeader = new ApplicationHeader + { + Title = "ConsoleTools Demo - Pause" + }; + applicationHeader.Display(); + } + + private static void RunDemos() + { + ICommand[] commands = + { + new DefaultCommand(), + new CustomUnlockKeyCommand(), + new ErasablePauseCommand(), + new CustomMarginsCommand(), + new CustomPaddingsCommand(), + new ForegroundColorCommand(), + new BackgroundColorCommand() + }; + + foreach (ICommand command in commands) + command.Execute(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program2.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program2.cs new file mode 100644 index 00000000..38d051d5 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program2.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using DustInTheWind.ConsoleTools; +using DustInTheWind.ConsoleTools.Advanced; +using DustInTheWind.ConsoleTools.Controls; + +namespace ConsoleTools.Demo.PauseDemo.NetCore +{ + internal class Program + { + private static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + + ConsoleOutputMode consoleOutputMode = new ConsoleOutputMode(); + ConsoleInputMode consoleInputMode = new ConsoleInputMode(); + + DisplayObject("ConsoleOutputMode", consoleOutputMode); + + consoleOutputMode.IsEnableVirtualTerminalProcessing = false; + consoleOutputMode.IsDisabledNewLineAutoReturn = true; + + string line = new string('=', 120); + Console.WriteLine(line); + Console.Write(line); + + DisplayObject("ConsoleOutputMode", consoleOutputMode); + + Pause.QuickDisplay(); + } + + private static void DisplayObject(string title, object obj) + { + CustomConsole.WriteLineEmphasized(title); + + IEnumerable> values = EnumerateMembers(obj); + + KeyValueControl control = new KeyValueControl + { + Padding = "0 0 1 0", + BackgroundColor = ConsoleColor.Blue, + Items = values.ToList() + }; + control.Display(); + + //foreach ((string key, object value) in values) + // Display(key, value); + } + + private static void Display(string label, object value) + { + CustomConsole.Write("{0}: ", label); + + if (value is bool boolValue) + if (boolValue) + CustomConsole.WriteLineSuccess(value); + else + CustomConsole.WriteLineError(value); + else + CustomConsole.WriteLine(value); + } + + private static IEnumerable> EnumerateMembers(object obj) + { + Type type = obj.GetType(); + + FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public); + + foreach (FieldInfo fieldInfo in fields) + { + string key = fieldInfo.Name; + object value = fieldInfo.GetValue(obj); + + yield return new KeyValuePair(key, value); + } + + IEnumerable properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public) + .Where(x => x.CanRead); + + foreach (PropertyInfo propertyInfo in properties) + { + string key = propertyInfo.Name; + object value = propertyInfo.GetValue(obj); + + yield return new KeyValuePair(key, value); + } + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index 53ee03e8..843e1bdd 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29709.97 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Tests", "ConsoleTools.Tests\ConsoleTools.Tests.csproj", "{54D61983-996F-436E-A265-01C616099367}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Tests", "ConsoleTools.Tests\ConsoleTools.Tests.csproj", "{54D61983-996F-436E-A265-01C616099367}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{2C2BFA30-8815-4269-AC92-DDE5589BD958}" EndProject @@ -43,7 +43,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Controls", "Co EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Controls.Spinners", "ConsoleTools.Controls.Spinners\ConsoleTools.Controls.Spinners.csproj", "{3C2B6DD0-CF97-4EA7-8565-A338892C0643}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Controls.Menus", "ConsoleTools.Controls.Menus\ConsoleTools.Controls.Menus.csproj", "{439C9C20-BE41-4AE1-83D0-13AF94114EDE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Controls.Menus", "ConsoleTools.Controls.Menus\ConsoleTools.Controls.Menus.csproj", "{439C9C20-BE41-4AE1-83D0-13AF94114EDE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.PauseDemo.NetCore", "ConsoleTools.Demo.PauseDemo.NetCore\ConsoleTools.Demo.PauseDemo.NetCore.csproj", "{1A139874-D3ED-48F0-8AAF-B6390BAF0A23}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -295,6 +297,18 @@ Global {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Release-Net452|Any CPU.Build.0 = Release|Any CPU {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU {439C9C20-BE41-4AE1-83D0-13AF94114EDE}.Release-Net461|Any CPU.Build.0 = Release|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Debug-Net452|Any CPU.ActiveCfg = Debug|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Debug-Net452|Any CPU.Build.0 = Debug|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Debug-Net461|Any CPU.ActiveCfg = Debug|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Debug-Net461|Any CPU.Build.0 = Debug|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Release|Any CPU.Build.0 = Release|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Release-Net452|Any CPU.ActiveCfg = Release|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Release-Net452|Any CPU.Build.0 = Release|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Release-Net461|Any CPU.ActiveCfg = Release|Any CPU + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23}.Release-Net461|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -313,6 +327,7 @@ Global {6513994E-72C8-4C79-81FE-DB35FC190D10} = {2C2BFA30-8815-4269-AC92-DDE5589BD958} {03611F6A-F799-4A07-8288-41BD4BD21C1A} = {2C2BFA30-8815-4269-AC92-DDE5589BD958} {8DD165BA-78C3-48A0-BF61-9673458A260C} = {2C2BFA30-8815-4269-AC92-DDE5589BD958} + {1A139874-D3ED-48F0-8AAF-B6390BAF0A23} = {2C2BFA30-8815-4269-AC92-DDE5589BD958} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {369B843F-38E3-4477-A766-F70718E83926} From 536e8845213796a9864403dacfb105af2afb0f1a Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Wed, 14 Oct 2020 00:38:40 +0300 Subject: [PATCH 26/57] added a ko-fi button in the readme file. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7fca795d..61fb401b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# Donations + +If you like my work and want to support me, you can buy me a coffee: + +[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Y8Y62EZ8H) + # Console Tools A set of tools and "controls" for the .net Console. They help displaying and reading data to/from the user. From c3a745219ef4f996045693024b4ed4b08582a4e8 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Thu, 29 Oct 2020 10:55:20 +0200 Subject: [PATCH 27/57] updated the issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 19 +++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 13 +++++++++++++ .github/issue_template.md | 17 ----------------- 3 files changed, 32 insertions(+), 17 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/issue_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..e24f4f26 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,19 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +# Steps to reproduce +What should I do (step-by-step) to see the bug? + +# Expected behavior +What did you expected to happen? + +# Versions +- ConsoleTools version +- OS version +- .NET version \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..c0533dca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,13 @@ +--- +name: Feature request +about: Suggest an idea of improvement +title: '' +labels: '' +assignees: '' + +--- + +# Description + +# Versions +- ConsoleTools version you are using diff --git a/.github/issue_template.md b/.github/issue_template.md deleted file mode 100644 index 4e2153e9..00000000 --- a/.github/issue_template.md +++ /dev/null @@ -1,17 +0,0 @@ -Note: Please use one of the following templates (Feature Request or Bug Report) and delete the other. - --------------------------------------------------- - -## Feature request - -### Description -### Version (Library version that you are using) - --------------------------------------------------- - -## Bug Report - -### Steps to reproduce -### Actual behavior -### Expected behavior -### Version (Library version where problem was encountered) From 3193f5236b29e938cd0d24801164745fc961badd Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Thu, 29 Oct 2020 10:59:45 +0200 Subject: [PATCH 28/57] created the issue template chooser --- .github/ISSUE_TEMPLATE/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..0378cafa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: GitHub Community Support + url: https://github.community/ + about: Please ask and answer questions here. + - name: GitHub Security Bug Bounty + url: https://bounty.github.com/ + about: Please report security vulnerabilities here. \ No newline at end of file From cb7f1fc8e9b3c5a3e87a1229d28bccb832cd191e Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Thu, 29 Oct 2020 11:15:13 +0200 Subject: [PATCH 29/57] updated config.yml --- .github/ISSUE_TEMPLATE/config.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0378cafa..a49eab2f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1 @@ -blank_issues_enabled: false -contact_links: - - name: GitHub Community Support - url: https://github.community/ - about: Please ask and answer questions here. - - name: GitHub Security Bug Bounty - url: https://bounty.github.com/ - about: Please report security vulnerabilities here. \ No newline at end of file +blank_issues_enabled: true \ No newline at end of file From aa0e6825d464cdf634ed3179cbdc19bd202a16a7 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Thu, 29 Oct 2020 11:31:44 +0200 Subject: [PATCH 30/57] updated the new issue url. --- README.md | 2 +- doc/changelog.txt | 2 +- readme.txt | 2 +- sources/ConsoleTools/AssemblyInfo.Shared.cs | 2 +- .../ActionCommand.cs | 2 +- .../CurrentIndexChangedEventArgs.cs | 2 +- .../ConsoleTools.Controls.Menus/EmptyCommand.cs | 2 +- .../ConsoleTools.Controls.Menus/ICommand.cs | 2 +- .../ConsoleTools.Controls.Menus/IMenuItem.cs | 2 +- .../IPrompterCommand.cs | 2 +- .../MenuItemCollection.cs | 2 +- .../MenuItems/LabelMenuItem.cs | 2 +- .../MenuItems/SeparatorMenuItem.cs | 2 +- .../MenuItems/YesNoMenuItem.cs | 2 +- .../NewCommandEventArgs.cs | 2 +- .../ConsoleTools.Controls.Menus/Prompter.cs | 2 +- .../ConsoleTools.Controls.Menus/PrompterItem.cs | 2 +- .../ConsoleTools.Controls.Menus/ScrollMenu.cs | 2 +- .../ConsoleTools.Controls.Menus/TextMenu.cs | 2 +- .../ConsoleTools.Controls.Menus/TextMenuItem.cs | 2 +- .../UnhandledCommandEventArgs.cs | 2 +- .../UnknownPrompterCommand.cs | 2 +- .../ISpinnerTemplate.cs | 2 +- .../ProgressBar.cs | 2 +- .../ConsoleTools.Controls.Spinners/Spinner.cs | 17 +++++++++++++---- .../Templates/BoomerangSpinnerTemplate.cs | 2 +- .../Templates/BubbleSpinnerTemplate.cs | 2 +- .../Templates/FanSpinnerTemplate.cs | 2 +- .../Templates/FillSpinnerTemplate.cs | 2 +- .../Templates/FilledBehavior.cs | 2 +- .../Templates/HalfBlinkSpinnerTemplate.cs | 2 +- .../Templates/HalfRotateSpinnerTemplate.cs | 2 +- .../Templates/SequenceSpinnerTemplate.cs | 2 +- .../Templates/StickSpinnerTemplate.cs | 2 +- .../ValuePosition.cs | 2 +- .../BorderTemplate.cs | 2 +- .../ConsoleTools.Controls.Tables/CellBase.cs | 2 +- .../ConsoleTools.Controls.Tables/Column.cs | 2 +- .../ConsoleTools.Controls.Tables/ColumnList.cs | 2 +- .../ConsoleTools.Controls.Tables/DataCell.cs | 2 +- .../ConsoleTools.Controls.Tables/DataGrid.cs | 2 +- .../ConsoleTools.Controls.Tables/DataRow.cs | 2 +- .../ConsoleTools.Controls.Tables/DataRowList.cs | 2 +- .../ConsoleTools.Controls.Tables/HeaderCell.cs | 2 +- .../HorizontalSeparatorBuilder.cs | 2 +- .../ITablePrinter.cs | 2 +- .../Printers/ConsoleTablePrinter.cs | 2 +- .../Printers/StreamTablePrinter.cs | 2 +- .../Printers/StringTablePrinter.cs | 2 +- .../RenderingModel/BottomBorderData.cs | 2 +- .../RenderingModel/DataBottomBorder.cs | 2 +- .../RenderingModel/DataCellX.cs | 2 +- .../RenderingModel/DataDataSeparator.cs | 2 +- .../RenderingModel/DataGridX.cs | 2 +- .../RenderingModel/DataGridXBuilder.cs | 2 +- .../RenderingModel/DataRowX.cs | 2 +- .../RenderingModel/DataTopBorder.cs | 2 +- .../RenderingModel/HeaderBottomBorder.cs | 2 +- .../RenderingModel/HeaderDataSeparator.cs | 2 +- .../RenderingModel/HeaderRowX.cs | 2 +- .../RenderingModel/HeaderTopBorder.cs | 2 +- .../RenderingModel/TitleBottomBorder.cs | 2 +- .../RenderingModel/TitleDataSeparator.cs | 2 +- .../RenderingModel/TitleHeaderSeparator.cs | 2 +- .../RenderingModel/TitleRowX.cs | 2 +- .../RenderingModel/TitleTopBorder.cs | 2 +- .../ConsoleTools.Controls.Tables/TitleCell.cs | 2 +- .../ConsoleTools.Controls.Tables/TitleRow.cs | 2 +- .../ConsoleTools.Controls/ApplicationHeader.cs | 2 +- .../ConsoleTools.Controls/ControlRepeater.cs | 2 +- .../ConsoleTools.Controls/HorizontalLine.cs | 2 +- .../InputControls/DoubleValue.cs | 2 +- .../InputControls/DoubleValueList.cs | 2 +- .../InputControls/FloatValue.cs | 2 +- .../InputControls/FloatValueList.cs | 2 +- .../InputControls/Int32Value.cs | 2 +- .../InputControls/Int32ValueList.cs | 2 +- .../InputControls/Int64Value.cs | 2 +- .../InputControls/Int64ValueList.cs | 2 +- .../InputControls/ReadWriteMode.cs | 2 +- .../InputControls/StringValue.cs | 2 +- .../InputControls/StringValueList.cs | 2 +- .../InputControls/ValueControl.cs | 2 +- .../InputControls/ValueList.cs | 2 +- .../InputControls/YesNoAnswer.cs | 2 +- .../InputControls/YesNoQuestion.cs | 2 +- .../ConsoleTools/ConsoleTools.Controls/Label.cs | 2 +- .../MachineLevelGuardian.cs | 2 +- .../Musical/MusicalNote.cs | 2 +- .../Musical/MusicalNoteInfo.cs | 2 +- .../ConsoleTools.Controls/Musical/Sound.cs | 2 +- .../ConsoleTools/ConsoleTools.Controls/Pause.cs | 2 +- .../ConsoleTools.Controls/TextBlock.cs | 2 +- .../TitleDisplayEventArgs.cs | 2 +- .../ConsoleTools.Core/ApplicationInformation.cs | 2 +- .../ConsoleTools.Core/CommandLine/CliCommand.cs | 2 +- .../CommandLine/CliParameter.cs | 2 +- .../ConsoleTools.Core/ConsoleReader.cs | 2 +- .../ConsoleTools.Core/Controls/AlignedText.cs | 2 +- .../Controls/BlockControl.MarginsAndPaddings.cs | 2 +- .../Controls/BlockControl.WidthAndAlignment.cs | 2 +- .../ConsoleTools.Core/Controls/BlockControl.cs | 2 +- .../ConsoleTools.Core/Controls/Control.cs | 2 +- .../ConsoleTools.Core/Controls/ControlLayout.cs | 2 +- .../Controls/ErasableControl.cs | 2 +- .../Controls/HorizontalAlignment.cs | 2 +- .../Controls/IRepeatableSupport.cs | 2 +- .../ConsoleTools.Core/Controls/InlineControl.cs | 2 +- .../Controls/InlineTextBlock.cs | 2 +- .../ConsoleTools.Core/Controls/Location.cs | 2 +- .../Controls/LongRunningControl.cs | 2 +- .../ConsoleTools.Core/Controls/MultilineText.cs | 2 +- .../ConsoleTools.Core/Controls/Size.cs | 2 +- .../ConsoleTools.Core/Controls/Thickness.cs | 2 +- .../ConsoleTools/ConsoleTools.Core/Cursor.cs | 2 +- .../ConsoleTools.Core/CustomConsole.Colors.cs | 2 +- .../CustomConsole.Write.BackgroundColor.cs | 2 +- .../CustomConsole.Write.BothColors.cs | 2 +- .../CustomConsole.Write.ForegroundColor.cs | 2 +- ...ustomConsole.WriteAligned.BackgroundColor.cs | 2 +- .../CustomConsole.WriteAligned.BothColors.cs | 2 +- .../CustomConsole.WriteAligned.DefaultColors.cs | 2 +- ...ustomConsole.WriteAligned.ForegroundColor.cs | 2 +- .../CustomConsole.WriteEmphasies.cs | 2 +- .../CustomConsole.WriteError.cs | 2 +- .../CustomConsole.WriteInverted.cs | 2 +- .../CustomConsole.WriteNormal.cs | 2 +- .../CustomConsole.WriteSuccess.cs | 2 +- .../CustomConsole.WriteWarning.cs | 2 +- .../ConsoleTools.Core/DefaultParent.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Core/ThreeStageFile.cs | 2 +- .../ConsoleTools.Demo.NetCore22/Program.cs | 2 +- .../ConsoleTools.Demo.NetFramework20/Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Demo.NetFramework45/Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools/ConsoleTools.Mvc/Argument.cs | 2 +- .../ConsoleTools/ConsoleTools.Mvc/Arguments.cs | 2 +- .../ConsoleTools.Mvc/ConsoleApplicationBase.cs | 2 +- .../ConsoleFrameworkException.cs | 2 +- .../ConsoleTools/ConsoleTools.Mvc/IUseCase.cs | 2 +- .../ConsoleTools.Mvc/Properties/AssemblyInfo.cs | 2 +- .../ConsoleTools.Mvc/UseCaseCollection.cs | 2 +- .../ConsoleTools.Mvc/UseCaseCollectionItem.cs | 2 +- .../ConsoleTools.Mvc/UseCases/CliCommand.cs | 2 +- .../ConsoleTools.Mvc/UseCases/HelpUseCase.cs | 2 +- .../ConsoleTools.Mvc/UseCases/ICliCommand.cs | 2 +- .../ConsoleTools.Mvc/UseCases/RelayUseCase.cs | 2 +- .../UserControls/ApplicationFooter.cs | 2 +- .../UserControls/UsageControl.cs | 2 +- .../GenerateBottomBorderTests.cs | 2 +- .../GenerateHorizontalSeparator1Tests.cs | 2 +- .../GenerateHorizontalSeparator2Tests.cs | 2 +- .../GenerateTopBorderTests.cs | 2 +- .../BuildFromDataTable/ColumnTests.cs | 2 +- .../BuildFromDataTable/RowTests.cs | 2 +- .../BuildFromDataTable/TitleTests.cs | 2 +- .../DataGridTests/BuildFromList/ColumnTests.cs | 2 +- .../DataGridTests/BuildFromList/RowTests.cs | 2 +- .../DataGridTests/BuildFromList/TitleTests.cs | 2 +- .../AddressBookApplication.cs | 2 +- .../AddressBookModel/AddressBook.cs | 2 +- .../AddressBookModel/Person.cs | 2 +- .../Commands/AddPersonCommand.cs | 2 +- .../Commands/DisplayPersonDetailsCommand.cs | 2 +- .../Commands/DisplayPersonsCommand.cs | 2 +- .../Commands/ExitCommand.cs | 2 +- .../CustomControls/AddPersonView.cs | 2 +- .../CustomControls/PersonView.cs | 2 +- .../CustomControls/PersonsView.cs | 2 +- .../ConsoleTools.Tutorial/MainMenu.cs | 2 +- .../ConsoleTools.Tutorial/Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- 176 files changed, 188 insertions(+), 179 deletions(-) diff --git a/README.md b/README.md index 61fb401b..686892c7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ _**Note**: Until reaching the version 1.0.0 the controls may change dramatically ## Bugs and feature requests -Please add a **[new issue](https://github.com/lastunicorn/ConsoleTools/issues/new)** if: +Please add a **[new issue](https://github.com/lastunicorn/ConsoleTools/issues/new/choose)** if: - you found a bug; - you see an improvement that can be done; - you think of a control that is cool to add. diff --git a/doc/changelog.txt b/doc/changelog.txt index 22f5b0db..38bd4bcb 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,7 +1,7 @@ ConsoleTools ============ -Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose ver next --------- diff --git a/readme.txt b/readme.txt index e913015f..2d1c5661 100644 --- a/readme.txt +++ b/readme.txt @@ -4,4 +4,4 @@ A set of tools and "controls" for the .net Console. It contains: List Input/Output Controls, Text Input/Output Controls, Progress Bar, Spinner, Data Table, Prompter, Menus, etc. -Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new \ No newline at end of file +Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose \ No newline at end of file diff --git a/sources/ConsoleTools/AssemblyInfo.Shared.cs b/sources/ConsoleTools/AssemblyInfo.Shared.cs index 7fdebd17..1e91fc10 100644 --- a/sources/ConsoleTools/AssemblyInfo.Shared.cs +++ b/sources/ConsoleTools/AssemblyInfo.Shared.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Reflection; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ActionCommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ActionCommand.cs index 021971c1..abc2a581 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ActionCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ActionCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/CurrentIndexChangedEventArgs.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/CurrentIndexChangedEventArgs.cs index 807e792d..75f78aae 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/CurrentIndexChangedEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/CurrentIndexChangedEventArgs.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/EmptyCommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/EmptyCommand.cs index 0d7d476f..e39bc5c9 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/EmptyCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/EmptyCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Menus { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ICommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ICommand.cs index ff7388f2..3034e186 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ICommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ICommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Menus { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/IMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/IMenuItem.cs index d81b3fb0..b46e0bcb 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/IMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/IMenuItem.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.ComponentModel; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/IPrompterCommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/IPrompterCommand.cs index 5b3c99db..e8591f66 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/IPrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/IPrompterCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using DustInTheWind.ConsoleTools.CommandLine; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs index a55170cd..245b16f5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItemCollection.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs index d4263928..1bb01f1c 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.ComponentModel; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs index 854925db..0ee09309 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/SeparatorMenuItem.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.ComponentModel; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs index 97e5f04a..d6e368ce 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/YesNoMenuItem.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.ComponentModel; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/NewCommandEventArgs.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/NewCommandEventArgs.cs index 602f87cc..cc761d35 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/NewCommandEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/NewCommandEventArgs.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using DustInTheWind.ConsoleTools.CommandLine; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs index 9437657e..551c6bc3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/Prompter.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/PrompterItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/PrompterItem.cs index ae1f4f40..783e0231 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/PrompterItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/PrompterItem.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using DustInTheWind.ConsoleTools.CommandLine; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ScrollMenu.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ScrollMenu.cs index f3db6b22..27355518 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ScrollMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ScrollMenu.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenu.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenu.cs index 23b8badd..0b480e75 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenu.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuItem.cs index fc86734e..4e6af1f6 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/TextMenuItem.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnhandledCommandEventArgs.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnhandledCommandEventArgs.cs index c323cea1..6ae25f0b 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnhandledCommandEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnhandledCommandEventArgs.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using DustInTheWind.ConsoleTools.CommandLine; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnknownPrompterCommand.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnknownPrompterCommand.cs index 25431d63..c7d258c9 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnknownPrompterCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/UnknownPrompterCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using DustInTheWind.ConsoleTools.CommandLine; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ISpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ISpinnerTemplate.cs index 55ea50b5..2d412e71 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ISpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ISpinnerTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Spinners { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ProgressBar.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ProgressBar.cs index eaf7ac40..0b3eb838 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ProgressBar.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ProgressBar.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Spinner.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Spinner.cs index d5d6859a..33d44d74 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Spinner.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Spinner.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Timers; @@ -46,15 +46,24 @@ public class Spinner : LongRunningControl, IDisposable private string templateText; private bool isDisposed; private readonly Timer timer; + private InlineTextBlock label = new InlineTextBlock(SpinnerResources.DefaultLabelText) + { + MarginRight = 1 + }; /// /// Gets or sets the label displayed in front of the spinner. /// Default value: "Please wait" /// - public InlineTextBlock Label { get; set; } = new InlineTextBlock(SpinnerResources.DefaultLabelText) + public InlineTextBlock Label { - MarginRight = 1 - }; + get => label; + set + { + label = value; + Refresh(); + } + } /// /// Gets or sets a velue that specifies if the text label should be displayed. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BoomerangSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BoomerangSpinnerTemplate.cs index eb2d22b2..fb87366a 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BoomerangSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BoomerangSpinnerTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BubbleSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BubbleSpinnerTemplate.cs index 9b5acb06..8a6c0bbf 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BubbleSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/BubbleSpinnerTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FanSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FanSpinnerTemplate.cs index db3473b8..cbaad4d5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FanSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FanSpinnerTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FillSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FillSpinnerTemplate.cs index 989dbebb..e59502b5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FillSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FillSpinnerTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FilledBehavior.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FilledBehavior.cs index 8abf0b2f..20bab923 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FilledBehavior.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/FilledBehavior.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfBlinkSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfBlinkSpinnerTemplate.cs index c9d86f0d..c1fbab09 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfBlinkSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfBlinkSpinnerTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfRotateSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfRotateSpinnerTemplate.cs index 51fa36b6..fb37bebf 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfRotateSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/HalfRotateSpinnerTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/SequenceSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/SequenceSpinnerTemplate.cs index c49c7edb..04e59be1 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/SequenceSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/SequenceSpinnerTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/StickSpinnerTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/StickSpinnerTemplate.cs index cd2777e8..8e531b29 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/StickSpinnerTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/Templates/StickSpinnerTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Spinners.Templates { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ValuePosition.cs b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ValuePosition.cs index 5e5a0395..fff1dca6 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ValuePosition.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ValuePosition.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Spinners { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/BorderTemplate.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/BorderTemplate.cs index b0942a7f..c0df69d6 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/BorderTemplate.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/BorderTemplate.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs index 008c9845..cb6b593c 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs index 14b72884..bc4fc4b4 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Tables { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs index 16b08a03..b2bab071 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs index 7bff5a19..a3fef791 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Tables { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index 0697e820..6edfb4c0 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs index 350890d0..3644621b 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs index 16d1f8b1..c0c60c8d 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs index 28618ffa..8458934f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Tables { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HorizontalSeparatorBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HorizontalSeparatorBuilder.cs index c2707303..c277b74e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HorizontalSeparatorBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HorizontalSeparatorBuilder.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs index 602a8973..a75ffd4c 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Tables { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs index e657e499..790b97f7 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs index 9955cf41..29197600 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.IO; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs index 61834529..335618e8 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Text; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs index c9fa1c6e..7c45146b 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs index b2f83ab7..b38a80e7 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs index ca715679..0f724e79 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs index 48fd4475..5113f297 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs index edcdd52e..12a1c4a3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using System.Linq; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index cb377df7..c582e3e5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using System.Linq; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs index ee2db1d0..64716e59 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs index 3e5584d8..73929d46 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs index 331d0a05..acb285c3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs index c092011f..e2ef1316 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs index adde95ca..391b0bb7 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs index 991fd367..2f9df721 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs index 272f5107..c062c5e4 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs index 4afcb9be..0db42bc8 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs index 6974eaf9..ba29d593 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs index d8d50434..c0b4bff9 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs index 119179a5..cf9795a9 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs index 9b99191d..ae1fbb83 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Tables { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs index 2bd8d76c..9895f68d 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs b/sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs index b4ed1bda..866d2397 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/ApplicationHeader.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Reflection; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs b/sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs index fbe9212f..56ca0120 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/ControlRepeater.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs b/sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs index af1d5834..c864c487 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/HorizontalLine.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValue.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValue.cs index a149fc1b..d2558b3c 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValue.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValue.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValueList.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValueList.cs index d19a14ba..fd4cedba 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValueList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/DoubleValueList.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValue.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValue.cs index 2621486c..28144bcd 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValue.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValue.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValueList.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValueList.cs index 8c4e5c26..bd5a1037 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValueList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/FloatValueList.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32Value.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32Value.cs index 591082c4..8d92f961 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32Value.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32Value.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ValueList.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ValueList.cs index 775a269b..fc125a00 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ValueList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int32ValueList.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64Value.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64Value.cs index 52fe4e96..54299316 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64Value.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64Value.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ValueList.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ValueList.cs index 022a28d8..83c92683 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ValueList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/Int64ValueList.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs index fc23a9cf..af7c350a 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ReadWriteMode.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValue.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValue.cs index a7f38fe3..e20850cc 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValue.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValue.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValueList.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValueList.cs index 3990fcd9..ecacd755 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValueList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/StringValueList.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueControl.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueControl.cs index 079ce0d7..167ef1a5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueControl.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs index 807faa83..72d8accc 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/ValueList.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs index 3f598346..7175a2d6 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoAnswer.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.InputControls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs index 2d7ca436..9603c5f7 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/InputControls/YesNoQuestion.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Text; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Label.cs b/sources/ConsoleTools/ConsoleTools.Controls/Label.cs index 7e4849d5..9e17321b 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Label.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Label.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs b/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs index c6ceb803..816ba0e2 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/MachineLevelGuardian.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Threading; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs index 1f3d7f01..0ac5cd24 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNote.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Musical { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs index 1c3ce69f..c9c2dfc2 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/MusicalNoteInfo.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Controls.Musical { diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs b/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs index e46580b3..dd177786 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Musical/Sound.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs index 9b9726b0..b7f111b7 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs b/sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs index 358bf191..60dcc989 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/TextBlock.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs b/sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs index b33076c8..d5304146 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/TitleDisplayEventArgs.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/newusing System; +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs b/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs index d04502f9..1a338258 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Linq; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliCommand.cs b/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliCommand.cs index a2acd7c3..2f89a3b1 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliParameter.cs b/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliParameter.cs index b1dd773e..1f22e7a2 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliParameter.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CommandLine/CliParameter.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.CommandLine { diff --git a/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs b/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs index e9c1fbc6..cec936c1 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ConsoleReader.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Threading; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs index f9d6cae3..2f11cdfe 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Text; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs index b20b9174..d85ab355 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs index a8d3ef81..3901c63e 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs index a5b9b3ae..a4c72a8d 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs index 84df6604..4806fa34 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs index 07e82c55..91bf1b97 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs index f0d6ac10..0f982f8e 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs index 7a970c55..94363039 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools { diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs index 7dd9bc94..20a6c46e 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs index e71bbe2b..ea4c3ec9 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs index dcb99f69..a7d3a5aa 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs index 90fb6bb3..ab2dfef4 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Globalization; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs index bcb20d9c..230f9a00 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs index 4215972e..c2c69794 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs index 0d1167b1..f4daa2b9 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Globalization; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs index 6192b7e9..4d132771 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Globalization; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Cursor.cs b/sources/ConsoleTools/ConsoleTools.Core/Cursor.cs index caeedf84..0c69eb4c 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Cursor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Cursor.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Colors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Colors.cs index 4e1431af..67a4a778 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Colors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Colors.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BackgroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BackgroundColor.cs index 01303a82..dc5b1864 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BackgroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BackgroundColor.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs index 08701d25..71bfe520 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs index 93dfc373..5040b96a 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs index bc0d22ce..14a3bf13 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs index d69c5c1f..b17ad38e 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs index 94d2ee1f..e234d8b5 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs index b4865bc1..52f86821 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs index 6438783b..199bb5ed 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteEmphasies.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteError.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteError.cs index 3e10530f..dd652bd9 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteError.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteError.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteInverted.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteInverted.cs index 8f4a0184..775dbf51 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteInverted.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteInverted.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteNormal.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteNormal.cs index 12a24fb4..795ff661 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteNormal.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteNormal.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteSuccess.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteSuccess.cs index 8050b30d..ab3126ab 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteSuccess.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteSuccess.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteWarning.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteWarning.cs index 6eb7dd2a..a69bba0b 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteWarning.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteWarning.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Core/DefaultParent.cs b/sources/ConsoleTools/ConsoleTools.Core/DefaultParent.cs index cb2dd6e6..ccabde35 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/DefaultParent.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/DefaultParent.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools { diff --git a/sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs index 7b46c704..f312d496 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Reflection; using System.Runtime.InteropServices; diff --git a/sources/ConsoleTools/ConsoleTools.Core/ThreeStageFile.cs b/sources/ConsoleTools/ConsoleTools.Core/ThreeStageFile.cs index f534db26..85e68b5d 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ThreeStageFile.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ThreeStageFile.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.IO; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/Program.cs index 1dc53b79..aec4bd64 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetCore22/Program.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Demo.NetCore22 { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Program.cs index 3b48ed34..01fea293 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Program.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Properties/AssemblyInfo.cs index 573e8be0..1c256c21 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework20/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Reflection; using System.Runtime.CompilerServices; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Program.cs index 2dc80adf..c6ce8e95 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Program.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Demo.NetFramework45 { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Properties/AssemblyInfo.cs index b6af1f40..2142cb06 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework45/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Reflection; using System.Runtime.InteropServices; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Program.cs index 79ee50a1..855cf476 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Program.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Demo.NetFramework461 { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Properties/AssemblyInfo.cs index f321382b..22d3dd10 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.NetFramework461/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Reflection; using System.Runtime.CompilerServices; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs index 1875fb88..9c67951e 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/Argument.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs index 7b88bab3..ea222dd9 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/Arguments.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs index d2e7c9be..963e495c 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleApplicationBase.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs index 21488b67..31172363 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleFrameworkException.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Runtime.Serialization; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs index 9174f3c1..35fa93ff 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/IUseCase.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Mvc { diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs index 346b034b..f47eb0d8 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Reflection; using System.Runtime.InteropServices; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs index 54fbdca9..99761153 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollection.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.ObjectModel; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs index e0cab5c8..848f566a 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCaseCollectionItem.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs index 96c22ab1..1c69905c 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/CliCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Mvc.UseCases { diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs index 7aa680d5..050fdc0a 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/HelpUseCase.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs index ea225a21..88542be4 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/ICliCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Mvc.UseCases { diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs index a2efe185..b8c03ecd 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UseCases/RelayUseCase.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Mvc.UseCases { diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs index 432747dd..d10f1e7c 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/ApplicationFooter.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose namespace DustInTheWind.ConsoleTools.Mvc.UserControls { diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs index 96622f31..3fbd547e 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Mvc/UserControls/UsageControl.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs index 6f8b3c4b..6a6a9faf 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using DustInTheWind.ConsoleTools.Controls.Tables; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs index dbfa112f..3c07a289 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using DustInTheWind.ConsoleTools.Controls.Tables; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs index 16df6022..4b527822 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using DustInTheWind.ConsoleTools.Controls.Tables; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs index de3cb16e..d66de5e2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using DustInTheWind.ConsoleTools.Controls.Tables; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs index 1a026ced..c47126a6 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Data; using DustInTheWind.ConsoleTools.Controls.Tables; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs index 16e956e1..9349e1a1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Data; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs index 3833da6b..e130b2a1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Data; using DustInTheWind.ConsoleTools.Controls.Tables; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs index fbbd839a..a4c7022b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using DustInTheWind.ConsoleTools.Controls.Tables; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs index c54fa78e..0f62b8ea 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using DustInTheWind.ConsoleTools.Controls.Tables; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs index 89f135a6..28becb2c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using DustInTheWind.ConsoleTools.Controls.Tables; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookApplication.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookApplication.cs index 885a1576..6686b4be 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookApplication.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookApplication.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using DustInTheWind.ConsoleTools.Tutorial.AddressBookModel; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/AddressBook.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/AddressBook.cs index 6bc2033d..18350bc6 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/AddressBook.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/AddressBook.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/Person.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/Person.cs index 3f1bdb97..3308d79f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/Person.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/AddressBookModel/Person.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/AddPersonCommand.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/AddPersonCommand.cs index 49a15e75..7c44349a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/AddPersonCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/AddPersonCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using DustInTheWind.ConsoleTools.Menues; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonDetailsCommand.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonDetailsCommand.cs index 808f7257..32274ca5 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonDetailsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonDetailsCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using DustInTheWind.ConsoleTools.InputControls; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonsCommand.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonsCommand.cs index 1fbdf119..8017a6f1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/DisplayPersonsCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using DustInTheWind.ConsoleTools.Menues; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/ExitCommand.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/ExitCommand.cs index b3c3f5b3..0aec1f03 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/ExitCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Commands/ExitCommand.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using DustInTheWind.ConsoleTools.Menues; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/AddPersonView.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/AddPersonView.cs index f16a6b54..8c35de05 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/AddPersonView.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/AddPersonView.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using DustInTheWind.ConsoleTools.InputControls; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonView.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonView.cs index 7cfe7078..0e708c28 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonView.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonView.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using DustInTheWind.ConsoleTools.InputControls; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonsView.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonsView.cs index b4edadb5..5c486104 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonsView.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/CustomControls/PersonsView.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Collections.Generic; using DustInTheWind.ConsoleTools.TabularData; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/MainMenu.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/MainMenu.cs index 95b3ca22..26014b86 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/MainMenu.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/MainMenu.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; using System.Collections.Generic; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Program.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Program.cs index f41a5997..1b1f8074 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Program.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; diff --git a/sources/ConsoleTools/ConsoleTools.Tutorial/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Tutorial/Properties/AssemblyInfo.cs index 7a7f4880..b45eebe7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tutorial/Properties/AssemblyInfo.cs +++ b/sources/ConsoleTools/ConsoleTools.Tutorial/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------------- // Bugs or feature requests // -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System.Reflection; using System.Runtime.InteropServices; From 0bee901a3b381ed0d58914ee2c26710986e147e2 Mon Sep 17 00:00:00 2001 From: Iuga Alexandru Date: Thu, 29 Oct 2020 13:21:33 +0200 Subject: [PATCH 31/57] Create dotnet-core.yml --- .github/workflows/dotnet-core.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/dotnet-core.yml diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml new file mode 100644 index 00000000..4ae10c1f --- /dev/null +++ b/.github/workflows/dotnet-core.yml @@ -0,0 +1,25 @@ +name: .NET Core + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.301 + - name: Install dependencies + run: dotnet restore ./sources/ConsoleTools/ConsoleTools.sln + - name: Build + run: dotnet build ./sources/ConsoleTools/ConsoleTools.sln --configuration Release --no-restore + - name: Test + run: dotnet test ./sources/ConsoleTools/ConsoleTools.sln --no-restore --verbosity normal From 413e4e2aedc03f63e180fa14467857032d635f95 Mon Sep 17 00:00:00 2001 From: Iuga Alexandru Date: Thu, 29 Oct 2020 17:10:01 +0200 Subject: [PATCH 32/57] Create netframework.yml --- .github/workflows/netframework.yml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/netframework.yml diff --git a/.github/workflows/netframework.yml b/.github/workflows/netframework.yml new file mode 100644 index 00000000..51f4fafa --- /dev/null +++ b/.github/workflows/netframework.yml @@ -0,0 +1,37 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: windows-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Setup msbuild + uses: microsoft/setup-msbuild@v1 + + - name: Setup NuGet + # You may pin to the exact commit or the version. + # uses: NuGet/setup-nuget@255f46e14d51fbc603743e2aa2907954463fbeb9 + uses: NuGet/setup-nuget@v1.0.2 + + - name: Restore NuGet packages + run: nuget restore ./sources/ConsoleTools/ConsoleTools.sln + + - name: Build the solution + run: msbuild ./sources/ConsoleTools/ConsoleTools.sln From cc9db1906ec195c935038a59811fae241ddff2b8 Mon Sep 17 00:00:00 2001 From: Iuga Alexandru Date: Thu, 29 Oct 2020 17:14:50 +0200 Subject: [PATCH 33/57] removed the dotnet build yml --- .github/workflows/dotnet-core.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/dotnet-core.yml diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml deleted file mode 100644 index 4ae10c1f..00000000 --- a/.github/workflows/dotnet-core.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: .NET Core - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.301 - - name: Install dependencies - run: dotnet restore ./sources/ConsoleTools/ConsoleTools.sln - - name: Build - run: dotnet build ./sources/ConsoleTools/ConsoleTools.sln --configuration Release --no-restore - - name: Test - run: dotnet test ./sources/ConsoleTools/ConsoleTools.sln --no-restore --verbosity normal From 5657ccf39e482d9bde6c64180b2519aa75835182 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Wed, 9 Dec 2020 14:40:16 +0200 Subject: [PATCH 34/57] updated the demo for colored tables. --- .../Commands/ColorsCommand.cs | 60 ++++++++++--------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs index 40808386..772cba40 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs @@ -10,45 +10,38 @@ internal class ColorsCommand : ICommand public void Execute() { + DisplayUncoloredTable(); DisplayColoredTable(); DisplayBackgroundColoredTable(); DisplayBackgroundColoredTable2(); - - DisplayUncoloredTable(); - CustomConsole.WithColors(ConsoleColor.Yellow, ConsoleColor.Green, DisplayUncoloredTable); } - private static void DisplayColoredTable() + private static void DisplayUncoloredTable() { DataGrid dataGrid = CreateTable(); - dataGrid.Title = "A table with different colors for border, title and header"; - - dataGrid.ForegroundColor = ConsoleColor.Blue; - dataGrid.BorderColor = ConsoleColor.DarkBlue; - dataGrid.TitleColor = ConsoleColor.Yellow; - dataGrid.HeaderColor = ConsoleColor.DarkYellow; - + dataGrid.Title = "Table without colors"; + dataGrid.DisplayBorderBetweenRows = true; dataGrid.DisplayColumnHeaders = true; dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; + dataGrid.Rows[1].ForegroundColor = ConsoleColor.Yellow; + dataGrid.Display(); } - private static void DisplayBackgroundColoredTable() + private static void DisplayColoredTable() { DataGrid dataGrid = CreateTable(); - dataGrid.Title = "It can have custom background color"; + dataGrid.Title = "Different foreground colors for border, title and column headers"; dataGrid.ForegroundColor = ConsoleColor.Blue; dataGrid.BorderColor = ConsoleColor.DarkBlue; dataGrid.TitleColor = ConsoleColor.Yellow; dataGrid.HeaderColor = ConsoleColor.DarkYellow; - - dataGrid.BackgroundColor = ConsoleColor.Gray; - + dataGrid.DisplayBorderBetweenRows = true; dataGrid.DisplayColumnHeaders = true; dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; @@ -56,22 +49,19 @@ private static void DisplayBackgroundColoredTable() dataGrid.Display(); } - private static void DisplayBackgroundColoredTable2() + private static void DisplayBackgroundColoredTable() { DataGrid dataGrid = CreateTable(); - dataGrid.Title = "Different background colors for border, title and header"; + dataGrid.Title = "Custom global background color"; dataGrid.ForegroundColor = ConsoleColor.Blue; dataGrid.BorderColor = ConsoleColor.DarkBlue; - dataGrid.TitleColor = ConsoleColor.White; - dataGrid.HeaderColor = ConsoleColor.Yellow; - + dataGrid.TitleColor = ConsoleColor.Yellow; + dataGrid.HeaderColor = ConsoleColor.DarkYellow; + dataGrid.BackgroundColor = ConsoleColor.Gray; - dataGrid.BorderBackgroundColor = ConsoleColor.White; - dataGrid.TitleBackgroundColor = ConsoleColor.DarkGray; - dataGrid.HeaderBackgroundColor = ConsoleColor.Green; - + dataGrid.DisplayBorderBetweenRows = true; dataGrid.DisplayColumnHeaders = true; dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; @@ -79,11 +69,21 @@ private static void DisplayBackgroundColoredTable2() dataGrid.Display(); } - private static void DisplayUncoloredTable() + private static void DisplayBackgroundColoredTable2() { DataGrid dataGrid = CreateTable(); - dataGrid.Title = "Table without colors"; + dataGrid.Title = "Different background colors for border, title and column headers"; + + dataGrid.ForegroundColor = ConsoleColor.Blue; + dataGrid.BorderColor = ConsoleColor.DarkBlue; + dataGrid.TitleColor = ConsoleColor.Yellow; + dataGrid.HeaderColor = ConsoleColor.DarkYellow; + + dataGrid.BackgroundColor = ConsoleColor.Gray; + dataGrid.BorderBackgroundColor = ConsoleColor.White; + dataGrid.TitleBackgroundColor = ConsoleColor.DarkYellow; + dataGrid.HeaderBackgroundColor = ConsoleColor.Yellow; dataGrid.DisplayBorderBetweenRows = true; dataGrid.DisplayColumnHeaders = true; @@ -94,7 +94,11 @@ private static void DisplayUncoloredTable() private static DataGrid CreateTable() { - DataGrid dataGrid = new DataGrid(); + DataGrid dataGrid = new DataGrid + { + Margin = 1, + MinWidth = 70 + }; dataGrid.Columns.Add("Name"); dataGrid.Columns.Add("Age"); From 55ebf01095ddc6df402dbe418c1149b7cc1eb4c1 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Wed, 9 Dec 2020 14:40:59 +0200 Subject: [PATCH 35/57] fixed build error --- .../ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs index 772cba40..117da914 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs @@ -26,8 +26,6 @@ private static void DisplayUncoloredTable() dataGrid.DisplayColumnHeaders = true; dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; - dataGrid.Rows[1].ForegroundColor = ConsoleColor.Yellow; - dataGrid.Display(); } From 31620503b20c4e8c736ce547f806a0b4e2cfe916 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Wed, 9 Dec 2020 22:24:32 +0200 Subject: [PATCH 36/57] renamed DataGrid.PaddingLeft to DataGrid.CellPaddingLeft. renamed DataGrid.PaddingRight to DataGrid.CellPaddingRight --- doc/changelog.txt | 2 + .../ClassDiagram1.cd | 81 +++++++++++++++++++ .../ColumnList.cs | 2 +- .../ConsoleTools.Controls.Tables/DataCell.cs | 18 +++-- .../ConsoleTools.Controls.Tables/DataGrid.cs | 4 +- .../ConsoleTools.Controls.Tables/DataRow.cs | 4 +- .../HeaderCell.cs | 8 +- .../ITablePrinter.cs | 2 +- .../Printers/ConsoleTablePrinter.cs | 2 +- .../Printers/StreamTablePrinter.cs | 2 +- .../Printers/StringTablePrinter.cs | 2 +- .../ConsoleTools.Controls.Tables/TitleCell.cs | 4 +- .../Commands/CellPaddingCommand.cs | 4 +- .../DataCellTests/RenderLineTests.cs | 16 ++-- .../TableTests/ConstructorTests.cs | 12 +-- .../TableTests/CustomBorderTests.cs | 4 +- .../TableTests/TablePaddingTests.cs | 12 +-- 17 files changed, 132 insertions(+), 47 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd diff --git a/doc/changelog.txt b/doc/changelog.txt index 38bd4bcb..ec0c5f0c 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -9,6 +9,8 @@ ver next - ApplicationHeader: Added new control. - Splitted the library in multiple assemblies. - Breaking changes: Renamed multiple controls and moved them in other namespaces. +- DataGrid: Renamed DataGrid.PaddingLeft to DataGrid.CellPaddingLeft +- DataGrid: Renamed DataGrid.PaddingRight to DataGrid.CellPaddingRight ver 0.5.4 --------- diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd new file mode 100644 index 00000000..3f727d7f --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + AACAAwIAAASAAEAkCQAAAQgCFICEAAAAABAAAIgAAAQ= + DataGrid.cs + + + + + + + + + + + + AAASAAAAAAAAAAAAgAAAEAAAAAAAAAAAABAAAAAAAAA= + TitleRow.cs + + + + + + + + + AAAAAAAAAGAAAAAAAAAAAAAAABiAAAAEAAAABAAAAAA= + TitleCell.cs + + + + + + AAIAAAAAAAAAABAACABABAQAAAAAAAAECAAAEABAAAA= + DataRowList.cs + + + + + + + AAIAAAAAAAAAABCACAAAAAQAAAAAAAAECAAAEAAAAAA= + DataColumnList.cs + + + + + + + gwAAAAAICBBAABAAACAQAAIAAAEYAAIgCACAgAAAAkA= + BorderTemplate.cs + + + + + + AAAAAAAAAAAAAAAAgAAAFAAAABCAAAAAAAAAAAAAAAA= + DataColumn.cs + + + + + + AAAAAAMAAgCAAAAACAAAkAACBAAAAAAAABAAAAAAAAA= + DataRow.cs + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs index b2bab071..d81cdcbc 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs @@ -117,7 +117,7 @@ public void RenderHeaderRow(ITablePrinter tablePrinter, List cellWidths, in { // Write cell content. string content = cellContents[columnIndex][headerLineIndex]; - tablePrinter.WriteHeader(content); + tablePrinter.WriteColumnHeader(content); // Write intermediate or right border. if (displayBorder && borderTemplate != null) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs index a3fef791..3a977fb3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs @@ -19,6 +19,8 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; + namespace DustInTheWind.ConsoleTools.Controls.Tables { /// @@ -125,8 +127,8 @@ protected override int CalculatePaddingLeft() if (ParentRow != null) { - if (ParentRow.PaddingLeft.HasValue) - return ParentRow.PaddingLeft.Value; + if (ParentRow.CellPaddingLeft.HasValue) + return ParentRow.CellPaddingLeft.Value; if (ParentRow.ParentDataGrid != null) { @@ -135,8 +137,8 @@ protected override int CalculatePaddingLeft() if (column?.PaddingLeft != null) return column.PaddingLeft.Value; - if (ParentRow.ParentDataGrid.PaddingLeft.HasValue) - return ParentRow.ParentDataGrid.PaddingLeft.Value; + if (ParentRow.ParentDataGrid.CellPaddingLeft.HasValue) + return ParentRow.ParentDataGrid.CellPaddingLeft.Value; } } @@ -154,8 +156,8 @@ protected override int CalculatePaddingRight() if (ParentRow != null) { - if (ParentRow.PaddingRight.HasValue) - return ParentRow.PaddingRight.Value; + if (ParentRow.CellPaddingRight.HasValue) + return ParentRow.CellPaddingRight.Value; if (ParentRow.ParentDataGrid != null) @@ -165,8 +167,8 @@ protected override int CalculatePaddingRight() if (column?.PaddingRight != null) return column.PaddingRight.Value; - if (ParentRow.ParentDataGrid.PaddingRight.HasValue) - return ParentRow.ParentDataGrid.PaddingRight.Value; + if (ParentRow.ParentDataGrid.CellPaddingRight.HasValue) + return ParentRow.ParentDataGrid.CellPaddingRight.Value; } } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index 6edfb4c0..7a41fdae 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -54,12 +54,12 @@ public MultilineText Title /// /// Gets or sets the padding applied to the left side of every cell. /// - public int? PaddingLeft { get; set; } = 1; + public int? CellPaddingLeft { get; set; } = 1; /// /// Gets or sets the padding applied to the right side of every cell. /// - public int? PaddingRight { get; set; } = 1; + public int? CellPaddingRight { get; set; } = 1; /// /// Gets a value that specifies if border lines should be drawn between rows. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs index 3644621b..209bc4e4 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs @@ -54,12 +54,12 @@ public class DataRow /// /// Gets or sets the padding applied to the left side of every cell. /// - public int? PaddingLeft { get; set; } + public int? CellPaddingLeft { get; set; } /// /// Gets or sets the padding applied to the right side of every cell. /// - public int? PaddingRight { get; set; } + public int? CellPaddingRight { get; set; } /// /// Initializes a new instance of the class with default values. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs index 8458934f..201a2713 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs @@ -128,8 +128,8 @@ protected override int CalculatePaddingLeft() if (ParentColumn.PaddingLeft.HasValue) return ParentColumn.PaddingLeft.Value; - if (ParentColumn.ParentDataGrid?.PaddingLeft != null) - return ParentColumn.ParentDataGrid.PaddingLeft.Value; + if (ParentColumn.ParentDataGrid?.CellPaddingLeft != null) + return ParentColumn.ParentDataGrid.CellPaddingLeft.Value; } return 0; @@ -149,8 +149,8 @@ protected override int CalculatePaddingRight() if (ParentColumn.PaddingRight.HasValue) return ParentColumn.PaddingRight.Value; - if (ParentColumn.ParentDataGrid?.PaddingRight != null) - return ParentColumn.ParentDataGrid.PaddingRight.Value; + if (ParentColumn.ParentDataGrid?.CellPaddingRight != null) + return ParentColumn.ParentDataGrid.CellPaddingRight.Value; } return 0; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs index a75ffd4c..6b1829a3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs @@ -57,7 +57,7 @@ public interface ITablePrinter /// /// Writes the specified text, applying the formatting specific for the column headers. /// - void WriteHeader(string text); + void WriteColumnHeader(string text); /// /// Writes the specified text, applying the default formatting. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs index 790b97f7..c13f2263 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs @@ -137,7 +137,7 @@ public void WriteTitle(string text) /// /// Writes the specified text to the using the . /// - public void WriteHeader(string text) + public void WriteColumnHeader(string text) { ConsoleColor? foregroundColor = HeaderColor ?? ForegroundColor; ConsoleColor? backgroundColor = HeaderBackgroundColor ?? BackgroundColor; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs index 29197600..1988b4bb 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs @@ -88,7 +88,7 @@ public void WriteTitle(string text) /// /// Writes the specified text in the underlying . /// - public void WriteHeader(string text) + public void WriteColumnHeader(string text) { streamWriter.Write(text); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs index 335618e8..8136e95b 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs @@ -92,7 +92,7 @@ public void WriteTitle(string text) /// /// Stores the specified text in the internal . /// - public void WriteHeader(string text) + public void WriteColumnHeader(string text) { sb.Append(text); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs index ae1fbb83..310c982d 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs @@ -123,7 +123,7 @@ protected override int CalculatePaddingLeft() if (PaddingLeft.HasValue) return PaddingLeft.Value; - return ParentRow?.ParentDataGrid?.PaddingLeft ?? 0; + return ParentRow?.ParentDataGrid?.CellPaddingLeft ?? 0; } /// @@ -135,7 +135,7 @@ protected override int CalculatePaddingRight() if (PaddingRight.HasValue) return PaddingRight.Value; - return ParentRow?.ParentDataGrid?.PaddingRight ?? 0; + return ParentRow?.ParentDataGrid?.CellPaddingRight ?? 0; } /// diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs index f938b1ca..6c1d2375 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/CellPaddingCommand.cs @@ -53,7 +53,7 @@ private static void DisplayPaddingLeftExample() dataGrid.Rows.Add("Forth item", 4.ToString()); dataGrid.Rows.Add("Fifth item", 5.ToString()); - dataGrid.PaddingLeft = 3; + dataGrid.CellPaddingLeft = 3; dataGrid.Display(); } @@ -68,7 +68,7 @@ private static void DisplayPaddingRightExample() dataGrid.Rows.Add("Forth item", 4.ToString()); dataGrid.Rows.Add("Fifth item", 5.ToString()); - dataGrid.PaddingRight = 3; + dataGrid.CellPaddingRight = 3; dataGrid.Display(); } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs index 7a65e407..fc53822a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs @@ -122,8 +122,8 @@ public void parent_row_has_padding_left() DataGrid dataGrid = new DataGrid(); DataRow row = new DataRow { - PaddingLeft = 2, - PaddingRight = 0 + CellPaddingLeft = 2, + CellPaddingRight = 0 }; dataGrid.Rows.Add(row); DataCell cell = new DataCell("text"); @@ -140,8 +140,8 @@ public void parent_table_has_padding_left() { DataGrid dataGrid = new DataGrid { - PaddingLeft = 2, - PaddingRight = 0 + CellPaddingLeft = 2, + CellPaddingRight = 0 }; DataRow row = new DataRow(); dataGrid.Rows.Add(row); @@ -204,8 +204,8 @@ public void parent_row_has_padding_right() DataGrid dataGrid = new DataGrid(); DataRow row = new DataRow { - PaddingLeft = 0, - PaddingRight = 2 + CellPaddingLeft = 0, + CellPaddingRight = 2 }; dataGrid.Rows.Add(row); DataCell cell = new DataCell("text") @@ -225,8 +225,8 @@ public void parent_table_has_padding_right() { DataGrid dataGrid = new DataGrid { - PaddingLeft = 0, - PaddingRight = 2 + CellPaddingLeft = 0, + CellPaddingRight = 2 }; DataRow row = new DataRow(); dataGrid.Rows.Add(row); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs index 9c517f45..e7bb269b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs @@ -29,8 +29,8 @@ public void TestConstructor1() Assert.That(dataGrid.Title, Is.EqualTo(MultilineText.Empty)); Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - Assert.That(dataGrid.PaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.PaddingRight, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); @@ -43,8 +43,8 @@ public void TestConstructor2() Assert.That(dataGrid.Title, Is.EqualTo(new MultilineText("My Title"))); Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - Assert.That(dataGrid.PaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.PaddingRight, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); @@ -57,8 +57,8 @@ public void TestConstructor3() Assert.That(dataGrid.Title, Is.EqualTo(new MultilineText("My Title"))); Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - Assert.That(dataGrid.PaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.PaddingRight, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs index eed72a26..64e4cb1b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs @@ -127,8 +127,8 @@ public void render_table_with_digit_and_letter_border() dataGrid.BorderTemplate = new BorderTemplate("1234567890abcde"); dataGrid.Title = "My Title"; dataGrid.DisplayColumnHeaders = true; - dataGrid.PaddingLeft = 3; - dataGrid.PaddingRight = 3; + dataGrid.CellPaddingLeft = 3; + dataGrid.CellPaddingRight = 3; dataGrid.Columns.Add(new Column("One")); dataGrid.Columns.Add(new Column("Two")); dataGrid.Columns.Add(new Column("Three")); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs index bf8fe445..10adc48b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs @@ -37,7 +37,7 @@ public void SetUp() [Test] public void added_a_padding_left_of_2() { - dataGrid.PaddingLeft = 2; + dataGrid.CellPaddingLeft = 2; const string expected = @"+-------------------------------+ @@ -49,15 +49,15 @@ public void added_a_padding_left_of_2() +----------+---------+----------+ "; - Assert.That(dataGrid.PaddingLeft, Is.EqualTo(2)); - Assert.That(dataGrid.PaddingRight, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(2)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); CustomAssert.TableRender(dataGrid, expected); } [Test] public void added_a_padding_right_of_2() { - dataGrid.PaddingRight = 2; + dataGrid.CellPaddingRight = 2; const string expected = @"+-------------------------------+ @@ -69,8 +69,8 @@ public void added_a_padding_right_of_2() +----------+---------+----------+ "; - Assert.That(dataGrid.PaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.PaddingRight, Is.EqualTo(2)); + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(2)); CustomAssert.TableRender(dataGrid, expected); } } From 7ba32d1da594dbc80690cca378d795fd59d34595 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Thu, 10 Dec 2020 23:11:30 +0200 Subject: [PATCH 37/57] Added ForegroundColor and BackgroundColor at cell and row level. --- doc/changelog.txt | 1 + .../ConsoleTools.Controls.Tables/CellBase.cs | 9 ++ .../ColumnList.cs | 52 +------ .../ConsoleTools.Controls.Tables/DataCell.cs | 14 ++ .../ConsoleTools.Controls.Tables/DataGrid.cs | 81 ++++++---- .../ConsoleTools.Controls.Tables/DataRow.cs | 53 ++----- .../DataRowList.cs | 4 +- .../HeaderCell.cs | 18 +++ .../ConsoleTools.Controls.Tables/HeaderRow.cs | 139 ++++++++++++++++++ .../ITablePrinter.cs | 4 +- .../Printers/ConsoleTablePrinter.cs | 5 +- .../Printers/StreamTablePrinter.cs | 2 +- .../Printers/StringTablePrinter.cs | 2 +- .../RenderingModel/{DataCellX.cs => CellX.cs} | 33 ++++- .../RenderingModel/DataGridX.cs | 57 +++---- .../RenderingModel/DataGridXBuilder.cs | 10 +- .../RenderingModel/DataRowX.cs | 54 +++++-- .../RenderingModel/HeaderRowX.cs | 19 +-- .../RenderingModel/TitleRowX.cs | 38 ++++- .../ConsoleTools.Controls.Tables/TitleCell.cs | 16 ++ .../ConsoleTools.Controls.Tables/TitleRow.cs | 19 +++ .../Commands/ColorsCommand.cs | 24 +-- .../Commands/DoubleLineBorderCommand.cs | 2 +- .../Commands/SimpleBorderCommand.cs | 2 +- .../Commands/SingleLineBorderCommand.cs | 2 +- .../TabularData/HorizontalBorderXTests.cs | 35 +++++ .../TableTests/CellAlignmentPerColumnTests.cs | 4 +- .../TableTests/CellAlignmentPerTableTests.cs | 5 +- .../TableTests/CustomBorderTests.cs | 6 +- .../TableStreaming.Tests.csproj | 22 +++ .../TableStreaming.Tests/UnitTest1.cs | 87 +++++++++++ sources/TableStreaming/TableStreaming.sln | 31 ++++ .../TableStreaming/TableStreaming/Class1.cs | 8 + .../TableStreaming/TableStreaming.csproj | 7 + 34 files changed, 656 insertions(+), 209 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs rename sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/{DataCellX.cs => CellX.cs} (52%) create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/TabularData/HorizontalBorderXTests.cs create mode 100644 sources/TableStreaming/TableStreaming.Tests/TableStreaming.Tests.csproj create mode 100644 sources/TableStreaming/TableStreaming.Tests/UnitTest1.cs create mode 100644 sources/TableStreaming/TableStreaming.sln create mode 100644 sources/TableStreaming/TableStreaming/Class1.cs create mode 100644 sources/TableStreaming/TableStreaming/TableStreaming.csproj diff --git a/doc/changelog.txt b/doc/changelog.txt index ec0c5f0c..f50e57a5 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -11,6 +11,7 @@ ver next - Breaking changes: Renamed multiple controls and moved them in other namespaces. - DataGrid: Renamed DataGrid.PaddingLeft to DataGrid.CellPaddingLeft - DataGrid: Renamed DataGrid.PaddingRight to DataGrid.CellPaddingRight +- DataGrid: Added ForegroundColor and BackgroundColor at cell and row level. ver 0.5.4 --------- diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs index cb6b593c..f56c938e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs @@ -19,6 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; using System.Collections.Generic; namespace DustInTheWind.ConsoleTools.Controls.Tables @@ -43,6 +44,10 @@ public abstract class CellBase /// public HorizontalAlignment HorizontalAlignment { get; set; } + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } + /// /// Initializes a new instance of the class with /// empty content. @@ -122,6 +127,10 @@ public Size CalculatePreferredSize() /// protected abstract int CalculatePaddingRight(); + public abstract ConsoleColor? CalculateForegroundColor(); + + public abstract ConsoleColor? CalculateBackgroundColor(); + /// /// Returns the string representation of the content of the cell. /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs index d81cdcbc..ad0f34b3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs @@ -53,9 +53,9 @@ public class ColumnList : IEnumerable /// /// Initializes a new instance of the class with - /// the table that owns it. + /// the that owns it. /// - /// The table that owns the new instance. + /// The that owns the new instance. public ColumnList(DataGrid parentDataGrid) { this.parentDataGrid = parentDataGrid ?? throw new ArgumentNullException(nameof(parentDataGrid)); @@ -86,54 +86,6 @@ public void Add(Column column) columns.Add(column); } - /// - /// Renders the row containing the column headers. - /// - /// The destination where the current instance must be rendered. - /// The widths of each header cell that must be rendered. - /// The height of the row to be rendered. If there are not enough text lines - /// in the content of a cell, spaces are written instead. - public void RenderHeaderRow(ITablePrinter tablePrinter, List cellWidths, int rowHeight) - { - // Get cells content. - List> cellContents = columns - .Select((x, i) => - { - Size size = new Size(cellWidths[i], rowHeight); - return x.HeaderCell.Render(size).ToList(); - }) - .ToList(); - - bool displayBorder = parentDataGrid?.DisplayBorder ?? true; - BorderTemplate borderTemplate = parentDataGrid?.BorderTemplate; - - for (int headerLineIndex = 0; headerLineIndex < rowHeight; headerLineIndex++) - { - // Write left border. - if (displayBorder && borderTemplate != null) - tablePrinter.WriteBorder(borderTemplate.Left); - - for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) - { - // Write cell content. - string content = cellContents[columnIndex][headerLineIndex]; - tablePrinter.WriteColumnHeader(content); - - // Write intermediate or right border. - if (displayBorder && borderTemplate != null) - { - char cellBorderRight = columnIndex < columns.Count - 1 - ? borderTemplate.Vertical - : borderTemplate.Right; - - tablePrinter.WriteBorder(cellBorderRight); - } - } - - tablePrinter.WriteLine(); - } - } - /// /// Returns an enumerator that iterates through the s contained by the current instance. /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs index 3a977fb3..f7e2a119 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs @@ -175,6 +175,20 @@ protected override int CalculatePaddingRight() return 0; } + public override ConsoleColor? CalculateForegroundColor() + { + return ForegroundColor + ?? ParentRow?.ForegroundColor + ?? ParentRow?.ParentDataGrid?.ForegroundColor; + } + + public override ConsoleColor? CalculateBackgroundColor() + { + return BackgroundColor + ?? ParentRow?.BackgroundColor + ?? ParentRow?.ParentDataGrid?.BackgroundColor; + } + /// /// Returns the calculated horizontal alignment for the content of the current data cell. /// The value is calculated based on the property of the current data cell, diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index 7a41fdae..f6c1af27 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -46,11 +46,6 @@ public MultilineText Title set => TitleRow.TitleCell.Content = value; } - /// - /// Gets or sets a value that specifies if the title is displayed. - /// - public bool DisplayTitle { get; set; } = true; - /// /// Gets or sets the padding applied to the left side of every cell. /// @@ -78,15 +73,14 @@ public MultilineText Title public ColumnList Columns { get; } /// - /// The list of rows contained by the current table. + /// Gets the instance that represents the columns header row of the table. /// - public DataRowList Rows { get; } + public HeaderRow HeaderRow { get; } /// - /// Gets or sets a value that specifies if the column headers are displayed. - /// Default value: true + /// The list of rows contained by the current table. /// - public bool DisplayColumnHeaders { get; set; } = true; + public DataRowList Rows { get; } /// /// Gets the row at the specified index. @@ -121,35 +115,68 @@ public MultilineText Title public ConsoleColor? BorderColor { get; set; } /// - /// Gets or sets the foreground color for the title. + /// Gets or sets the background color for the borders. /// Default value: null /// - public ConsoleColor? TitleColor { get; set; } + public ConsoleColor? BorderBackgroundColor { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } + + #region Obsolete Properties /// - /// Gets or sets the foreground color for the column headers. - /// Default value: null + /// Gets or sets a value that specifies if the title is displayed. /// - public ConsoleColor? HeaderColor { get; set; } + [Obsolete("Use TitleRow.IsVisible property instead.")] + public bool DisplayTitle + { + get => TitleRow.IsVisible; + set => TitleRow.IsVisible = value; + } /// - /// Gets or sets the background color for the borders. + /// Gets or sets the foreground color for the title. /// Default value: null /// - public ConsoleColor? BorderBackgroundColor { get; set; } - + [Obsolete("Use TitleRow.Color property instead.")] + public ConsoleColor? TitleColor { get; set; } + /// /// Gets or sets the background color for the title. /// Default value: null /// + [Obsolete("Use TitleRow.BackgroundColor property instead.")] public ConsoleColor? TitleBackgroundColor { get; set; } - + + /// + /// Gets or sets a value that specifies if the column headers are displayed. + /// Default value: true + /// + [Obsolete("Use HeaderRow.IsVisible property instead.")] + public bool DisplayColumnHeaders + { + get => HeaderRow.IsVisible; + set => HeaderRow.IsVisible = value; + } + + /// + /// Gets or sets the foreground color for the column headers. + /// Default value: null + /// + [Obsolete("Use HeaderRow.Color property instead.")] + public ConsoleColor? HeaderColor { get; set; } + /// /// Gets or sets the background color for the column headers. /// Default value: null /// + [Obsolete("Use HeaderRow.BackgroundColor property instead.")] public ConsoleColor? HeaderBackgroundColor { get; set; } + #endregion + /// /// Initializes a new instance of the class. /// @@ -157,6 +184,7 @@ public DataGrid() { Rows = new DataRowList(this); Columns = new ColumnList(this); + HeaderRow = new HeaderRow(Columns, this); TitleRow = new TitleRow { @@ -172,6 +200,7 @@ public DataGrid(string title) { Rows = new DataRowList(this); Columns = new ColumnList(this); + HeaderRow = new HeaderRow(Columns, this); TitleRow = new TitleRow(title) { @@ -187,6 +216,7 @@ public DataGrid(MultilineText title) { Rows = new DataRowList(this); Columns = new ColumnList(this); + HeaderRow = new HeaderRow(Columns, this); TitleRow = new TitleRow(title) { @@ -202,6 +232,7 @@ public DataGrid(object title) { Rows = new DataRowList(this); Columns = new ColumnList(this); + HeaderRow = new HeaderRow(Columns, this); TitleRow = new TitleRow(title) { @@ -218,13 +249,13 @@ protected override void DoDisplayContent(ControlDisplay display) { ForegroundColor = ForegroundColor, BorderColor = BorderColor, - TitleColor = TitleColor, - HeaderColor = HeaderColor, + TitleColor = TitleRow.ForegroundColor, + HeaderColor = HeaderRow.ForegroundColor, BackgroundColor = BackgroundColor, BorderBackgroundColor = BorderBackgroundColor, - TitleBackgroundColor = TitleBackgroundColor, - HeaderBackgroundColor = HeaderBackgroundColor + TitleBackgroundColor = TitleRow.BackgroundColor, + HeaderBackgroundColor = HeaderRow.BackgroundColor }; RenderInternal(consoleTablePrinter); @@ -245,9 +276,7 @@ private void RenderInternal(ITablePrinter tablePrinter) { MinWidth = MinWidth ?? 0, TitleRow = TitleRow, - DisplayTitle = DisplayTitle, - Columns = Columns, - DisplayColumnHeaders = DisplayColumnHeaders, + HeaderRow = HeaderRow, Rows = Rows, DisplayBorderBetweenRows = DisplayBorderBetweenRows, BorderTemplate = BorderTemplate, diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs index 209bc4e4..461ba4fe 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs @@ -29,7 +29,7 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// /// Represents a row in the class. /// - public class DataRow + public class DataRow : IEnumerable { /// /// Gets the list of cells contained by the row. @@ -60,6 +60,10 @@ public class DataRow /// Gets or sets the padding applied to the right side of every cell. /// public int? CellPaddingRight { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } /// /// Initializes a new instance of the class with default values. @@ -270,49 +274,14 @@ public DataCell this[int index] return indexOfCell == -1 ? (int?) null : indexOfCell; } - /// - /// Renders the row current row. - /// - /// The destination where the current instance must be rendered. - /// The widths of each cell that must be rendered. - /// The height of the row to be rendered. If there are not enough text lines - /// in the content of a cell, spaces are written instead. - public void Render(ITablePrinter tablePrinter, List cellWidths, int height) + public IEnumerator GetEnumerator() { - List> cellContents = cells - .Select((x, i) => - { - Size size = new Size(cellWidths[i], height); - return x.Render(size).ToList(); - }) - .ToList(); - - BorderTemplate borderTemplate = ParentDataGrid?.BorderTemplate; - - bool displayBorder = borderTemplate != null && ParentDataGrid?.DisplayBorder == true; - - for (int rowLineIndex = 0; rowLineIndex < height; rowLineIndex++) - { - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Left); - - for (int columnIndex = 0; columnIndex < cells.Count; columnIndex++) - { - string content = cellContents[columnIndex][rowLineIndex]; - tablePrinter.WriteNormal(content); - - if (displayBorder) - { - char cellBorderRight = columnIndex < cells.Count - 1 - ? borderTemplate.Vertical - : borderTemplate.Right; - - tablePrinter.WriteBorder(cellBorderRight); - } - } + return cells.GetEnumerator(); + } - tablePrinter.WriteLine(); - } + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs index c0c60c8d..6a28e5e0 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs @@ -51,9 +51,9 @@ public class DataRowList : IEnumerable /// /// Initializes a new instance of the class with - /// the table that owns it. + /// the that owns it. /// - /// The table that owns the new instance. + /// The that owns the new instance. public DataRowList(DataGrid parentDataGrid) { this.parentDataGrid = parentDataGrid ?? throw new ArgumentNullException(nameof(parentDataGrid)); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs index 201a2713..46853017 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs @@ -19,6 +19,10 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; +using System.Collections.Generic; +using System.Data.Common; + namespace DustInTheWind.ConsoleTools.Controls.Tables { /// @@ -156,6 +160,20 @@ protected override int CalculatePaddingRight() return 0; } + public override ConsoleColor? CalculateForegroundColor() + { + return ForegroundColor + ?? ParentColumn?.ParentDataGrid?.HeaderRow?.ForegroundColor + ?? ParentColumn?.ParentDataGrid?.ForegroundColor; + } + + public override ConsoleColor? CalculateBackgroundColor() + { + return BackgroundColor + ?? ParentColumn?.ParentDataGrid?.HeaderRow?.BackgroundColor + ?? ParentColumn?.ParentDataGrid?.BackgroundColor; + } + /// /// Calculates and returns the horizontal alignment of the content displayed in the cell. /// The value is calculated taking into account also the parent row and parent table. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs new file mode 100644 index 00000000..534274e9 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace DustInTheWind.ConsoleTools.Controls.Tables +{ + public class HeaderRow : IEnumerable + { + private readonly DataGrid parentDataGrid; + private readonly ColumnList columns; + + public int CellCount => columns.Count(); + + /// + /// Gets or sets a value that specifies if the column headers are displayed. + /// Default value: true + /// + public bool IsVisible { get; set; } = true; + + /// + /// Gets or sets the foreground color for the column headers. + /// Default value: null + /// + public ConsoleColor? ForegroundColor { get; set; } + + /// + /// Gets or sets the background color for the column headers. + /// Default value: null + /// + public ConsoleColor? BackgroundColor { get; set; } + + /// + /// Initializes a new instance of the class with + /// the list of columns + /// and the that owns it. + /// + public HeaderRow(ColumnList columns, DataGrid parentDataGrid) + { + this.columns = columns ?? throw new ArgumentNullException(nameof(columns)); + this.parentDataGrid = parentDataGrid ?? throw new ArgumentNullException(nameof(parentDataGrid)); + } + + public IEnumerator GetEnumerator() + { + return new HeaderCellEnumerator(this); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + private class HeaderCellEnumerator : IEnumerator + { + private readonly HeaderRow headerRow; + private int index = -1; + + public HeaderCell Current { get; private set; } + + object IEnumerator.Current => Current; + + public HeaderCellEnumerator(HeaderRow headerRow) + { + this.headerRow = headerRow ?? throw new ArgumentNullException(nameof(headerRow)); + } + + public bool MoveNext() + { + index++; + + if (index >= headerRow.columns.Count) + return false; + + Current = headerRow.columns[index].HeaderCell; + + return true; + } + + public void Reset() + { + index = -1; + Current = null; + } + + public void Dispose() + { + } + } + + /// + /// Renders the row containing the column headers. + /// + /// The destination where the current instance must be rendered. + /// The widths of each header cell that must be rendered. + /// The height of the row to be rendered. If there are not enough text lines + /// in the content of a cell, spaces are written instead. + public void Render(ITablePrinter tablePrinter, List cellWidths, int rowHeight) + { + // Get cells content. + List> cellContents = columns + .Select((x, i) => + { + Size size = new Size(cellWidths[i], rowHeight); + return x.HeaderCell.Render(size).ToList(); + }) + .ToList(); + + bool displayBorder = parentDataGrid?.DisplayBorder ?? true; + BorderTemplate borderTemplate = parentDataGrid?.BorderTemplate; + + for (int headerLineIndex = 0; headerLineIndex < rowHeight; headerLineIndex++) + { + // Write left border. + if (displayBorder && borderTemplate != null) + tablePrinter.WriteBorder(borderTemplate.Left); + + for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) + { + // Write cell content. + string content = cellContents[columnIndex][headerLineIndex]; + tablePrinter.WriteColumnHeader(content); + + // Write intermediate or right border. + if (displayBorder && borderTemplate != null) + { + char cellBorderRight = columnIndex < columns.Count - 1 + ? borderTemplate.Vertical + : borderTemplate.Right; + + tablePrinter.WriteBorder(cellBorderRight); + } + } + + tablePrinter.WriteLine(); + } + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs index 6b1829a3..16a66dfd 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs @@ -19,6 +19,8 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; + namespace DustInTheWind.ConsoleTools.Controls.Tables { /// @@ -62,7 +64,7 @@ public interface ITablePrinter /// /// Writes the specified text, applying the default formatting. /// - void WriteNormal(string text); + void WriteNormal(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor); /// /// Writes the current line terminator. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs index c13f2263..daf13732 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs @@ -148,11 +148,8 @@ public void WriteColumnHeader(string text) /// /// Writes the specified text to the using the . /// - public void WriteNormal(string text) + public void WriteNormal(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { - ConsoleColor? foregroundColor = ForegroundColor; - ConsoleColor? backgroundColor = BackgroundColor; - Write(foregroundColor, backgroundColor, text); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs index 1988b4bb..6288ebcc 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs @@ -96,7 +96,7 @@ public void WriteColumnHeader(string text) /// /// Writes the specified text in the underlying . /// - public void WriteNormal(string text) + public void WriteNormal(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { streamWriter.Write(text); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs index 8136e95b..a574f2cf 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs @@ -100,7 +100,7 @@ public void WriteColumnHeader(string text) /// /// Stores the specified text in the internal . /// - public void WriteNormal(string text) + public void WriteNormal(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { sb.Append(text); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs similarity index 52% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs index 0f724e79..1aae769e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataCellX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs @@ -19,10 +19,41 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; +using System.Collections.Generic; + namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { - internal class DataCellX + internal class CellX { + private readonly CellBase dataCell; + private IEnumerator lineEnumerator; + private ConsoleColor? foregroundColor; + private ConsoleColor? backgroundColor; + public Size Size { get; set; } + + public CellX(CellBase dataCell) + { + this.dataCell = dataCell ?? throw new ArgumentNullException(nameof(dataCell)); + + Size = dataCell.CalculatePreferredSize(); + } + + public void InitializeRendering(Size size) + { + lineEnumerator = dataCell.Render(size).GetEnumerator(); + foregroundColor = dataCell.CalculateForegroundColor(); + backgroundColor = dataCell.CalculateBackgroundColor(); + } + + public void RenderNextLine(ITablePrinter tablePrinter) + { + string content = lineEnumerator.MoveNext() + ? lineEnumerator.Current + : null; + + tablePrinter.WriteNormal(content, foregroundColor, backgroundColor); + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs index 12a1c4a3..2247ef47 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs @@ -97,31 +97,7 @@ public void Clear() public void MakeFinalAdjustments() { - int totalWidth = MinWidth; - - if (titleRowX?.Size.Width > totalWidth) - totalWidth = titleRowX.Size.Width; - - if (columnsWidths.Count > 0) - { - int columnsTotalWidth = columnsWidths.Sum(); - - if (displayBorder) - columnsTotalWidth += columnsWidths.Count + 1; - - if (columnsTotalWidth < totalWidth) - { - int diff = totalWidth - columnsTotalWidth; - int colCount = columnsWidths.Count; - - for (int i = 0; i < diff; i++) - columnsWidths[i % colCount]++; - } - else if (columnsTotalWidth > totalWidth) - { - totalWidth = columnsTotalWidth; - } - } + int totalWidth = CalculateTotalWidth(); if (titleRowX?.Size.Width < totalWidth) titleRowX.Size = new Size(totalWidth, titleRowX.Size.Height); @@ -142,6 +118,37 @@ public void MakeFinalAdjustments() if (DataBottomBorder != null) DataBottomBorder.ColumnsWidths = columnsWidths; } + private int CalculateTotalWidth() + { + int totalWidth = MinWidth; + + if (titleRowX?.Size.Width > totalWidth) + totalWidth = titleRowX.Size.Width; + + if (columnsWidths.Count <= 0) + return totalWidth; + + int columnsTotalWidth = columnsWidths.Sum(); + + if (displayBorder) + columnsTotalWidth += columnsWidths.Count + 1; + + if (columnsTotalWidth < totalWidth) + { + int diff = totalWidth - columnsTotalWidth; + int colCount = columnsWidths.Count; + + for (int i = 0; i < diff; i++) + columnsWidths[i % colCount]++; + } + else if (columnsTotalWidth > totalWidth) + { + totalWidth = columnsTotalWidth; + } + + return totalWidth; + } + public void Render(ITablePrinter tablePrinter) { RenderTitle(tablePrinter); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index c582e3e5..50485185 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -32,10 +32,8 @@ internal class DataGridXBuilder private bool areDataRowsVisible; public TitleRow TitleRow { get; set; } - public bool DisplayTitle { get; set; } - public ColumnList Columns { get; set; } - public bool DisplayColumnHeaders { get; set; } + public HeaderRow HeaderRow { get; set; } public DataRowList Rows { get; set; } @@ -52,8 +50,8 @@ public DataGridX Build() MinWidth = MinWidth }; - isTitleVisible = DisplayTitle && TitleRow != null && TitleRow.HasContent; - isColumnHeaderRowVisible = DisplayColumnHeaders && Columns != null && Columns.Count > 0 && Columns.Any(x => x?.HeaderCell?.IsEmpty == false); + isTitleVisible = TitleRow != null && TitleRow.IsVisible && TitleRow.HasContent; + isColumnHeaderRowVisible = HeaderRow != null && HeaderRow.IsVisible && HeaderRow.CellCount > 0; areDataRowsVisible = Rows.Count > 0; if (isTitleVisible) @@ -81,7 +79,7 @@ private void AddTitle() private void AddHeader() { - HeaderRowX headerRowX = new HeaderRowX(Columns, DisplayBorder); + HeaderRowX headerRowX = new HeaderRowX(HeaderRow, DisplayBorder); dataGridX.AddHeaderRow(headerRowX); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs index 64716e59..85abd3c7 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { @@ -28,7 +29,7 @@ internal class DataRowX { private readonly bool hasBorder; private readonly DataRow dataRow; - private readonly List cells = new List(); + private readonly List cells = new List(); public Size Size { get; private set; } @@ -42,22 +43,17 @@ public DataRowX(DataRow dataRow, bool hasBorder) private void CreateCells() { - cells.Clear(); + IEnumerable dataCellXes = dataRow + .Select(x => new CellX(x)); - for (int i = 0; i < dataRow.CellCount; i++) + foreach (CellX dataCellX in dataCellXes) { - DataCellX cell = new DataCellX - { - Size = dataRow[i].CalculatePreferredSize() - }; - - AddCellToSize(cell); - - cells.Add(cell); + AddCellToSize(dataCellX); + cells.Add(dataCellX); } } - private void AddCellToSize(DataCellX cell) + private void AddCellToSize(CellX cell) { int initialCount = cells.Count; @@ -79,7 +75,39 @@ private void AddCellToSize(DataCellX cell) public void Render(ITablePrinter tablePrinter, List cellWidths) { - dataRow.Render(tablePrinter, cellWidths, Size.Height); + for (int i = 0; i < cells.Count; i++) + { + CellX cellX = cells[i]; + + Size size = new Size(cellWidths[i], Size.Height); + cellX.InitializeRendering(size); + } + + BorderTemplate borderTemplate = dataRow.ParentDataGrid?.BorderTemplate; + bool displayBorder = borderTemplate != null && dataRow.ParentDataGrid?.DisplayBorder == true; + + for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) + { + if (displayBorder) + tablePrinter.WriteBorder(borderTemplate.Left); + + for (int columnIndex = 0; columnIndex < cells.Count; columnIndex++) + { + CellX cellX = cells[columnIndex]; + cellX.RenderNextLine(tablePrinter); + + if (displayBorder) + { + char cellBorderRight = columnIndex < cells.Count - 1 + ? borderTemplate.Vertical + : borderTemplate.Right; + + tablePrinter.WriteBorder(cellBorderRight); + } + } + + tablePrinter.WriteLine(); + } } public void UpdateColumnsWidths(List columnsWidths) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs index 391b0bb7..e6d00e32 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs @@ -27,14 +27,14 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel internal class HeaderRowX { private readonly bool hasBorder; - private readonly ColumnList columns; - private readonly List cells = new List(); + private readonly HeaderRow headerRow; + private readonly List cells = new List(); public Size Size { get; private set; } - public HeaderRowX(ColumnList columns, bool hasBorder) + public HeaderRowX(HeaderRow headerRow, bool hasBorder) { - this.columns = columns ?? throw new ArgumentNullException(nameof(columns)); + this.headerRow = headerRow ?? throw new ArgumentNullException(nameof(headerRow)); this.hasBorder = hasBorder; CreateCells(); @@ -42,19 +42,16 @@ public HeaderRowX(ColumnList columns, bool hasBorder) private void CreateCells() { - foreach (Column column in columns) + foreach (HeaderCell headerCell in headerRow) { - DataCellX cell = new DataCellX - { - Size = column.HeaderCell.CalculatePreferredSize() - }; + CellX cell = new CellX(headerCell); AddCellToSize(cell); cells.Add(cell); } } - private void AddCellToSize(DataCellX cell) + private void AddCellToSize(CellX cell) { int width = cells.Count == 0 && hasBorder ? 1 @@ -75,7 +72,7 @@ private void AddCellToSize(DataCellX cell) public void Render(ITablePrinter tablePrinter, List cellWidths) { int rowHeight = Size.Height; - columns.RenderHeaderRow(tablePrinter, cellWidths, rowHeight); + headerRow.Render(tablePrinter, cellWidths, rowHeight); } public void UpdateColumnsWidths(List columnsWidths) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs index c0b4bff9..1982c105 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs @@ -19,23 +19,55 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; +using System.Collections.Generic; +using System.Linq; + namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleRowX { - public TitleRow TitleRow { get; } + private readonly TitleRow titleRow; + private readonly bool isVisible; + private readonly CellX cellX; + public Size Size { get; set; } public TitleRowX(TitleRow titleRow) { - TitleRow = titleRow; + this.titleRow = titleRow; + isVisible = titleRow != null; Size = titleRow?.CalculatePreferredSize() ?? Size.Empty; + cellX = new CellX(titleRow?.TitleCell); } public void Render(ITablePrinter tablePrinter) { - TitleRow?.Render(tablePrinter, Size); + if (!isVisible) + return; + + BorderTemplate borderTemplate = titleRow?.ParentDataGrid?.BorderTemplate; + bool displayBorder = borderTemplate != null && titleRow?.ParentDataGrid?.DisplayBorder == true; + + Size cellSize = displayBorder + ? Size.InflateWidth(-2) + : Size; + + cellX.InitializeRendering(cellSize); + + for (int lineIndex = 0; lineIndex < cellSize.Height; lineIndex++) + { + if (displayBorder) + tablePrinter.WriteBorder(borderTemplate.Left); + + cellX.RenderNextLine(tablePrinter); + + if (displayBorder) + tablePrinter.WriteBorder(borderTemplate.Right); + + tablePrinter.WriteLine(); + } } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs index 310c982d..78862a71 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs @@ -19,6 +19,8 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; + namespace DustInTheWind.ConsoleTools.Controls.Tables { /// @@ -138,6 +140,20 @@ protected override int CalculatePaddingRight() return ParentRow?.ParentDataGrid?.CellPaddingRight ?? 0; } + public override ConsoleColor? CalculateForegroundColor() + { + return ForegroundColor + ?? ParentRow?.ForegroundColor + ?? ParentRow?.ParentDataGrid?.ForegroundColor; + } + + public override ConsoleColor? CalculateBackgroundColor() + { + return BackgroundColor + ?? ParentRow?.BackgroundColor + ?? ParentRow?.ParentDataGrid?.BackgroundColor; + } + /// /// Calculates and returns the horizontal alignment of the content displayed in the cell. /// The value is calculated taking into account also the parent row and parent table. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs index 9895f68d..b8bdbe0a 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs @@ -19,6 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; using System.Collections.Generic; namespace DustInTheWind.ConsoleTools.Controls.Tables @@ -39,6 +40,18 @@ public class TitleRow /// public DataGrid ParentDataGrid { get; internal set; } + /// + /// Gets or sets the foreground color for the title. + /// Default value: null + /// + public ConsoleColor? ForegroundColor { get; set; } + + /// + /// Gets or sets the background color for the title. + /// Default value: null + /// + public ConsoleColor? BackgroundColor { get; set; } + /// /// Gets or sets the content alignment. /// @@ -53,6 +66,12 @@ public HorizontalAlignment HorizontalAlignment /// public bool HasContent => TitleCell?.Content?.IsEmpty == false; + /// + /// Gets or sets a value that specifies if the title row is displayed. + /// Default value: true + /// + public bool IsVisible { get; set; } = true; + /// /// Initializes a new instance of the class with /// empty content. diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs index 117da914..4b3ff221 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs @@ -23,7 +23,7 @@ private static void DisplayUncoloredTable() dataGrid.Title = "Table without colors"; dataGrid.DisplayBorderBetweenRows = true; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; dataGrid.Display(); @@ -37,11 +37,11 @@ private static void DisplayColoredTable() dataGrid.ForegroundColor = ConsoleColor.Blue; dataGrid.BorderColor = ConsoleColor.DarkBlue; - dataGrid.TitleColor = ConsoleColor.Yellow; - dataGrid.HeaderColor = ConsoleColor.DarkYellow; + dataGrid.TitleRow.ForegroundColor = ConsoleColor.Yellow; + dataGrid.HeaderRow.ForegroundColor = ConsoleColor.DarkYellow; dataGrid.DisplayBorderBetweenRows = true; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; dataGrid.Display(); @@ -55,13 +55,13 @@ private static void DisplayBackgroundColoredTable() dataGrid.ForegroundColor = ConsoleColor.Blue; dataGrid.BorderColor = ConsoleColor.DarkBlue; - dataGrid.TitleColor = ConsoleColor.Yellow; - dataGrid.HeaderColor = ConsoleColor.DarkYellow; + dataGrid.TitleRow.ForegroundColor = ConsoleColor.Yellow; + dataGrid.HeaderRow.ForegroundColor = ConsoleColor.DarkYellow; dataGrid.BackgroundColor = ConsoleColor.Gray; dataGrid.DisplayBorderBetweenRows = true; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; dataGrid.Display(); @@ -75,16 +75,16 @@ private static void DisplayBackgroundColoredTable2() dataGrid.ForegroundColor = ConsoleColor.Blue; dataGrid.BorderColor = ConsoleColor.DarkBlue; - dataGrid.TitleColor = ConsoleColor.Yellow; - dataGrid.HeaderColor = ConsoleColor.DarkYellow; + dataGrid.TitleRow.ForegroundColor = ConsoleColor.Yellow; + dataGrid.HeaderRow.ForegroundColor = ConsoleColor.DarkYellow; dataGrid.BackgroundColor = ConsoleColor.Gray; dataGrid.BorderBackgroundColor = ConsoleColor.White; - dataGrid.TitleBackgroundColor = ConsoleColor.DarkYellow; - dataGrid.HeaderBackgroundColor = ConsoleColor.Yellow; + dataGrid.TitleRow.BackgroundColor = ConsoleColor.DarkYellow; + dataGrid.HeaderRow.BackgroundColor = ConsoleColor.Yellow; dataGrid.DisplayBorderBetweenRows = true; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; dataGrid.Display(); diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs index 6844547b..74b1b716 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/DoubleLineBorderCommand.cs @@ -38,7 +38,7 @@ public void Execute() dataGrid.Rows.Add("4,1", "4,2", "4,3", "4,4"); dataGrid.DisplayBorderBetweenRows = true; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs index f5d28e10..17586d00 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SimpleBorderCommand.cs @@ -38,7 +38,7 @@ public void Execute() dataGrid.Rows.Add("4,1", "4,2", "4,3", "4,4"); dataGrid.DisplayBorderBetweenRows = true; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.BorderTemplate = BorderTemplate.PlusMinusBorderTemplate; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs index 5f85b514..07843f20 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/SingleLineBorderCommand.cs @@ -38,7 +38,7 @@ public void Execute() dataGrid.Rows.Add("4,1", "4,2", "4,3", "4,4"); dataGrid.DisplayBorderBetweenRows = true; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/HorizontalBorderXTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/HorizontalBorderXTests.cs new file mode 100644 index 00000000..58a031d7 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/HorizontalBorderXTests.cs @@ -0,0 +1,35 @@ +//using DustInTheWind.ConsoleTools.Controls.Tables; +//using NUnit.Framework; + +//namespace DustInTheWind.ConsoleTools.Tests.TabularData +//{ +// [TestFixture] +// public class HorizontalBorderXTests +// { +// [Test] +// public void Test() +// { +// //HorizontalBorderX horizontalBorderX = new HorizontalBorderX(); + +// TableWriter tableWriter = new TableWriter(); +// RowX rowX = new RowX(); +// tableWriter.WriteRow(rowX); +// } +// } + +// public class TableWriter +// { +// public void WriteRow(RowX rowX) +// { + +// } +// } + +// public class RowX +// { +// } + +// public class HorizontalBorderX +// { +// } +//} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs index 4f1fd38d..c91d0aca 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs @@ -26,7 +26,7 @@ public class CellAlignmentPerColumnTests public void column_0_is_aligned_to_Right() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.DisplayColumnHeaders = false; + dataGrid.HeaderRow.IsVisible = false; Column column0 = new Column("Col 0"); column0.HorizontalAlignment = HorizontalAlignment.Right; @@ -59,7 +59,7 @@ public void column_0_is_aligned_to_Right() public void column_0_is_aligned_to_Right_and_cell_1_0_is_aligned_to_Left() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.DisplayColumnHeaders = false; + dataGrid.HeaderRow.IsVisible = false; Column column0 = new Column("Col 0"); column0.HorizontalAlignment = HorizontalAlignment.Right; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs index 06ae868d..030c02fc 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs @@ -26,7 +26,7 @@ public class CellAlignmentPerTableTests public void whole_table_is_aligned_to_Right_without_explicit_columns() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.DisplayColumnHeaders = false; + dataGrid.HeaderRow.IsVisible = false; dataGrid.CellHorizontalAlignment = HorizontalAlignment.Right; dataGrid.Rows.Add("0,0", "0,1", "0,2"); @@ -50,9 +50,8 @@ public void whole_table_is_aligned_to_Right_without_explicit_columns() public void whole_table_is_aligned_to_Right_with_explicit_declared_columns() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.DisplayColumnHeaders = false; dataGrid.CellHorizontalAlignment = HorizontalAlignment.Right; - dataGrid.DisplayColumnHeaders = false; + dataGrid.HeaderRow.IsVisible = false; Column column0 = new Column("Col 0"); dataGrid.Columns.Add(column0); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs index 64e4cb1b..1fb681a4 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs @@ -70,7 +70,7 @@ public void render_table_with_custom_border_and_headers() { DataGrid dataGrid = new DataGrid(); dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.Columns.Add(new Column("One")); dataGrid.Columns.Add(new Column("Two")); dataGrid.Columns.Add(new Column("Three")); @@ -97,7 +97,7 @@ public void render_table_with_custom_border_title_and_headers() DataGrid dataGrid = new DataGrid(); dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; dataGrid.Title = "My Title"; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.Columns.Add(new Column("One")); dataGrid.Columns.Add(new Column("Two")); dataGrid.Columns.Add(new Column("Three")); @@ -126,7 +126,7 @@ public void render_table_with_digit_and_letter_border() DataGrid dataGrid = new DataGrid(); dataGrid.BorderTemplate = new BorderTemplate("1234567890abcde"); dataGrid.Title = "My Title"; - dataGrid.DisplayColumnHeaders = true; + dataGrid.HeaderRow.IsVisible = true; dataGrid.CellPaddingLeft = 3; dataGrid.CellPaddingRight = 3; dataGrid.Columns.Add(new Column("One")); diff --git a/sources/TableStreaming/TableStreaming.Tests/TableStreaming.Tests.csproj b/sources/TableStreaming/TableStreaming.Tests/TableStreaming.Tests.csproj new file mode 100644 index 00000000..2af4a01d --- /dev/null +++ b/sources/TableStreaming/TableStreaming.Tests/TableStreaming.Tests.csproj @@ -0,0 +1,22 @@ + + + + netcoreapp3.1 + + false + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + diff --git a/sources/TableStreaming/TableStreaming.Tests/UnitTest1.cs b/sources/TableStreaming/TableStreaming.Tests/UnitTest1.cs new file mode 100644 index 00000000..e1cf7f16 --- /dev/null +++ b/sources/TableStreaming/TableStreaming.Tests/UnitTest1.cs @@ -0,0 +1,87 @@ +using System; +using System.IO; +using Xunit; + +namespace TableStreaming.Tests +{ + public class UnitTest1 + { + [Fact] + public void WhenWritingOneBorder_ThenOutputIsEmpty() + { + using (MemoryStream ms = new MemoryStream()) + { + TableTextStreamWriter tableTextStreamWriter = new TableTextStreamWriter(ms); + + BorderX borderX = new BorderX(); + tableTextStreamWriter.EnqueueHorizontalBorder(borderX); + tableTextStreamWriter.EndTable(); + + string expected = string.Empty; + AssertOutput(ms, expected); + } + } + + [Fact] + public void WhenWritingOneBorderAndOneRow_ThenOutputContainsBorderRowBorder() + { + using (MemoryStream ms = new MemoryStream()) + { + TableTextStreamWriter tableTextStreamWriter = new TableTextStreamWriter(ms); + + BorderX borderX = new BorderX(); + tableTextStreamWriter.EnqueueHorizontalBorder(borderX); + + RowX rowX = new RowX(); + tableTextStreamWriter.WriteRow(rowX, borderX); + + tableTextStreamWriter.EndTable(); + + string expected = string.Empty; + AssertOutput(ms, expected); + } + } + + private static void AssertOutput(Stream stream, string expected) + { + stream.Position = 0; + + StreamReader sr = new StreamReader(stream); + string actual = sr.ReadToEnd(); + + Assert.Equal(expected, actual); + } + } + + public class RowX + { + } + + public class BorderX + { + } + + public class TableTextStreamWriter + { + private readonly MemoryStream memoryStream; + private BorderX borderX; + + public TableTextStreamWriter(MemoryStream memoryStream) + { + this.memoryStream = memoryStream ?? throw new ArgumentNullException(nameof(memoryStream)); + } + + public void EnqueueHorizontalBorder(BorderX borderX) + { + this.borderX = borderX; + } + + public void EndTable() + { + } + + public void WriteRow(RowX rowX) + { + } + } +} diff --git a/sources/TableStreaming/TableStreaming.sln b/sources/TableStreaming/TableStreaming.sln new file mode 100644 index 00000000..0fb8372f --- /dev/null +++ b/sources/TableStreaming/TableStreaming.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TableStreaming", "TableStreaming\TableStreaming.csproj", "{5557567D-5F85-4913-B2AB-99E5B976001C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TableStreaming.Tests", "TableStreaming.Tests\TableStreaming.Tests.csproj", "{075C1F96-6FDD-43E7-A00A-8EFB349249DE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5557567D-5F85-4913-B2AB-99E5B976001C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5557567D-5F85-4913-B2AB-99E5B976001C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5557567D-5F85-4913-B2AB-99E5B976001C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5557567D-5F85-4913-B2AB-99E5B976001C}.Release|Any CPU.Build.0 = Release|Any CPU + {075C1F96-6FDD-43E7-A00A-8EFB349249DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {075C1F96-6FDD-43E7-A00A-8EFB349249DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {075C1F96-6FDD-43E7-A00A-8EFB349249DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {075C1F96-6FDD-43E7-A00A-8EFB349249DE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7606B6FD-507A-4344-8ECC-78ECAB48C009} + EndGlobalSection +EndGlobal diff --git a/sources/TableStreaming/TableStreaming/Class1.cs b/sources/TableStreaming/TableStreaming/Class1.cs new file mode 100644 index 00000000..4adbd218 --- /dev/null +++ b/sources/TableStreaming/TableStreaming/Class1.cs @@ -0,0 +1,8 @@ +using System; + +namespace TableStreaming +{ + public class Class1 + { + } +} diff --git a/sources/TableStreaming/TableStreaming/TableStreaming.csproj b/sources/TableStreaming/TableStreaming/TableStreaming.csproj new file mode 100644 index 00000000..cb631906 --- /dev/null +++ b/sources/TableStreaming/TableStreaming/TableStreaming.csproj @@ -0,0 +1,7 @@ + + + + netcoreapp3.1 + + + From 099f580d4f66f7d998ad6e8788ffa74d8fbc956b Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Fri, 11 Dec 2020 19:28:57 +0200 Subject: [PATCH 38/57] added foreground color and background color at row, column, header and title level. --- .../ConsoleTools.Controls.Tables/CellBase.cs | 51 +++++- .../ConsoleTools.Controls.Tables/Column.cs | 40 +++-- .../ConsoleTools.Controls.Tables/DataCell.cs | 145 ++++++++++-------- .../ConsoleTools.Controls.Tables/DataGrid.cs | 77 +++++----- .../ConsoleTools.Controls.Tables/DataRow.cs | 17 +- .../HeaderCell.cs | 141 +++++++++++------ .../ConsoleTools.Controls.Tables/HeaderRow.cs | 128 ++++++++++------ .../ITablePrinter.cs | 18 +-- .../Printers/ConsoleTablePrinter.cs | 2 +- .../Printers/StreamTablePrinter.cs | 2 +- .../Printers/StringTablePrinter.cs | 2 +- .../RenderingModel/CellX.cs | 4 +- .../RenderingModel/TitleRowX.cs | 4 - .../ConsoleTools.Controls.Tables/TitleCell.cs | 75 ++++++--- .../ConsoleTools.Controls.Tables/TitleRow.cs | 49 ++---- .../Controls/HorizontalAlignment.cs | 2 +- .../DataCellTests/RenderLineTests.cs | 32 ++-- .../TableTests/CellAlignmentPerColumnTests.cs | 4 +- .../TableTests/HeaderAlignmentTests.cs | 8 +- .../TableTests/TitleAlignmentTests.cs | 8 +- 20 files changed, 468 insertions(+), 341 deletions(-) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs index f56c938e..5fc28cd5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs @@ -29,6 +29,21 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// public abstract class CellBase { + /// + /// Gets the default horizontal alignment for a cell. + /// + public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; + + /// + /// Gets the default left padding applied for a cell. + /// + public static int DefaultPaddingLeft { get; } = 1; + + /// + /// Gets the default left padding applied for a cell. + /// + public static int DefaultPaddingRight { get; } = 1; + /// /// Gets or sets the content of the cell. /// @@ -39,23 +54,41 @@ public abstract class CellBase /// public bool IsEmpty => Content == null || Content.IsEmpty; + /// + /// Gets or sets the foreground color for the cell. + /// Default value: null + /// + public ConsoleColor? ForegroundColor { get; set; } + + /// + /// Gets or sets the background color for the cell. + /// Default value: null + /// + public ConsoleColor? BackgroundColor { get; set; } + /// /// Gets or sets the horizontal alignment of the content displayed in the cell. /// public HorizontalAlignment HorizontalAlignment { get; set; } - public ConsoleColor? ForegroundColor { get; set; } + /// + /// Gets or sets the padding applied to the left side of the cell. + /// + public int? PaddingLeft { get; set; } - public ConsoleColor? BackgroundColor { get; set; } + /// + /// Gets or sets the padding applied to the right side of the cell. + /// + public int? PaddingRight { get; set; } /// /// Initializes a new instance of the class with /// empty content. /// - protected CellBase() + protected CellBase(HorizontalAlignment horizontalAlignment = HorizontalAlignment.Default) { Content = MultilineText.Empty; - HorizontalAlignment = HorizontalAlignment.Default; + HorizontalAlignment = horizontalAlignment; } /// @@ -127,8 +160,14 @@ public Size CalculatePreferredSize() /// protected abstract int CalculatePaddingRight(); + /// + /// Returns the foreground color calculated based on the hierarchy from which the current cell is part of. + /// public abstract ConsoleColor? CalculateForegroundColor(); - + + /// + /// Returns the background color calculated based on the hierarchy from which the current cell is part of. + /// public abstract ConsoleColor? CalculateBackgroundColor(); /// @@ -150,7 +189,7 @@ public override string ToString() /// If the size is grater than the content, empty spaces are written. /// /// - public IEnumerable Render(Size size) + public IEnumerable RenderText(Size size) { for (int i = 0; i < size.Height; i++) yield return RenderLine(i, size.Width); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs index bc4fc4b4..654f9492 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs @@ -19,6 +19,8 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; + namespace DustInTheWind.ConsoleTools.Controls.Tables { /// @@ -32,24 +34,36 @@ public class Column public HeaderCell HeaderCell { get; } /// - /// Gets or sets the horizontal alignment for the content of the cells represented by the current instance of the . + /// Gets or sets the instance that contains the current instance. /// - public HorizontalAlignment HorizontalAlignment { get; set; } + public DataGrid ParentDataGrid { get; set; } /// - /// Gets or sets the instance that contains the current instance. + /// Gets or sets the foreground color applied to all the cells in the column. + /// Default value: null /// - public DataGrid ParentDataGrid { get; set; } + public ConsoleColor? ForegroundColor { get; set; } + + /// + /// Gets or sets the background color applied to all the cells in the column. + /// Default value: null + /// + public ConsoleColor? BackgroundColor { get; set; } + + /// + /// Gets or sets the horizontal alignment for the content of the cells represented by the current instance of the . + /// + public HorizontalAlignment CellHorizontalAlignment { get; set; } /// /// Gets or sets the padding applied to the left side of every cell. /// - public int? PaddingLeft { get; set; } + public int? CellPaddingLeft { get; set; } /// /// Gets or sets the padding applied to the right side of every cell. /// - public int? PaddingRight { get; set; } + public int? CellPaddingRight { get; set; } /// /// Initializes a new instance of the class. @@ -60,7 +74,7 @@ public Column() { ParentColumn = this }; - HorizontalAlignment = HorizontalAlignment.Default; + CellHorizontalAlignment = HorizontalAlignment.Default; } /// @@ -73,7 +87,7 @@ public Column(string header) { ParentColumn = this }; - HorizontalAlignment = HorizontalAlignment.Default; + CellHorizontalAlignment = HorizontalAlignment.Default; } /// @@ -86,7 +100,7 @@ public Column(string header, HorizontalAlignment horizontalAlignment) { ParentColumn = this }; - HorizontalAlignment = horizontalAlignment; + CellHorizontalAlignment = horizontalAlignment; } /// @@ -98,7 +112,7 @@ public Column(MultilineText header) { ParentColumn = this }; - HorizontalAlignment = HorizontalAlignment.Default; + CellHorizontalAlignment = HorizontalAlignment.Default; } /// @@ -110,7 +124,7 @@ public Column(MultilineText header, HorizontalAlignment horizontalAlignment) { ParentColumn = this }; - HorizontalAlignment = horizontalAlignment; + CellHorizontalAlignment = horizontalAlignment; } /// @@ -122,7 +136,7 @@ public Column(object header) { ParentColumn = this }; - HorizontalAlignment = HorizontalAlignment.Default; + CellHorizontalAlignment = HorizontalAlignment.Default; } /// @@ -134,7 +148,7 @@ public Column(object header, HorizontalAlignment horizontalAlignment) { ParentColumn = this }; - HorizontalAlignment = horizontalAlignment; + CellHorizontalAlignment = horizontalAlignment; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs index f7e2a119..28b8e81b 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs @@ -28,26 +28,11 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// public class DataCell : CellBase { - /// - /// Gets the default horizontal alignment for a data cell. - /// - public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; - /// /// Gets or sets the row that contains the current cell. /// public DataRow ParentRow { get; internal set; } - /// - /// Gets or sets the padding applied to the left side of the cell. - /// - public int? PaddingLeft { get; set; } - - /// - /// Gets or sets the padding applied to the right side of the cell. - /// - public int? PaddingRight { get; set; } - /// /// Initializes a new instance of the class with /// empty content. @@ -122,27 +107,30 @@ public DataCell(object content, HorizontalAlignment horizontalAlignment) /// protected override int CalculatePaddingLeft() { - if (PaddingLeft.HasValue) - return PaddingLeft.Value; + int? paddingLeft = PaddingLeft; + + if (paddingLeft != null) + return paddingLeft.Value; + + paddingLeft = ParentRow?.CellPaddingLeft; + + if (paddingLeft != null) + return paddingLeft.Value; + + Column column = GetColumn(); + paddingLeft = column?.CellPaddingLeft; - if (ParentRow != null) - { - if (ParentRow.CellPaddingLeft.HasValue) - return ParentRow.CellPaddingLeft.Value; + if (paddingLeft != null) + return paddingLeft.Value; - if (ParentRow.ParentDataGrid != null) - { - Column column = GetColumn(); + paddingLeft = ParentRow?.ParentDataGrid?.CellPaddingLeft; - if (column?.PaddingLeft != null) - return column.PaddingLeft.Value; + if (paddingLeft != null) + return paddingLeft.Value; - if (ParentRow.ParentDataGrid.CellPaddingLeft.HasValue) - return ParentRow.ParentDataGrid.CellPaddingLeft.Value; - } - } + paddingLeft = DefaultPaddingLeft; - return 0; + return paddingLeft.Value; } /// @@ -151,42 +139,66 @@ protected override int CalculatePaddingLeft() /// protected override int CalculatePaddingRight() { - if (PaddingRight.HasValue) - return PaddingRight.Value; - - if (ParentRow != null) - { - if (ParentRow.CellPaddingRight.HasValue) - return ParentRow.CellPaddingRight.Value; + int? paddingRight = PaddingRight; + if (paddingRight != null) + return paddingRight.Value; + paddingRight = ParentRow?.CellPaddingRight; + if (paddingRight != null) + return paddingRight.Value; - if (ParentRow.ParentDataGrid != null) - { - Column column = GetColumn(); + Column column = GetColumn(); + paddingRight = column?.CellPaddingRight; + if (paddingRight != null) + return paddingRight.Value; - if (column?.PaddingRight != null) - return column.PaddingRight.Value; + paddingRight = ParentRow?.ParentDataGrid?.CellPaddingRight; + if (paddingRight != null) + return paddingRight.Value; - if (ParentRow.ParentDataGrid.CellPaddingRight.HasValue) - return ParentRow.ParentDataGrid.CellPaddingRight.Value; - } - } + paddingRight = DefaultPaddingRight; - return 0; + return paddingRight.Value; } public override ConsoleColor? CalculateForegroundColor() { - return ForegroundColor - ?? ParentRow?.ForegroundColor - ?? ParentRow?.ParentDataGrid?.ForegroundColor; + ConsoleColor? color = ForegroundColor; + if (color != null) + return color; + + color = ParentRow?.ForegroundColor; + if (color != null) + return color; + + Column column = GetColumn(); + color = column?.ForegroundColor; + if (color != null) + return color; + + color = ParentRow?.ParentDataGrid?.ForegroundColor; + + return color; } public override ConsoleColor? CalculateBackgroundColor() { - return BackgroundColor - ?? ParentRow?.BackgroundColor - ?? ParentRow?.ParentDataGrid?.BackgroundColor; + ConsoleColor? color = BackgroundColor; + if (color != null) + return color; + + color = ParentRow?.BackgroundColor; + if (color != null) + return color; + + Column column = GetColumn(); + color = column?.BackgroundColor; + if (color != null) + return color; + + color = ParentRow?.ParentDataGrid?.BackgroundColor; + + return color; } /// @@ -198,32 +210,35 @@ protected override int CalculatePaddingRight() protected override HorizontalAlignment CalculateHorizontalAlignment() { HorizontalAlignment alignment = HorizontalAlignment; + if (alignment != HorizontalAlignment.Default) + return alignment; - if (alignment == HorizontalAlignment.Default) - alignment = CalculateHorizontalAlignmentAtRowLevel(); + alignment = CalculateHorizontalAlignmentAtRowLevel(); + if (alignment != HorizontalAlignment.Default) + return alignment; - if (alignment == HorizontalAlignment.Default) - alignment = CalculateHorizontalAlignmentAtColumnLevel(); + alignment = CalculateHorizontalAlignmentAtColumnLevel(); + if (alignment != HorizontalAlignment.Default) + return alignment; - if (alignment == HorizontalAlignment.Default) - alignment = CalculateHorizontalAlignmentAtTableLevel(); + alignment = CalculateHorizontalAlignmentAtTableLevel(); + if (alignment != HorizontalAlignment.Default) + return alignment; - if (alignment == HorizontalAlignment.Default) - alignment = DefaultHorizontalAlignment; + alignment = DefaultHorizontalAlignment; return alignment; } private HorizontalAlignment CalculateHorizontalAlignmentAtRowLevel() { - DataRow row = ParentRow; - return row?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + return ParentRow?.CellHorizontalAlignment ?? HorizontalAlignment.Default; } private HorizontalAlignment CalculateHorizontalAlignmentAtColumnLevel() { Column column = GetColumn(); - return column?.HorizontalAlignment ?? HorizontalAlignment.Default; + return column?.CellHorizontalAlignment ?? HorizontalAlignment.Default; } private Column GetColumn() diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index f6c1af27..ea93655e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -32,10 +32,21 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// public class DataGrid : BlockControl { + private TitleRow titleRow; + private HeaderRow headerRow; + /// /// Gets the instance that represents the title row of the table. /// - public TitleRow TitleRow { get; } + public TitleRow TitleRow + { + get => titleRow; + private set + { + titleRow = value; + titleRow.ParentDataGrid = this; + } + } /// /// Gets or sets the title of the current instance of the . @@ -46,15 +57,20 @@ public MultilineText Title set => TitleRow.TitleCell.Content = value; } + /// + /// Gets or sets the horizontal alignment for the content of the cells contained by the current table. + /// + public HorizontalAlignment CellHorizontalAlignment { get; set; } = ConsoleTools.HorizontalAlignment.Default; + /// /// Gets or sets the padding applied to the left side of every cell. /// - public int? CellPaddingLeft { get; set; } = 1; + public int? CellPaddingLeft { get; set; } /// /// Gets or sets the padding applied to the right side of every cell. /// - public int? CellPaddingRight { get; set; } = 1; + public int? CellPaddingRight { get; set; } /// /// Gets a value that specifies if border lines should be drawn between rows. @@ -62,11 +78,6 @@ public MultilineText Title /// public bool DisplayBorderBetweenRows { get; set; } - /// - /// Gets or sets the horizontal alignment for the content of the cells contained by the current table. - /// - public HorizontalAlignment CellHorizontalAlignment { get; set; } = ConsoleTools.HorizontalAlignment.Default; - /// /// Gets the list of columns contained by the current table. /// @@ -75,7 +86,15 @@ public MultilineText Title /// /// Gets the instance that represents the columns header row of the table. /// - public HeaderRow HeaderRow { get; } + public HeaderRow HeaderRow + { + get => headerRow; + set + { + headerRow = value; + headerRow.ParentDataGrid = this; + } + } /// /// The list of rows contained by the current table. @@ -120,10 +139,6 @@ public MultilineText Title /// public ConsoleColor? BorderBackgroundColor { get; set; } - public ConsoleColor? ForegroundColor { get; set; } - - public ConsoleColor? BackgroundColor { get; set; } - #region Obsolete Properties /// @@ -140,7 +155,7 @@ public bool DisplayTitle /// Gets or sets the foreground color for the title. /// Default value: null /// - [Obsolete("Use TitleRow.Color property instead.")] + [Obsolete("Use TitleRow.ForegroundColor property instead.")] public ConsoleColor? TitleColor { get; set; } /// @@ -165,7 +180,7 @@ public bool DisplayColumnHeaders /// Gets or sets the foreground color for the column headers. /// Default value: null /// - [Obsolete("Use HeaderRow.Color property instead.")] + [Obsolete("Use HeaderRow.ForegroundColor property instead.")] public ConsoleColor? HeaderColor { get; set; } /// @@ -184,12 +199,8 @@ public DataGrid() { Rows = new DataRowList(this); Columns = new ColumnList(this); - HeaderRow = new HeaderRow(Columns, this); - - TitleRow = new TitleRow - { - ParentDataGrid = this - }; + HeaderRow = new HeaderRow(Columns); + TitleRow = new TitleRow(); } /// @@ -200,12 +211,8 @@ public DataGrid(string title) { Rows = new DataRowList(this); Columns = new ColumnList(this); - HeaderRow = new HeaderRow(Columns, this); - - TitleRow = new TitleRow(title) - { - ParentDataGrid = this - }; + HeaderRow = new HeaderRow(Columns); + TitleRow = new TitleRow(title); } /// @@ -216,12 +223,8 @@ public DataGrid(MultilineText title) { Rows = new DataRowList(this); Columns = new ColumnList(this); - HeaderRow = new HeaderRow(Columns, this); - - TitleRow = new TitleRow(title) - { - ParentDataGrid = this - }; + HeaderRow = new HeaderRow(Columns); + TitleRow = new TitleRow(title); } /// @@ -232,12 +235,8 @@ public DataGrid(object title) { Rows = new DataRowList(this); Columns = new ColumnList(this); - HeaderRow = new HeaderRow(Columns, this); - - TitleRow = new TitleRow(title) - { - ParentDataGrid = this - }; + HeaderRow = new HeaderRow(Columns); + TitleRow = new TitleRow(title); } /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs index 461ba4fe..7cec560f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs @@ -22,7 +22,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables { @@ -49,7 +48,7 @@ public class DataRow : IEnumerable /// /// Gets or sets the horizontal alignment for the content of the cells contained by the current instance of the . /// - public HorizontalAlignment CellHorizontalAlignment { get; set; } + public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; /// /// Gets or sets the padding applied to the left side of every cell. @@ -60,9 +59,17 @@ public class DataRow : IEnumerable /// Gets or sets the padding applied to the right side of every cell. /// public int? CellPaddingRight { get; set; } - + + /// + /// Gets or sets the foreground color applied to all the cells in the row. + /// Default value: null + /// public ConsoleColor? ForegroundColor { get; set; } - + + /// + /// Gets or sets the background color applied to all the cells in the row. + /// Default value: null + /// public ConsoleColor? BackgroundColor { get; set; } /// @@ -271,7 +278,7 @@ public DataCell this[int index] public int? IndexOfCell(DataCell cell) { int indexOfCell = cells.IndexOf(cell); - return indexOfCell == -1 ? (int?) null : indexOfCell; + return indexOfCell == -1 ? (int?)null : indexOfCell; } public IEnumerator GetEnumerator() diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs index 46853017..a1625247 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs @@ -20,8 +20,6 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; -using System.Collections.Generic; -using System.Data.Common; namespace DustInTheWind.ConsoleTools.Controls.Tables { @@ -30,26 +28,11 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// public class HeaderCell : CellBase { - /// - /// Gets the default horizontal alignment for a column header cell. - /// - public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; - /// /// Gets or sets the column that contains the current cell. /// public Column ParentColumn { get; internal set; } - /// - /// Gets or sets the padding applied to the left side of the cell. - /// - public int? PaddingLeft { get; set; } - - /// - /// Gets or sets the padding applied to the right side of the cell. - /// - public int? PaddingRight { get; set; } - /// /// Initializes a new instance of the class with /// empty content. @@ -124,19 +107,25 @@ protected HeaderCell(object content, HorizontalAlignment horizontalAlignment) /// protected override int CalculatePaddingLeft() { - if (PaddingLeft.HasValue) - return PaddingLeft.Value; + int? paddingLeft = PaddingLeft; + if (paddingLeft != null) + return paddingLeft.Value; + + paddingLeft = ParentColumn?.CellPaddingLeft; + if (paddingLeft != null) + return paddingLeft.Value; - if (ParentColumn != null) - { - if (ParentColumn.PaddingLeft.HasValue) - return ParentColumn.PaddingLeft.Value; + paddingLeft = ParentColumn?.ParentDataGrid?.HeaderRow?.CellPaddingLeft; + if (paddingLeft != null) + return paddingLeft.Value; - if (ParentColumn.ParentDataGrid?.CellPaddingLeft != null) - return ParentColumn.ParentDataGrid.CellPaddingLeft.Value; - } + paddingLeft = ParentColumn?.ParentDataGrid?.CellPaddingLeft; + if (paddingLeft != null) + return paddingLeft.Value; - return 0; + paddingLeft = DefaultPaddingLeft; + + return paddingLeft.Value; } /// @@ -145,33 +134,65 @@ protected override int CalculatePaddingLeft() /// protected override int CalculatePaddingRight() { - if (PaddingRight.HasValue) - return PaddingRight.Value; + int? paddingRight = PaddingRight; + if (paddingRight != null) + return paddingRight.Value; + + paddingRight = ParentColumn?.CellPaddingRight; + if (paddingRight != null) + return paddingRight.Value; - if (ParentColumn != null) - { - if (ParentColumn.PaddingRight.HasValue) - return ParentColumn.PaddingRight.Value; + paddingRight = ParentColumn?.ParentDataGrid?.HeaderRow?.CellPaddingRight; + if (paddingRight != null) + return paddingRight.Value; - if (ParentColumn.ParentDataGrid?.CellPaddingRight != null) - return ParentColumn.ParentDataGrid.CellPaddingRight.Value; - } + paddingRight = ParentColumn?.ParentDataGrid?.CellPaddingRight; + if (paddingRight != null) + return paddingRight.Value; - return 0; + paddingRight = DefaultPaddingRight; + + return paddingRight.Value; } + /// public override ConsoleColor? CalculateForegroundColor() { - return ForegroundColor - ?? ParentColumn?.ParentDataGrid?.HeaderRow?.ForegroundColor - ?? ParentColumn?.ParentDataGrid?.ForegroundColor; + ConsoleColor? color = ForegroundColor; + if (color != null) + return color; + + color = ParentColumn?.ForegroundColor; + if (color != null) + return color; + + color = ParentColumn?.ParentDataGrid?.HeaderRow?.ForegroundColor; + if (color != null) + return color; + + color = ParentColumn?.ParentDataGrid?.ForegroundColor; + + return color; } + /// public override ConsoleColor? CalculateBackgroundColor() { - return BackgroundColor - ?? ParentColumn?.ParentDataGrid?.HeaderRow?.BackgroundColor - ?? ParentColumn?.ParentDataGrid?.BackgroundColor; + ConsoleColor? color = BackgroundColor; + if (color != null) + return color; + + color = ParentColumn?.BackgroundColor; + if (color != null) + return color; + + color = ParentColumn?.ParentDataGrid?.HeaderRow?.BackgroundColor; + if (color != null) + return color; + + color = ParentColumn?.ParentDataGrid?.BackgroundColor; + + return color; } /// @@ -181,19 +202,41 @@ protected override int CalculatePaddingRight() protected override HorizontalAlignment CalculateHorizontalAlignment() { HorizontalAlignment alignment = HorizontalAlignment; + if (alignment != HorizontalAlignment.Default) + return alignment; + + alignment = CalculateHorizontalAlignmentAtColumnLevel(); + if (alignment != HorizontalAlignment.Default) + return alignment; - if (alignment == HorizontalAlignment.Default) - alignment = ParentColumn?.HorizontalAlignment ?? HorizontalAlignment.Default; + alignment = CalculateHorizontalAlignmentAtHeaderRowLevel(); + if (alignment != HorizontalAlignment.Default) + return alignment; - if (alignment == HorizontalAlignment.Default) - alignment = ParentColumn?.ParentDataGrid?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + alignment = CalculateHorizontalAlignmentAtTableLevel(); + if (alignment != HorizontalAlignment.Default) + return alignment; - if (alignment == HorizontalAlignment.Default) - alignment = DefaultHorizontalAlignment; + alignment = DefaultHorizontalAlignment; return alignment; } + private HorizontalAlignment CalculateHorizontalAlignmentAtColumnLevel() + { + return ParentColumn?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + } + + private HorizontalAlignment CalculateHorizontalAlignmentAtHeaderRowLevel() + { + return ParentColumn?.ParentDataGrid?.HeaderRow?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + } + + private HorizontalAlignment CalculateHorizontalAlignmentAtTableLevel() + { + return ParentColumn?.ParentDataGrid?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + } + /// /// Converts the specified text into a instance. /// The text is used as the content for the cell. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs index 534274e9..4577a382 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs @@ -5,11 +5,21 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables { + /// + /// Represents the column header row of a table. + /// public class HeaderRow : IEnumerable { - private readonly DataGrid parentDataGrid; private readonly ColumnList columns; + /// + /// Gets or sets the instance that contains the current header row instance. + /// + public DataGrid ParentDataGrid { get; internal set; } + + /// + /// Gets the number of cells contained by the header row. + /// public int CellCount => columns.Count(); /// @@ -30,15 +40,77 @@ public class HeaderRow : IEnumerable /// public ConsoleColor? BackgroundColor { get; set; } + /// + /// Gets or sets the horizontal alignment for the content of all column header cells. + /// + public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; + + /// + /// Gets or sets the padding applied to the left side of every cell. + /// + public int? CellPaddingLeft { get; set; } + + /// + /// Gets or sets the padding applied to the right side of every cell. + /// + public int? CellPaddingRight { get; set; } + /// /// Initializes a new instance of the class with /// the list of columns /// and the that owns it. /// - public HeaderRow(ColumnList columns, DataGrid parentDataGrid) + public HeaderRow(ColumnList columns) { this.columns = columns ?? throw new ArgumentNullException(nameof(columns)); - this.parentDataGrid = parentDataGrid ?? throw new ArgumentNullException(nameof(parentDataGrid)); + } + + /// + /// Renders the row containing the column headers. + /// + /// The destination where the current instance must be rendered. + /// The widths of each header cell that must be rendered. + /// The height of the row to be rendered. If there are not enough text lines + /// in the content of a cell, spaces are written instead. + public void Render(ITablePrinter tablePrinter, List cellWidths, int rowHeight) + { + // Get cells content. + List> cellContents = columns + .Select((x, i) => + { + Size size = new Size(cellWidths[i], rowHeight); + return x.HeaderCell.RenderText(size).ToList(); + }) + .ToList(); + + bool displayBorder = ParentDataGrid?.DisplayBorder ?? true; + BorderTemplate borderTemplate = ParentDataGrid?.BorderTemplate; + + for (int headerLineIndex = 0; headerLineIndex < rowHeight; headerLineIndex++) + { + // Write left border. + if (displayBorder && borderTemplate != null) + tablePrinter.WriteBorder(borderTemplate.Left); + + for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) + { + // Write cell content. + string content = cellContents[columnIndex][headerLineIndex]; + tablePrinter.WriteColumnHeader(content); + + // Write intermediate or right border. + if (displayBorder && borderTemplate != null) + { + char cellBorderRight = columnIndex < columns.Count - 1 + ? borderTemplate.Vertical + : borderTemplate.Right; + + tablePrinter.WriteBorder(cellBorderRight); + } + } + + tablePrinter.WriteLine(); + } } public IEnumerator GetEnumerator() @@ -51,6 +123,8 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + #region HeaderCellEnumerator Class + private class HeaderCellEnumerator : IEnumerator { private readonly HeaderRow headerRow; @@ -88,52 +162,6 @@ public void Dispose() } } - /// - /// Renders the row containing the column headers. - /// - /// The destination where the current instance must be rendered. - /// The widths of each header cell that must be rendered. - /// The height of the row to be rendered. If there are not enough text lines - /// in the content of a cell, spaces are written instead. - public void Render(ITablePrinter tablePrinter, List cellWidths, int rowHeight) - { - // Get cells content. - List> cellContents = columns - .Select((x, i) => - { - Size size = new Size(cellWidths[i], rowHeight); - return x.HeaderCell.Render(size).ToList(); - }) - .ToList(); - - bool displayBorder = parentDataGrid?.DisplayBorder ?? true; - BorderTemplate borderTemplate = parentDataGrid?.BorderTemplate; - - for (int headerLineIndex = 0; headerLineIndex < rowHeight; headerLineIndex++) - { - // Write left border. - if (displayBorder && borderTemplate != null) - tablePrinter.WriteBorder(borderTemplate.Left); - - for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) - { - // Write cell content. - string content = cellContents[columnIndex][headerLineIndex]; - tablePrinter.WriteColumnHeader(content); - - // Write intermediate or right border. - if (displayBorder && borderTemplate != null) - { - char cellBorderRight = columnIndex < columns.Count - 1 - ? borderTemplate.Vertical - : borderTemplate.Right; - - tablePrinter.WriteBorder(cellBorderRight); - } - } - - tablePrinter.WriteLine(); - } - } + #endregion } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs index 16a66dfd..00d735e0 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs @@ -29,11 +29,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// public interface ITablePrinter { - /// - /// Writes the specified text, applying the formatting specific for a border. - /// - void WriteBorder(string text); - /// /// Writes the specified text, applying the formatting specific for a border, /// followed by the current line terminator. @@ -45,17 +40,6 @@ public interface ITablePrinter /// void WriteBorder(char c); - /// - /// Writes the specified character, applying the formatting specific for a border, - /// followed by the current line terminator. - /// - void WriteLineBorder(char c); - - /// - /// Writes the specified text, applying the formatting specific for the title. - /// - void WriteTitle(string text); - /// /// Writes the specified text, applying the formatting specific for the column headers. /// @@ -64,7 +48,7 @@ public interface ITablePrinter /// /// Writes the specified text, applying the default formatting. /// - void WriteNormal(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor); + void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor); /// /// Writes the current line terminator. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs index daf13732..29fdc107 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs @@ -148,7 +148,7 @@ public void WriteColumnHeader(string text) /// /// Writes the specified text to the using the . /// - public void WriteNormal(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) + public void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { Write(foregroundColor, backgroundColor, text); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs index 6288ebcc..cfbae25f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs @@ -96,7 +96,7 @@ public void WriteColumnHeader(string text) /// /// Writes the specified text in the underlying . /// - public void WriteNormal(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) + public void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { streamWriter.Write(text); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs index a574f2cf..c005328d 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs @@ -100,7 +100,7 @@ public void WriteColumnHeader(string text) /// /// Stores the specified text in the internal . /// - public void WriteNormal(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) + public void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { sb.Append(text); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs index 1aae769e..1a18b4de 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs @@ -42,7 +42,7 @@ public CellX(CellBase dataCell) public void InitializeRendering(Size size) { - lineEnumerator = dataCell.Render(size).GetEnumerator(); + lineEnumerator = dataCell.RenderText(size).GetEnumerator(); foregroundColor = dataCell.CalculateForegroundColor(); backgroundColor = dataCell.CalculateBackgroundColor(); } @@ -53,7 +53,7 @@ public void RenderNextLine(ITablePrinter tablePrinter) ? lineEnumerator.Current : null; - tablePrinter.WriteNormal(content, foregroundColor, backgroundColor); + tablePrinter.Write(content, foregroundColor, backgroundColor); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs index 1982c105..303cbb19 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs @@ -19,10 +19,6 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose -using System; -using System.Collections.Generic; -using System.Linq; - namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleRowX diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs index 78862a71..b83f7d32 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs @@ -28,26 +28,11 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// public class TitleCell : CellBase { - /// - /// Gets the default horizontal alignment for a title cell. - /// - public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; - /// /// Gets or sets the instance that owns the current instance. /// public TitleRow ParentRow { get; internal set; } - /// - /// Gets or sets the padding applied to the left side of the cell. - /// - public int? PaddingLeft { get; set; } - - /// - /// Gets or sets the padding applied to the right side of the cell. - /// - public int? PaddingRight { get; set; } - /// /// Initializes a new instance of the class with /// empty content. @@ -122,10 +107,21 @@ public TitleCell(object content, HorizontalAlignment horizontalAlignment) /// protected override int CalculatePaddingLeft() { - if (PaddingLeft.HasValue) - return PaddingLeft.Value; + int? paddingLeft = PaddingLeft; + if (paddingLeft != null) + return paddingLeft.Value; + + paddingLeft = ParentRow?.CellPaddingLeft; + if (paddingLeft != null) + return paddingLeft.Value; + + paddingLeft = ParentRow?.ParentDataGrid?.CellPaddingLeft; + if (paddingLeft != null) + return paddingLeft.Value; + + paddingLeft = DefaultPaddingLeft; - return ParentRow?.ParentDataGrid?.CellPaddingLeft ?? 0; + return paddingLeft.Value; } /// @@ -134,12 +130,24 @@ protected override int CalculatePaddingLeft() /// protected override int CalculatePaddingRight() { - if (PaddingRight.HasValue) - return PaddingRight.Value; + int? paddingRight = PaddingRight; + if (paddingRight != null) + return paddingRight.Value; - return ParentRow?.ParentDataGrid?.CellPaddingRight ?? 0; + paddingRight = ParentRow?.CellPaddingRight; + if (paddingRight != null) + return paddingRight.Value; + + paddingRight = ParentRow?.ParentDataGrid?.CellPaddingRight; + if (paddingRight != null) + return paddingRight.Value; + + paddingRight = DefaultPaddingRight; + + return paddingRight.Value; } + /// public override ConsoleColor? CalculateForegroundColor() { return ForegroundColor @@ -147,6 +155,7 @@ protected override int CalculatePaddingRight() ?? ParentRow?.ParentDataGrid?.ForegroundColor; } + /// public override ConsoleColor? CalculateBackgroundColor() { return BackgroundColor @@ -161,11 +170,31 @@ protected override int CalculatePaddingRight() protected override HorizontalAlignment CalculateHorizontalAlignment() { HorizontalAlignment alignment = HorizontalAlignment; + if (alignment != HorizontalAlignment.Default) + return alignment; - if (alignment == HorizontalAlignment.Default) - alignment = DefaultHorizontalAlignment; + alignment = CalculateHorizontalAlignmentAtRowLevel(); + if (alignment != HorizontalAlignment.Default) + return alignment; + + alignment = CalculateHorizontalAlignmentAtTableLevel(); + if (alignment != HorizontalAlignment.Default) + return alignment; + + alignment = DefaultHorizontalAlignment; return alignment; } + + private HorizontalAlignment CalculateHorizontalAlignmentAtRowLevel() + { + return ParentRow?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + } + + private HorizontalAlignment CalculateHorizontalAlignmentAtTableLevel() + { + DataGrid dataGrid = ParentRow?.ParentDataGrid; + return dataGrid?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs index b8bdbe0a..fa127619 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs @@ -20,7 +20,6 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; -using System.Collections.Generic; namespace DustInTheWind.ConsoleTools.Controls.Tables { @@ -55,11 +54,7 @@ public class TitleRow /// /// Gets or sets the content alignment. /// - public HorizontalAlignment HorizontalAlignment - { - get => TitleCell.HorizontalAlignment; - set => TitleCell.HorizontalAlignment = value; - } + public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; /// /// Gets a value that specifies if the current instance of the has a content to be displayed. @@ -72,6 +67,16 @@ public HorizontalAlignment HorizontalAlignment /// public bool IsVisible { get; set; } = true; + /// + /// Gets or sets the padding applied to the left side of every cell. + /// + public int? CellPaddingLeft { get; set; } + + /// + /// Gets or sets the padding applied to the right side of every cell. + /// + public int? CellPaddingRight { get; set; } + /// /// Initializes a new instance of the class with /// empty content. @@ -146,37 +151,5 @@ public Size CalculatePreferredSize() return new Size(titleRowWidth, cellSize.Height); } - - /// - /// Renders the current instance in the specified . - /// - /// The instance that will display the rendered title row. - /// The minimum width into which the current instance must be rendered. - public void Render(ITablePrinter tablePrinter, Size size) - { - BorderTemplate borderTemplate = ParentDataGrid?.BorderTemplate; - - bool displayBorder = borderTemplate != null && ParentDataGrid?.DisplayBorder == true; - - Size cellSize = displayBorder - ? size.InflateWidth(-2) - : size; - - IEnumerable cellContents = TitleCell.Render(cellSize); - - // Write title - foreach (string line in cellContents) - { - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Left); - - tablePrinter.WriteTitle(line); - - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Right); - - tablePrinter.WriteLine(); - } - } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs index 94363039..96b1d444 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs @@ -29,7 +29,7 @@ public enum HorizontalAlignment /// /// The container's default value will be used. /// - Default, + Default = 0, /// /// The element is displayed in the left side of the container. diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs index fc53822a..3bb435de 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs @@ -30,7 +30,7 @@ public void content_is_shorter_than_required_width() DataCell cell = new DataCell("text"); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { "text " })); } @@ -41,7 +41,7 @@ public void content_is_longer_than_required_width() DataCell cell = new DataCell("some long text"); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { "some long text" })); } @@ -52,7 +52,7 @@ public void content_is_shorter_than_required_height() DataCell cell = new DataCell("text"); Size size = new Size(10, 2); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { @@ -67,7 +67,7 @@ public void content_is_longer_than_required_height() DataCell cell = new DataCell(new MultilineText(new[] { "line1", "line2", "line3" })); Size size = new Size(10, 2); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { @@ -90,7 +90,7 @@ public void cell_has_padding_left() row.AddCell(cell); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { " text " })); } @@ -101,8 +101,8 @@ public void parent_column_has_padding_left() DataGrid dataGrid = new DataGrid(); Column column = new Column(string.Empty) { - PaddingLeft = 2, - PaddingRight = 0 + CellPaddingLeft = 2, + CellPaddingRight = 0 }; dataGrid.Columns.Add(column); DataRow row = new DataRow(); @@ -111,7 +111,7 @@ public void parent_column_has_padding_left() row.AddCell(cell); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { " text " })); } @@ -130,7 +130,7 @@ public void parent_row_has_padding_left() row.AddCell(cell); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { " text " })); } @@ -149,7 +149,7 @@ public void parent_table_has_padding_left() row.AddCell(cell); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { " text " })); } @@ -169,7 +169,7 @@ public void cell_has_padding_right() row.AddCell(cell); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { " text " })); } @@ -180,8 +180,8 @@ public void parent_column_has_padding_right() DataGrid dataGrid = new DataGrid(); Column column = new Column(string.Empty) { - PaddingLeft = 0, - PaddingRight = 2 + CellPaddingLeft = 0, + CellPaddingRight = 2 }; dataGrid.Columns.Add(column); DataRow row = new DataRow(); @@ -193,7 +193,7 @@ public void parent_column_has_padding_right() row.AddCell(cell); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { " text " })); } @@ -215,7 +215,7 @@ public void parent_row_has_padding_right() row.AddCell(cell); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { " text " })); } @@ -237,7 +237,7 @@ public void parent_table_has_padding_right() row.AddCell(cell); Size size = new Size(10, 1); - List actual = cell.Render(size).ToList(); + List actual = cell.RenderText(size).ToList(); Assert.That(actual, Is.EqualTo(new List { " text " })); } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs index c91d0aca..910ff701 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs @@ -29,7 +29,7 @@ public void column_0_is_aligned_to_Right() dataGrid.HeaderRow.IsVisible = false; Column column0 = new Column("Col 0"); - column0.HorizontalAlignment = HorizontalAlignment.Right; + column0.CellHorizontalAlignment = HorizontalAlignment.Right; dataGrid.Columns.Add(column0); Column column1 = new Column("Col 1"); @@ -62,7 +62,7 @@ public void column_0_is_aligned_to_Right_and_cell_1_0_is_aligned_to_Left() dataGrid.HeaderRow.IsVisible = false; Column column0 = new Column("Col 0"); - column0.HorizontalAlignment = HorizontalAlignment.Right; + column0.CellHorizontalAlignment = HorizontalAlignment.Right; dataGrid.Columns.Add(column0); Column column1 = new Column("Col 1"); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs index 96ff5130..68ab2310 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs @@ -57,7 +57,7 @@ public void header_cell_1_is_alignment_Default_after_cell_creation() dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); - dataGrid.Columns[1].HorizontalAlignment = HorizontalAlignment.Default; + dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Default; string expected = @"+--------------------------------------------------------+ @@ -83,7 +83,7 @@ public void header_cell_1_is_alignment_Left_after_cell_creation() dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); - dataGrid.Columns[1].HorizontalAlignment = HorizontalAlignment.Left; + dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Left; string expected = @"+--------------------------------------------------------+ @@ -109,7 +109,7 @@ public void header_cell_1_is_alignment_Center_after_cell_creation() dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); - dataGrid.Columns[1].HorizontalAlignment = HorizontalAlignment.Center; + dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Center; string expected = @"+--------------------------------------------------------+ @@ -135,7 +135,7 @@ public void header_cell_1_is_alignment_Right_after_cell_creation() dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); - dataGrid.Columns[1].HorizontalAlignment = HorizontalAlignment.Right; + dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Right; string expected = @"+--------------------------------------------------------+ diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs index 5910d90d..49700edb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs @@ -43,7 +43,7 @@ public void title_alignment_Default() { DataGrid dataGrid = new DataGrid("Title"); dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); - dataGrid.TitleRow.HorizontalAlignment = HorizontalAlignment.Default; + dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Default; string expected = @"+--------------------------------+ @@ -60,7 +60,7 @@ public void title_alignment_Left() { DataGrid dataGrid = new DataGrid("Title"); dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); - dataGrid.TitleRow.HorizontalAlignment = HorizontalAlignment.Left; + dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Left; string expected = @"+--------------------------------+ @@ -77,7 +77,7 @@ public void title_alignment_Center() { DataGrid dataGrid = new DataGrid("Title"); dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); - dataGrid.TitleRow.HorizontalAlignment = HorizontalAlignment.Center; + dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Center; string expected = @"+--------------------------------+ @@ -94,7 +94,7 @@ public void title_alignment_Right() { DataGrid dataGrid = new DataGrid("Title"); dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); - dataGrid.TitleRow.HorizontalAlignment = HorizontalAlignment.Right; + dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Right; string expected = @"+--------------------------------+ From 8218a90b01c299ee854d3589aecdedf30e4fa413 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Fri, 11 Dec 2020 22:21:45 +0200 Subject: [PATCH 39/57] fixed header row colors. --- .../ConsoleTools.Controls.Tables/DataGrid.cs | 4 - .../ConsoleTools.Controls.Tables/DataRow.cs | 61 ++------- .../HeaderCell.cs | 28 ++-- .../ConsoleTools.Controls.Tables/HeaderRow.cs | 122 +++++------------- .../ITablePrinter.cs | 5 - .../Printers/ConsoleTablePrinter.cs | 69 ---------- .../Printers/StreamTablePrinter.cs | 32 ----- .../Printers/StringTablePrinter.cs | 33 ----- .../RenderingModel/DataGridXBuilder.cs | 1 + .../RenderingModel/HeaderRowX.cs | 51 ++++++-- .../ConsoleTools.Controls.Tables/RowBase.cs | 80 ++++++++++++ .../ConsoleTools.Controls.Tables/TitleCell.cs | 18 --- .../ConsoleTools.Controls.Tables/TitleRow.cs | 83 ++++++------ 13 files changed, 227 insertions(+), 360 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index ea93655e..0210ec9e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -248,13 +248,9 @@ protected override void DoDisplayContent(ControlDisplay display) { ForegroundColor = ForegroundColor, BorderColor = BorderColor, - TitleColor = TitleRow.ForegroundColor, - HeaderColor = HeaderRow.ForegroundColor, BackgroundColor = BackgroundColor, BorderBackgroundColor = BorderBackgroundColor, - TitleBackgroundColor = TitleRow.BackgroundColor, - HeaderBackgroundColor = HeaderRow.BackgroundColor }; RenderInternal(consoleTablePrinter); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs index 7cec560f..0cbc3622 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs @@ -28,49 +28,29 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// /// Represents a row in the class. /// - public class DataRow : IEnumerable + public class DataRow : RowBase { /// /// Gets the list of cells contained by the row. /// private readonly List cells = new List(); - /// - /// Gets or sets the instance that contains the current instance. - /// - public DataGrid ParentDataGrid { get; internal set; } - /// /// Gets the number of cells contained by the current instance. /// - public int CellCount => cells.Count; - - /// - /// Gets or sets the horizontal alignment for the content of the cells contained by the current instance of the . - /// - public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; - - /// - /// Gets or sets the padding applied to the left side of every cell. - /// - public int? CellPaddingLeft { get; set; } - - /// - /// Gets or sets the padding applied to the right side of every cell. - /// - public int? CellPaddingRight { get; set; } - - /// - /// Gets or sets the foreground color applied to all the cells in the row. - /// Default value: null - /// - public ConsoleColor? ForegroundColor { get; set; } + public override int CellCount => cells.Count; /// - /// Gets or sets the background color applied to all the cells in the row. - /// Default value: null + /// Gets or sets the cell at the specified index. /// - public ConsoleColor? BackgroundColor { get; set; } + /// The zero-based index of the cell to get or set. + /// The cell at the specified index. + /// + public DataCell this[int index] + { + get => cells[index]; + set => cells[index] = value; + } /// /// Initializes a new instance of the class with default values. @@ -259,18 +239,6 @@ public void AddCell(object cellContent) cells.Add(newCell); } - /// - /// Gets or sets the cell at the specified index. - /// - /// The zero-based index of the cell to get or set. - /// The cell at the specified index. - /// - public DataCell this[int index] - { - get => cells[index]; - set => cells[index] = value; - } - /// /// Returns the index of the specified cell or null if the instance /// is not found in the current instance. @@ -281,14 +249,9 @@ public DataCell this[int index] return indexOfCell == -1 ? (int?)null : indexOfCell; } - public IEnumerator GetEnumerator() + public override IEnumerator GetEnumerator() { return cells.GetEnumerator(); } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs index a1625247..dbd62ac5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs @@ -111,11 +111,11 @@ protected override int CalculatePaddingLeft() if (paddingLeft != null) return paddingLeft.Value; - paddingLeft = ParentColumn?.CellPaddingLeft; + paddingLeft = ParentColumn?.ParentDataGrid?.HeaderRow?.CellPaddingLeft; if (paddingLeft != null) return paddingLeft.Value; - paddingLeft = ParentColumn?.ParentDataGrid?.HeaderRow?.CellPaddingLeft; + paddingLeft = ParentColumn?.CellPaddingLeft; if (paddingLeft != null) return paddingLeft.Value; @@ -138,11 +138,11 @@ protected override int CalculatePaddingRight() if (paddingRight != null) return paddingRight.Value; - paddingRight = ParentColumn?.CellPaddingRight; + paddingRight = ParentColumn?.ParentDataGrid?.HeaderRow?.CellPaddingRight; if (paddingRight != null) return paddingRight.Value; - paddingRight = ParentColumn?.ParentDataGrid?.HeaderRow?.CellPaddingRight; + paddingRight = ParentColumn?.CellPaddingRight; if (paddingRight != null) return paddingRight.Value; @@ -162,11 +162,11 @@ protected override int CalculatePaddingRight() if (color != null) return color; - color = ParentColumn?.ForegroundColor; + color = ParentColumn?.ParentDataGrid?.HeaderRow?.ForegroundColor; if (color != null) return color; - color = ParentColumn?.ParentDataGrid?.HeaderRow?.ForegroundColor; + color = ParentColumn?.ForegroundColor; if (color != null) return color; @@ -182,11 +182,11 @@ protected override int CalculatePaddingRight() if (color != null) return color; - color = ParentColumn?.BackgroundColor; + color = ParentColumn?.ParentDataGrid?.HeaderRow?.BackgroundColor; if (color != null) return color; - color = ParentColumn?.ParentDataGrid?.HeaderRow?.BackgroundColor; + color = ParentColumn?.BackgroundColor; if (color != null) return color; @@ -205,11 +205,11 @@ protected override HorizontalAlignment CalculateHorizontalAlignment() if (alignment != HorizontalAlignment.Default) return alignment; - alignment = CalculateHorizontalAlignmentAtColumnLevel(); + alignment = CalculateHorizontalAlignmentAtHeaderRowLevel(); if (alignment != HorizontalAlignment.Default) return alignment; - alignment = CalculateHorizontalAlignmentAtHeaderRowLevel(); + alignment = CalculateHorizontalAlignmentAtColumnLevel(); if (alignment != HorizontalAlignment.Default) return alignment; @@ -222,14 +222,14 @@ protected override HorizontalAlignment CalculateHorizontalAlignment() return alignment; } - private HorizontalAlignment CalculateHorizontalAlignmentAtColumnLevel() + private HorizontalAlignment CalculateHorizontalAlignmentAtHeaderRowLevel() { - return ParentColumn?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + return ParentColumn?.ParentDataGrid?.HeaderRow?.CellHorizontalAlignment ?? HorizontalAlignment.Default; } - private HorizontalAlignment CalculateHorizontalAlignmentAtHeaderRowLevel() + private HorizontalAlignment CalculateHorizontalAlignmentAtColumnLevel() { - return ParentColumn?.ParentDataGrid?.HeaderRow?.CellHorizontalAlignment ?? HorizontalAlignment.Default; + return ParentColumn?.CellHorizontalAlignment ?? HorizontalAlignment.Default; } private HorizontalAlignment CalculateHorizontalAlignmentAtTableLevel() diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs index 4577a382..6d09ffd1 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderRow.cs @@ -1,3 +1,24 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + using System; using System.Collections; using System.Collections.Generic; @@ -8,52 +29,22 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// /// Represents the column header row of a table. /// - public class HeaderRow : IEnumerable + public class HeaderRow : RowBase { private readonly ColumnList columns; - /// - /// Gets or sets the instance that contains the current header row instance. - /// - public DataGrid ParentDataGrid { get; internal set; } - /// /// Gets the number of cells contained by the header row. /// - public int CellCount => columns.Count(); + public override int CellCount => columns.Count(); /// - /// Gets or sets a value that specifies if the column headers are displayed. - /// Default value: true + /// Gets the cell at the specified index. /// - public bool IsVisible { get; set; } = true; - - /// - /// Gets or sets the foreground color for the column headers. - /// Default value: null - /// - public ConsoleColor? ForegroundColor { get; set; } - - /// - /// Gets or sets the background color for the column headers. - /// Default value: null - /// - public ConsoleColor? BackgroundColor { get; set; } - - /// - /// Gets or sets the horizontal alignment for the content of all column header cells. - /// - public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; - - /// - /// Gets or sets the padding applied to the left side of every cell. - /// - public int? CellPaddingLeft { get; set; } - - /// - /// Gets or sets the padding applied to the right side of every cell. - /// - public int? CellPaddingRight { get; set; } + /// The zero-based index of the cell to get. + /// The cell at the specified index. + /// + public HeaderCell this[int index] => columns[index].HeaderCell; /// /// Initializes a new instance of the class with @@ -65,65 +56,12 @@ public HeaderRow(ColumnList columns) this.columns = columns ?? throw new ArgumentNullException(nameof(columns)); } - /// - /// Renders the row containing the column headers. - /// - /// The destination where the current instance must be rendered. - /// The widths of each header cell that must be rendered. - /// The height of the row to be rendered. If there are not enough text lines - /// in the content of a cell, spaces are written instead. - public void Render(ITablePrinter tablePrinter, List cellWidths, int rowHeight) - { - // Get cells content. - List> cellContents = columns - .Select((x, i) => - { - Size size = new Size(cellWidths[i], rowHeight); - return x.HeaderCell.RenderText(size).ToList(); - }) - .ToList(); - - bool displayBorder = ParentDataGrid?.DisplayBorder ?? true; - BorderTemplate borderTemplate = ParentDataGrid?.BorderTemplate; - - for (int headerLineIndex = 0; headerLineIndex < rowHeight; headerLineIndex++) - { - // Write left border. - if (displayBorder && borderTemplate != null) - tablePrinter.WriteBorder(borderTemplate.Left); - - for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) - { - // Write cell content. - string content = cellContents[columnIndex][headerLineIndex]; - tablePrinter.WriteColumnHeader(content); - - // Write intermediate or right border. - if (displayBorder && borderTemplate != null) - { - char cellBorderRight = columnIndex < columns.Count - 1 - ? borderTemplate.Vertical - : borderTemplate.Right; - - tablePrinter.WriteBorder(cellBorderRight); - } - } - - tablePrinter.WriteLine(); - } - } - - public IEnumerator GetEnumerator() + public override IEnumerator GetEnumerator() { return new HeaderCellEnumerator(this); } - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - #region HeaderCellEnumerator Class + #region Enumerator Class private class HeaderCellEnumerator : IEnumerator { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs index 00d735e0..f50c5780 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs @@ -40,11 +40,6 @@ public interface ITablePrinter /// void WriteBorder(char c); - /// - /// Writes the specified text, applying the formatting specific for the column headers. - /// - void WriteColumnHeader(string text); - /// /// Writes the specified text, applying the default formatting. /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs index 29fdc107..c0043caf 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs @@ -35,18 +35,6 @@ public class ConsoleTablePrinter : ITablePrinter /// public ConsoleColor? BorderColor { get; set; } = ConsoleColor.Gray; - /// - /// Gets or sets the foreground color for the title. - /// Default value: White - /// - public ConsoleColor? TitleColor { get; set; } = ConsoleColor.White; - - /// - /// Gets or sets the foreground color for the column headers. - /// Default value: White - /// - public ConsoleColor? HeaderColor { get; set; } = ConsoleColor.White; - /// /// Gets or sets the default foreground color. /// Default value: Gray @@ -65,29 +53,6 @@ public class ConsoleTablePrinter : ITablePrinter /// public ConsoleColor? BorderBackgroundColor { get; set; } - /// - /// Gets or sets the background color for the title. - /// Default value: null - /// - public ConsoleColor? TitleBackgroundColor { get; set; } - - /// - /// Gets or sets the background color for the column headers. - /// Default value: null - /// - public ConsoleColor? HeaderBackgroundColor { get; set; } - - /// - /// Writes the specified text to the using the . - /// - public void WriteBorder(string text) - { - ConsoleColor? foregroundColor = BorderColor ?? ForegroundColor; - ConsoleColor? backgroundColor = BorderBackgroundColor ?? BackgroundColor; - - Write(foregroundColor, backgroundColor, text); - } - /// /// Writes the specified character to the using the . /// @@ -111,40 +76,6 @@ public void WriteLineBorder(string text) WriteLine(foregroundColor, backgroundColor, text); } - /// - /// Writes the specified character to the using the , - /// followed by a line terminator. - /// - public void WriteLineBorder(char c) - { - ConsoleColor? foregroundColor = BorderColor ?? ForegroundColor; - ConsoleColor? backgroundColor = BorderBackgroundColor ?? BackgroundColor; - - WriteLine(foregroundColor, backgroundColor, c); - } - - /// - /// Writes the specified text to the using the . - /// - public void WriteTitle(string text) - { - ConsoleColor? foregroundColor = TitleColor ?? ForegroundColor; - ConsoleColor? backgroundColor = TitleBackgroundColor ?? BackgroundColor; - - Write(foregroundColor, backgroundColor, text); - } - - /// - /// Writes the specified text to the using the . - /// - public void WriteColumnHeader(string text) - { - ConsoleColor? foregroundColor = HeaderColor ?? ForegroundColor; - ConsoleColor? backgroundColor = HeaderBackgroundColor ?? BackgroundColor; - - Write(foregroundColor, backgroundColor, text); - } - /// /// Writes the specified text to the using the . /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs index cfbae25f..db88d7fd 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs @@ -45,14 +45,6 @@ public StreamTablePrinter(Stream stream) streamWriter = new StreamWriter(stream); } - /// - /// Writes the specified text in the underlying . - /// - public void WriteBorder(string text) - { - streamWriter.Write(text); - } - /// /// Writes the specified character in the underlying . /// @@ -69,30 +61,6 @@ public void WriteLineBorder(string text) streamWriter.WriteLine(text); } - /// - /// Writes the specified text in the underlying , followed by a line terminator. - /// - public void WriteLineBorder(char c) - { - streamWriter.WriteLine(c.ToString()); - } - - /// - /// Writes the specified text in the underlying . - /// - public void WriteTitle(string text) - { - streamWriter.Write(text); - } - - /// - /// Writes the specified text in the underlying . - /// - public void WriteColumnHeader(string text) - { - streamWriter.Write(text); - } - /// /// Writes the specified text in the underlying . /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs index c005328d..ccc6a1bf 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs @@ -40,15 +40,6 @@ public StringTablePrinter() sb = new StringBuilder(); } - /// - /// Initializes a new instance of the class with - /// the into which tp store the texts. - /// - public StringTablePrinter(StringBuilder sb) - { - this.sb = sb ?? throw new ArgumentNullException(nameof(sb)); - } - /// /// Stores the specified text in the internal . /// @@ -73,30 +64,6 @@ public void WriteLineBorder(string text) sb.AppendLine(text); } - /// - /// Stores the specified character in the internal , followed by a line terminator. - /// - public void WriteLineBorder(char c) - { - sb.AppendLine(c.ToString()); - } - - /// - /// Stores the specified text in the internal . - /// - public void WriteTitle(string text) - { - sb.Append(text); - } - - /// - /// Stores the specified text in the internal . - /// - public void WriteColumnHeader(string text) - { - sb.Append(text); - } - /// /// Stores the specified text in the internal . /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index 50485185..8fb25e42 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -86,6 +86,7 @@ private void AddHeader() private void AddRows() { IEnumerable rows = Rows + .Where(x => x.IsVisible) .Select(x => new DataRowX(x, DisplayBorder)); foreach (DataRowX row in rows) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs index e6d00e32..ddc6c014 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { @@ -42,18 +43,21 @@ public HeaderRowX(HeaderRow headerRow, bool hasBorder) private void CreateCells() { - foreach (HeaderCell headerCell in headerRow) - { - CellX cell = new CellX(headerCell); + IEnumerable dataCellXes = headerRow + .Select(x => new CellX(x)); - AddCellToSize(cell); - cells.Add(cell); + foreach (CellX dataCellX in dataCellXes) + { + AddCellToSize(dataCellX); + cells.Add(dataCellX); } } private void AddCellToSize(CellX cell) { - int width = cells.Count == 0 && hasBorder + int initialCount = cells.Count; + + int width = initialCount == 0 && hasBorder ? 1 : Size.Width; @@ -71,8 +75,39 @@ private void AddCellToSize(CellX cell) public void Render(ITablePrinter tablePrinter, List cellWidths) { - int rowHeight = Size.Height; - headerRow.Render(tablePrinter, cellWidths, rowHeight); + for (int i = 0; i < cells.Count; i++) + { + CellX cellX = cells[i]; + + Size size = new Size(cellWidths[i], Size.Height); + cellX.InitializeRendering(size); + } + + BorderTemplate borderTemplate = headerRow.ParentDataGrid?.BorderTemplate; + bool displayBorder = borderTemplate != null && headerRow.ParentDataGrid?.DisplayBorder == true; + + for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) + { + if (displayBorder) + tablePrinter.WriteBorder(borderTemplate.Left); + + for (int columnIndex = 0; columnIndex < cells.Count; columnIndex++) + { + CellX cellX = cells[columnIndex]; + cellX.RenderNextLine(tablePrinter); + + if (displayBorder) + { + char cellBorderRight = columnIndex < cells.Count - 1 + ? borderTemplate.Vertical + : borderTemplate.Right; + + tablePrinter.WriteBorder(cellBorderRight); + } + } + + tablePrinter.WriteLine(); + } } public void UpdateColumnsWidths(List columnsWidths) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs new file mode 100644 index 00000000..b5375ed8 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs @@ -0,0 +1,80 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.Controls.Tables +{ + public abstract class RowBase : IEnumerable + { + /// + /// Gets or sets the instance that contains the current instance. + /// + public DataGrid ParentDataGrid { get; internal set; } + + /// + /// Gets or sets the foreground color applied to all the cells in the row. + /// Default value: null + /// + public ConsoleColor? ForegroundColor { get; set; } + + /// + /// Gets or sets the background color applied to all the cells in the row. + /// Default value: null + /// + public ConsoleColor? BackgroundColor { get; set; } + + /// + /// Gets or sets the horizontal alignment for the content of the cells contained by the current instance of the . + /// + public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; + + /// + /// Gets or sets the padding applied to the left side of every cell. + /// + public int? CellPaddingLeft { get; set; } + + /// + /// Gets or sets the padding applied to the right side of every cell. + /// + public int? CellPaddingRight { get; set; } + + /// + /// Gets the number of cells contained by the row. + /// + public abstract int CellCount { get; } + + /// + /// Gets or sets a value that specifies if the row is displayed. + /// Default value: true + /// + public bool IsVisible { get; set; } = true; + + public abstract IEnumerator GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs index b83f7d32..b18866af 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs @@ -115,10 +115,6 @@ protected override int CalculatePaddingLeft() if (paddingLeft != null) return paddingLeft.Value; - paddingLeft = ParentRow?.ParentDataGrid?.CellPaddingLeft; - if (paddingLeft != null) - return paddingLeft.Value; - paddingLeft = DefaultPaddingLeft; return paddingLeft.Value; @@ -138,10 +134,6 @@ protected override int CalculatePaddingRight() if (paddingRight != null) return paddingRight.Value; - paddingRight = ParentRow?.ParentDataGrid?.CellPaddingRight; - if (paddingRight != null) - return paddingRight.Value; - paddingRight = DefaultPaddingRight; return paddingRight.Value; @@ -177,10 +169,6 @@ protected override HorizontalAlignment CalculateHorizontalAlignment() if (alignment != HorizontalAlignment.Default) return alignment; - alignment = CalculateHorizontalAlignmentAtTableLevel(); - if (alignment != HorizontalAlignment.Default) - return alignment; - alignment = DefaultHorizontalAlignment; return alignment; @@ -190,11 +178,5 @@ private HorizontalAlignment CalculateHorizontalAlignmentAtRowLevel() { return ParentRow?.CellHorizontalAlignment ?? HorizontalAlignment.Default; } - - private HorizontalAlignment CalculateHorizontalAlignmentAtTableLevel() - { - DataGrid dataGrid = ParentRow?.ParentDataGrid; - return dataGrid?.CellHorizontalAlignment ?? HorizontalAlignment.Default; - } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs index fa127619..705a910d 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs @@ -20,13 +20,15 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; +using System.Collections; +using System.Collections.Generic; namespace DustInTheWind.ConsoleTools.Controls.Tables { /// /// Represents the title row of a table. /// - public class TitleRow + public class TitleRow : RowBase { /// /// Gets or sets the cell displayed in the title row. @@ -35,48 +37,16 @@ public class TitleRow public TitleCell TitleCell { get; } /// - /// Gets or sets the instance that contains the current title. + /// Gets the number of cells contained by the title row. + /// It is always 1. /// - public DataGrid ParentDataGrid { get; internal set; } - - /// - /// Gets or sets the foreground color for the title. - /// Default value: null - /// - public ConsoleColor? ForegroundColor { get; set; } - - /// - /// Gets or sets the background color for the title. - /// Default value: null - /// - public ConsoleColor? BackgroundColor { get; set; } - - /// - /// Gets or sets the content alignment. - /// - public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; + public override int CellCount { get; } = 1; /// /// Gets a value that specifies if the current instance of the has a content to be displayed. /// public bool HasContent => TitleCell?.Content?.IsEmpty == false; - /// - /// Gets or sets a value that specifies if the title row is displayed. - /// Default value: true - /// - public bool IsVisible { get; set; } = true; - - /// - /// Gets or sets the padding applied to the left side of every cell. - /// - public int? CellPaddingLeft { get; set; } - - /// - /// Gets or sets the padding applied to the right side of every cell. - /// - public int? CellPaddingRight { get; set; } - /// /// Initializes a new instance of the class with /// empty content. @@ -151,5 +121,46 @@ public Size CalculatePreferredSize() return new Size(titleRowWidth, cellSize.Height); } + + public override IEnumerator GetEnumerator() + { + return new TitleCellEnumerator(this); + } + + #region Enumerator Class + + private class TitleCellEnumerator : IEnumerator + { + private readonly TitleRow titleRow; + + public TitleCell Current { get; private set; } + + object IEnumerator.Current => Current; + + public TitleCellEnumerator(TitleRow titleRow) + { + this.titleRow = titleRow ?? throw new ArgumentNullException(nameof(titleRow)); + } + + public bool MoveNext() + { + if (Current != null) + return false; + + Current = titleRow.TitleCell; + return true; + } + + public void Reset() + { + Current = null; + } + + public void Dispose() + { + } + } + + #endregion } } \ No newline at end of file From 233639b4dbedcbe81cdd30240ff673337707fc61 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sat, 12 Dec 2020 16:03:45 +0200 Subject: [PATCH 40/57] added unit tests for the DataRowList and CellX. --- .../TestRunner.cs | 3 +- .../Program.cs | 2 +- .../AssemblyInfo.cs | 24 + .../ConsoleTools.Controls.Tables/CellBase.cs | 78 +--- .../ConsoleTools.Controls.Tables/DataCell.cs | 6 +- .../DataRowList.cs | 1 + .../HeaderCell.cs | 6 +- .../RenderingModel/CellX.cs | 72 ++- .../RenderingModel/DataRowX.cs | 6 +- .../RenderingModel/HeaderRowX.cs | 6 +- .../RenderingModel/TitleRowX.cs | 4 +- .../ConsoleTools.Controls.Tables/TitleCell.cs | 6 +- .../Controls/ControlLayout.cs | 60 ++- .../GenerateBottomBorderTests.cs | 220 ++++----- .../GenerateHorizontalSeparator1Tests.cs | 200 ++++---- .../GenerateHorizontalSeparator2Tests.cs | 308 ++++++------- .../GenerateTopBorderTests.cs | 220 ++++----- .../Tables/CellXTests/RenderTextTests.cs | 147 ++++++ .../CalculatePaddingLeftTests.cs | 88 ++++ .../CalculatePaddingRightTests.cs | 88 ++++ ...nstructorMultilineTextAndAlignmentTests.cs | 102 ++--- .../ConstructorMultilineTextTests.cs | 102 ++--- .../DataCellTests/ConstructorNoParamsTests.cs | 100 ++-- .../ConstructorObjectAndAlignmentTests.cs | 118 ++--- .../DataCellTests/ConstructorObjectTests.cs | 118 ++--- .../ConstructorStringAndAlignmentTests.cs | 100 ++-- .../DataCellTests/ConstructorStringTests.cs | 100 ++-- .../BuildFromDataTable/ColumnTests.cs | 2 +- .../BuildFromDataTable/RowTests.cs | 2 +- .../BuildFromDataTable/TitleTests.cs | 2 +- .../BuildFromList/ColumnTests.cs | 2 +- .../DataGridTests/BuildFromList/RowTests.cs | 2 +- .../DataGridTests/BuildFromList/TitleTests.cs | 2 +- .../AddCellEnumerationTests.cs | 76 ++++ .../Tables/DataRowListTests/AddCellsTests.cs | 74 +++ .../DataRowListTests/AddDataRowTests.cs | 75 +++ .../AddStringEnumerationTests.cs | 75 +++ .../DataRowListTests/AddStringsTests.cs | 68 +++ .../Tables/DataRowListTests/ClearTests.cs | 48 ++ .../DataRowListTests/ConstructorTests.cs | 43 ++ .../Tables/DataRowListTests/RemoveAtTests.cs | 82 ++++ .../Tables/DataRowListTests/RemoveTests.cs | 82 ++++ .../HorizontalBorderXTests.cs | 0 .../{TabularData => Tables}/RowTests.cs | 128 +++--- .../TableTests/CellAlignmentPerColumnTests.cs | 180 ++++---- .../TableTests/CellAlignmentPerTableTests.cs | 162 +++---- .../TableTests/CellAlignmentTests.cs | 430 +++++++++--------- .../TableTests/CellMultilineTests.cs | 88 ++-- .../TableTests/ConstructorTests.cs | 132 +++--- .../TableTests/CustomBorderTests.cs | 306 ++++++------- .../TableTests/HeaderAlignmentTests.cs | 306 ++++++------- .../TableTests/LinesBetweenRowsTests.cs | 144 +++--- .../TableTests/NoBorderTests.cs | 124 ++--- .../SpecialCaseBorder.LongTitle.Tests.cs | 372 +++++++-------- .../SpecialCaseBorder.ShortTitle.Tests.cs | 372 +++++++-------- .../TableTests/TablePaddingTests.cs | 152 +++---- .../TableTests/TitleAlignmentTests.cs | 216 ++++----- .../TableTests/TitleTests.cs | 166 +++---- .../DataCellTests/RenderLineTests.cs | 245 ---------- 59 files changed, 3575 insertions(+), 2868 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/AssemblyInfo.cs rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/BorderTemplateTests/GenerateBottomBorderTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/BorderTemplateTests/GenerateTopBorderTests.cs (95%) create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs (93%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataCellTests/ConstructorMultilineTextTests.cs (93%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataCellTests/ConstructorNoParamsTests.cs (92%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataCellTests/ConstructorObjectAndAlignmentTests.cs (93%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataCellTests/ConstructorObjectTests.cs (93%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataCellTests/ConstructorStringAndAlignmentTests.cs (92%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataCellTests/ConstructorStringTests.cs (92%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataGridTests/BuildFromDataTable/ColumnTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataGridTests/BuildFromDataTable/RowTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataGridTests/BuildFromDataTable/TitleTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataGridTests/BuildFromList/ColumnTests.cs (98%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataGridTests/BuildFromList/RowTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/DataGridTests/BuildFromList/TitleTests.cs (94%) create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellEnumerationTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellsTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddDataRowTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringEnumerationTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringsTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ClearTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ConstructorTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveAtTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveTests.cs rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/HorizontalBorderXTests.cs (100%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/RowTests.cs (94%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/CellAlignmentPerColumnTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/CellAlignmentPerTableTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/CellAlignmentTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/CellMultilineTests.cs (93%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/ConstructorTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/CustomBorderTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/HeaderAlignmentTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/LinesBetweenRowsTests.cs (94%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/NoBorderTests.cs (93%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/SpecialCaseBorder.LongTitle.Tests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/TablePaddingTests.cs (94%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/TitleAlignmentTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{TabularData => Tables}/TableTests/TitleTests.cs (94%) delete mode 100644 sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs diff --git a/sources/ConsoleTools.PerformanceTests/ConsoleTools.PerformanceTests.Common/TestRunner.cs b/sources/ConsoleTools.PerformanceTests/ConsoleTools.PerformanceTests.Common/TestRunner.cs index 7dc0ee2e..ceb7d713 100644 --- a/sources/ConsoleTools.PerformanceTests/ConsoleTools.PerformanceTests.Common/TestRunner.cs +++ b/sources/ConsoleTools.PerformanceTests/ConsoleTools.PerformanceTests.Common/TestRunner.cs @@ -30,8 +30,7 @@ public sealed class TestRunner public TestRunner(Action actionToTest) { - if (actionToTest == null) throw new ArgumentNullException(nameof(actionToTest)); - this.actionToTest = actionToTest; + this.actionToTest = actionToTest ?? throw new ArgumentNullException(nameof(actionToTest)); } public void PerformTest() diff --git a/sources/ConsoleTools.PerformanceTests/ConsoleTools.PerformanceTests.Current/Program.cs b/sources/ConsoleTools.PerformanceTests/ConsoleTools.PerformanceTests.Current/Program.cs index ee46f3cf..76f7fbc8 100644 --- a/sources/ConsoleTools.PerformanceTests/ConsoleTools.PerformanceTests.Current/Program.cs +++ b/sources/ConsoleTools.PerformanceTests/ConsoleTools.PerformanceTests.Current/Program.cs @@ -43,7 +43,7 @@ private static void Main() // Done - Pause.QuickDisplay(); + Pause.QuickPause(); } private static void HandleMeasurementDone(object sender, MeasurementDoneEventArgs e) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/AssemblyInfo.cs new file mode 100644 index 00000000..5d05d557 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/AssemblyInfo.cs @@ -0,0 +1,24 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("DustInTheWind.ConsoleTools.Tests")] \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs index 5fc28cd5..a48c5eed 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs @@ -20,7 +20,6 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; -using System.Collections.Generic; namespace DustInTheWind.ConsoleTools.Controls.Tables { @@ -150,16 +149,6 @@ public Size CalculatePreferredSize() return new Size(cellWidth, cellHeight); } - /// - /// Returns the number of spaces representing the left padding. - /// - protected abstract int CalculatePaddingLeft(); - - /// - /// Returns the number of spaces representing the right padding. - /// - protected abstract int CalculatePaddingRight(); - /// /// Returns the foreground color calculated based on the hierarchy from which the current cell is part of. /// @@ -171,63 +160,14 @@ public Size CalculatePreferredSize() public abstract ConsoleColor? CalculateBackgroundColor(); /// - /// Returns the string representation of the content of the cell. + /// Returns the number of spaces representing the left padding. /// - public override string ToString() - { - return Content?.ToString() ?? string.Empty; - } + public abstract int CalculatePaddingLeft(); /// - /// Returns a list of text lines that represent the string representation of the cell. - /// Every line from the list has the same length, and the length is equal to the specified width value. - /// The number of lines in the list is equal to the specified height value. + /// Returns the number of spaces representing the right padding. /// - /// - /// The size into which the cell must be rendered. - /// If the size is smaller than the content, the content is trimmed. - /// If the size is grater than the content, empty spaces are written. - /// - /// - public IEnumerable RenderText(Size size) - { - for (int i = 0; i < size.Height; i++) - yield return RenderLine(i, size.Width); - } - - /// - /// Returns a single line from the cell including the paddings. - /// - /// The index of the line to be generated. - /// The width of the cell. - /// A representing a single line from the cell. - private string RenderLine(int lineIndex, int width) - { - int paddingLeftLength = CalculatePaddingLeft(); - int paddingRightLength = CalculatePaddingRight(); - - int cellContentWidth = width - paddingLeftLength - paddingRightLength; - - bool existsContentLine = lineIndex < Content.Size.Height; - if (!existsContentLine) - return new string(' ', width); - - // Build inner content. - - string innerContent = Content.Lines[lineIndex]; - HorizontalAlignment alignment = CalculateHorizontalAlignment(); - - innerContent = AlignedText.QuickAlign(innerContent, alignment, cellContentWidth); - - // Build paddings. - - string paddingLeft = new string(' ', paddingLeftLength); - string paddingRight = new string(' ', paddingRightLength); - - // Concatenate everything. - - return paddingLeft + innerContent + paddingRight; - } + public abstract int CalculatePaddingRight(); /// /// Returns the calculated horizontal alignment for the content of the current instance. @@ -235,6 +175,14 @@ private string RenderLine(int lineIndex, int width) /// and the values specified by the parents. /// It should never return . /// - protected abstract HorizontalAlignment CalculateHorizontalAlignment(); + public abstract HorizontalAlignment CalculateHorizontalAlignment(); + + /// + /// Returns the string representation of the content of the cell. + /// + public override string ToString() + { + return Content?.ToString() ?? string.Empty; + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs index 28b8e81b..0ad5ce02 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs @@ -105,7 +105,7 @@ public DataCell(object content, HorizontalAlignment horizontalAlignment) /// Calculates and returns the left padding for the content displayed in the cell. /// The value is calculated taking into account also the parent row, parent column and parent table. /// - protected override int CalculatePaddingLeft() + public override int CalculatePaddingLeft() { int? paddingLeft = PaddingLeft; @@ -137,7 +137,7 @@ protected override int CalculatePaddingLeft() /// Calculates and returns the right padding for the content displayed in the cell. /// The value is calculated taking into account also the parent row, parent column and parent table. /// - protected override int CalculatePaddingRight() + public override int CalculatePaddingRight() { int? paddingRight = PaddingRight; if (paddingRight != null) @@ -207,7 +207,7 @@ protected override int CalculatePaddingRight() /// and the values specified by the parent row, parent column and parent table. /// It never returns . /// - protected override HorizontalAlignment CalculateHorizontalAlignment() + public override HorizontalAlignment CalculateHorizontalAlignment() { HorizontalAlignment alignment = HorizontalAlignment; if (alignment != HorizontalAlignment.Default) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs index 6a28e5e0..54239c25 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs @@ -22,6 +22,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs index dbd62ac5..c67462b4 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/HeaderCell.cs @@ -105,7 +105,7 @@ protected HeaderCell(object content, HorizontalAlignment horizontalAlignment) /// Calculates and returns the left padding for the content displayed in the cell. /// The value is calculated taking into account also the parent column and parent table. /// - protected override int CalculatePaddingLeft() + public override int CalculatePaddingLeft() { int? paddingLeft = PaddingLeft; if (paddingLeft != null) @@ -132,7 +132,7 @@ protected override int CalculatePaddingLeft() /// Calculates and returns the right padding for the content displayed in the cell. /// The value is calculated taking into account also the parent column and parent table. /// - protected override int CalculatePaddingRight() + public override int CalculatePaddingRight() { int? paddingRight = PaddingRight; if (paddingRight != null) @@ -199,7 +199,7 @@ protected override int CalculatePaddingRight() /// Calculates and returns the horizontal alignment of the content displayed in the cell. /// The value is calculated taking into account also the parent row and parent table. /// - protected override HorizontalAlignment CalculateHorizontalAlignment() + public override HorizontalAlignment CalculateHorizontalAlignment() { HorizontalAlignment alignment = HorizontalAlignment; if (alignment != HorizontalAlignment.Default) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs index 1a18b4de..d256b0a8 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs @@ -26,34 +26,76 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class CellX { - private readonly CellBase dataCell; private IEnumerator lineEnumerator; - private ConsoleColor? foregroundColor; - private ConsoleColor? backgroundColor; + + public MultilineText Content { get; set; } public Size Size { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } - public CellX(CellBase dataCell) - { - this.dataCell = dataCell ?? throw new ArgumentNullException(nameof(dataCell)); + public ConsoleColor? BackgroundColor { get; set; } - Size = dataCell.CalculatePreferredSize(); - } + public int PaddingLeft { get; set; } - public void InitializeRendering(Size size) - { - lineEnumerator = dataCell.RenderText(size).GetEnumerator(); - foregroundColor = dataCell.CalculateForegroundColor(); - backgroundColor = dataCell.CalculateBackgroundColor(); - } + public int PaddingRight { get; set; } + public HorizontalAlignment HorizontalAlignment { get; set; } + public void RenderNextLine(ITablePrinter tablePrinter) { + if(lineEnumerator == null) + lineEnumerator = RenderContent(Size).GetEnumerator(); + string content = lineEnumerator.MoveNext() ? lineEnumerator.Current : null; - tablePrinter.Write(content, foregroundColor, backgroundColor); + tablePrinter.Write(content, ForegroundColor, BackgroundColor); + } + + private IEnumerable RenderContent(Size size) + { + for (int i = 0; i < size.Height; i++) + yield return RenderLine(i, size.Width); + } + + private string RenderLine(int lineIndex, int width) + { + int cellContentWidth = width - PaddingLeft - PaddingRight; + + bool existsContentLine = lineIndex < Content.Size.Height; + if (!existsContentLine) + return new string(' ', width); + + // Build inner content. + + string innerContent = Content.Lines[lineIndex]; + + innerContent = AlignedText.QuickAlign(innerContent, HorizontalAlignment, cellContentWidth); + + // Build paddings. + + string paddingLeft = new string(' ', PaddingLeft); + string paddingRight = new string(' ', PaddingRight); + + // Concatenate everything. + + return paddingLeft + innerContent + paddingRight; + } + + public static CellX CreateFrom(CellBase cellBase) + { + return new CellX + { + ForegroundColor = cellBase.CalculateForegroundColor(), + BackgroundColor = cellBase.CalculateBackgroundColor(), + PaddingLeft = cellBase.CalculatePaddingLeft(), + PaddingRight = cellBase.CalculatePaddingRight(), + HorizontalAlignment = cellBase.CalculateHorizontalAlignment(), + Size = cellBase.CalculatePreferredSize(), + Content = cellBase.Content + }; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs index 85abd3c7..734ea15e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs @@ -44,7 +44,7 @@ public DataRowX(DataRow dataRow, bool hasBorder) private void CreateCells() { IEnumerable dataCellXes = dataRow - .Select(x => new CellX(x)); + .Select(CellX.CreateFrom); foreach (CellX dataCellX in dataCellXes) { @@ -78,9 +78,7 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) for (int i = 0; i < cells.Count; i++) { CellX cellX = cells[i]; - - Size size = new Size(cellWidths[i], Size.Height); - cellX.InitializeRendering(size); + cellX.Size = new Size(cellWidths[i], Size.Height); } BorderTemplate borderTemplate = dataRow.ParentDataGrid?.BorderTemplate; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs index ddc6c014..5f27f817 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs @@ -44,7 +44,7 @@ public HeaderRowX(HeaderRow headerRow, bool hasBorder) private void CreateCells() { IEnumerable dataCellXes = headerRow - .Select(x => new CellX(x)); + .Select(CellX.CreateFrom); foreach (CellX dataCellX in dataCellXes) { @@ -78,9 +78,7 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) for (int i = 0; i < cells.Count; i++) { CellX cellX = cells[i]; - - Size size = new Size(cellWidths[i], Size.Height); - cellX.InitializeRendering(size); + cellX.Size = new Size(cellWidths[i], Size.Height); } BorderTemplate borderTemplate = headerRow.ParentDataGrid?.BorderTemplate; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs index 303cbb19..bc88c6e8 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs @@ -35,7 +35,7 @@ public TitleRowX(TitleRow titleRow) isVisible = titleRow != null; Size = titleRow?.CalculatePreferredSize() ?? Size.Empty; - cellX = new CellX(titleRow?.TitleCell); + cellX = CellX.CreateFrom(titleRow?.TitleCell); } public void Render(ITablePrinter tablePrinter) @@ -50,7 +50,7 @@ public void Render(ITablePrinter tablePrinter) ? Size.InflateWidth(-2) : Size; - cellX.InitializeRendering(cellSize); + cellX.Size = cellSize; for (int lineIndex = 0; lineIndex < cellSize.Height; lineIndex++) { diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs index b18866af..48efef19 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleCell.cs @@ -105,7 +105,7 @@ public TitleCell(object content, HorizontalAlignment horizontalAlignment) /// Calculates and returns the left padding for the content displayed in the cell. /// The value is calculated taking into account also the parent row and parent table. /// - protected override int CalculatePaddingLeft() + public override int CalculatePaddingLeft() { int? paddingLeft = PaddingLeft; if (paddingLeft != null) @@ -124,7 +124,7 @@ protected override int CalculatePaddingLeft() /// Calculates and returns the right padding for the content displayed in the cell. /// The value is calculated taking into account also the parent row and parent table. /// - protected override int CalculatePaddingRight() + public override int CalculatePaddingRight() { int? paddingRight = PaddingRight; if (paddingRight != null) @@ -159,7 +159,7 @@ protected override int CalculatePaddingRight() /// Calculates and returns the horizontal alignment of the content displayed in the cell. /// The value is calculated taking into account also the parent row and parent table. /// - protected override HorizontalAlignment CalculateHorizontalAlignment() + public override HorizontalAlignment CalculateHorizontalAlignment() { HorizontalAlignment alignment = HorizontalAlignment; if (alignment != HorizontalAlignment.Default) diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs index 91bf1b97..ed52e8e8 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs @@ -248,47 +248,43 @@ private void CalculateActualWidths() private int? CalculateDesiredContentWidth() { - if (Control.Width == null) + if (Control.Width != null) + return Control.Width.Value - Control.Padding.Left - Control.Padding.Right; + + if (Control.MinWidth == null) { - if (Control.MinWidth == null) + if (Control.MaxWidth == null) { - if (Control.MaxWidth == null) - { - return DesiredContentWidth; - } - else - { - int clientMaxWidth = Control.MaxWidth.Value - Control.Padding.Left - Control.Padding.Right; - - return DesiredContentWidth == null - ? clientMaxWidth - : Math.Min(clientMaxWidth, DesiredContentWidth.Value); - } + return DesiredContentWidth; } else { - if (Control.MaxWidth == null) - { - int clientMinWidth = Control.MinWidth.Value - Control.Padding.Left - Control.Padding.Right; - - return DesiredContentWidth == null - ? clientMinWidth - : Math.Max(clientMinWidth, DesiredContentWidth.Value); - } - else - { - int clientMinWidth = Control.MinWidth.Value - Control.Padding.Left - Control.Padding.Right; - int clientMaxWidth = Control.MaxWidth.Value - Control.Padding.Left - Control.Padding.Right; - - return DesiredContentWidth == null - ? clientMinWidth - : Math.Min(Math.Max(clientMinWidth, DesiredContentWidth.Value), clientMaxWidth); - } + int clientMaxWidth = Control.MaxWidth.Value - Control.Padding.Left - Control.Padding.Right; + + return DesiredContentWidth == null + ? clientMaxWidth + : Math.Min(clientMaxWidth, DesiredContentWidth.Value); } } else { - return Control.Width.Value - Control.Padding.Left - Control.Padding.Right; + if (Control.MaxWidth == null) + { + int clientMinWidth = Control.MinWidth.Value - Control.Padding.Left - Control.Padding.Right; + + return DesiredContentWidth == null + ? clientMinWidth + : Math.Max(clientMinWidth, DesiredContentWidth.Value); + } + else + { + int clientMinWidth = Control.MinWidth.Value - Control.Padding.Left - Control.Padding.Right; + int clientMaxWidth = Control.MaxWidth.Value - Control.Padding.Left - Control.Padding.Right; + + return DesiredContentWidth == null + ? clientMinWidth + : Math.Min(Math.Max(clientMinWidth, DesiredContentWidth.Value), clientMaxWidth); + } } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs index 6a6a9faf..21ee540f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateBottomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs @@ -1,111 +1,111 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose - -using System.Collections.Generic; -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.BorderTemplateTests -{ - [TestFixture] - public class GenerateBottomBorderTests - { - [Test] - public void returns_string_empty_if_no_column_is_provided() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateBottomBorder(); - - Assert.That(actual, Is.EqualTo(string.Empty)); - } - - [Test] - public void one_column_with_length_0() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateBottomBorder(0); - - Assert.That(actual, Is.EqualTo("└┘")); - } - - [Test] - public void one_column_with_length_5() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateBottomBorder(5); - - Assert.That(actual, Is.EqualTo("└─────┘")); - } - - [Test] - public void two_columns_with_length_0() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateBottomBorder(0, 0); - - Assert.That(actual, Is.EqualTo("└┴┘")); - } - - [Test] - public void two_columns_with_length_0_and_5() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateBottomBorder(0, 5); - - Assert.That(actual, Is.EqualTo("└┴─────┘")); - } - - [Test] - public void two_columns_with_length_5_and_0() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateBottomBorder(5, 0); - - Assert.That(actual, Is.EqualTo("└─────┴┘")); - } - - [Test] - public void two_columns_with_length_5_and_5() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateBottomBorder(5, 5); - - Assert.That(actual, Is.EqualTo("└─────┴─────┘")); - } - - [Test] - public void two_columns_with_length_5_and_5_List() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateBottomBorder(new List { 5, 5 }); - - Assert.That(actual, Is.EqualTo("└─────┴─────┘")); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.BorderTemplateTests +{ + [TestFixture] + public class GenerateBottomBorderTests + { + [Test] + public void returns_string_empty_if_no_column_is_provided() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateBottomBorder(); + + Assert.That(actual, Is.EqualTo(string.Empty)); + } + + [Test] + public void one_column_with_length_0() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateBottomBorder(0); + + Assert.That(actual, Is.EqualTo("└┘")); + } + + [Test] + public void one_column_with_length_5() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateBottomBorder(5); + + Assert.That(actual, Is.EqualTo("└─────┘")); + } + + [Test] + public void two_columns_with_length_0() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateBottomBorder(0, 0); + + Assert.That(actual, Is.EqualTo("└┴┘")); + } + + [Test] + public void two_columns_with_length_0_and_5() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateBottomBorder(0, 5); + + Assert.That(actual, Is.EqualTo("└┴─────┘")); + } + + [Test] + public void two_columns_with_length_5_and_0() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateBottomBorder(5, 0); + + Assert.That(actual, Is.EqualTo("└─────┴┘")); + } + + [Test] + public void two_columns_with_length_5_and_5() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateBottomBorder(5, 5); + + Assert.That(actual, Is.EqualTo("└─────┴─────┘")); + } + + [Test] + public void two_columns_with_length_5_and_5_List() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateBottomBorder(new List { 5, 5 }); + + Assert.That(actual, Is.EqualTo("└─────┴─────┘")); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs index 3c07a289..fb0b3bc0 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs @@ -1,101 +1,101 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose - -using System.Collections.Generic; -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.BorderTemplateTests -{ - [TestFixture] - public class GenerateHorizontalSeparator1Tests - { - [Test] - public void one_column_with_length_0() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(0); - - Assert.That(actual, Is.EqualTo("├┤")); - } - - [Test] - public void one_column_with_length_5() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(5); - - Assert.That(actual, Is.EqualTo("├─────┤")); - } - - [Test] - public void two_columns_with_length_0() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(0, 0); - - Assert.That(actual, Is.EqualTo("├┼┤")); - } - - [Test] - public void two_columns_with_length_0_and_5() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(0, 5); - - Assert.That(actual, Is.EqualTo("├┼─────┤")); - } - - [Test] - public void two_columns_with_length_5_and_0() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(5, 0); - - Assert.That(actual, Is.EqualTo("├─────┼┤")); - } - - [Test] - public void two_columns_with_length_5_and_5() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(5, 5); - - Assert.That(actual, Is.EqualTo("├─────┼─────┤")); - } - - [Test] - public void two_columns_with_length_5_and_5_List() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(new List { 5, 5 }); - - Assert.That(actual, Is.EqualTo("├─────┼─────┤")); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.BorderTemplateTests +{ + [TestFixture] + public class GenerateHorizontalSeparator1Tests + { + [Test] + public void one_column_with_length_0() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(0); + + Assert.That(actual, Is.EqualTo("├┤")); + } + + [Test] + public void one_column_with_length_5() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(5); + + Assert.That(actual, Is.EqualTo("├─────┤")); + } + + [Test] + public void two_columns_with_length_0() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(0, 0); + + Assert.That(actual, Is.EqualTo("├┼┤")); + } + + [Test] + public void two_columns_with_length_0_and_5() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(0, 5); + + Assert.That(actual, Is.EqualTo("├┼─────┤")); + } + + [Test] + public void two_columns_with_length_5_and_0() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(5, 0); + + Assert.That(actual, Is.EqualTo("├─────┼┤")); + } + + [Test] + public void two_columns_with_length_5_and_5() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(5, 5); + + Assert.That(actual, Is.EqualTo("├─────┼─────┤")); + } + + [Test] + public void two_columns_with_length_5_and_5_List() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(new List { 5, 5 }); + + Assert.That(actual, Is.EqualTo("├─────┼─────┤")); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs index 4b527822..b85846fb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs @@ -1,155 +1,155 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose - -using System.Collections.Generic; -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.BorderTemplateTests -{ - [TestFixture] - public class GenerateHorizontalSeparator2Tests - { - [Test] - public void returns_string_empty_if_both_column_lists_are_null() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(null, null); - - Assert.That(actual, Is.EqualTo(string.Empty)); - } - - [Test] - public void returns_string_empty_if_top_column_list_is_null() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(null, new List()); - - Assert.That(actual, Is.EqualTo(string.Empty)); - } - - [Test] - public void returns_string_empty_if_bottom_column_list_is_null() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(new List(), null); - - Assert.That(actual, Is.EqualTo(string.Empty)); - } - - [Test] - public void returns_string_empty_if_both_column_lists_are_empty() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateHorizontalSeparator(new List(), new List()); - - Assert.That(actual, Is.EqualTo(string.Empty)); - } - - [Test] - public void one_top_cell_equal_with_one_bottom_cell() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - List topColumnWidths = new List { 5 }; - List bottomColumnWidths = new List { 5 }; - - string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); - - Assert.That(actual, Is.EqualTo("├─────┤")); - } - - [Test] - public void two_top_cells_equal_with_two_bottom_cells() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - List topColumnWidths = new List { 3, 2 }; - List bottomColumnWidths = new List { 3, 2 }; - - string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); - - Assert.That(actual, Is.EqualTo("├───┼──┤")); - } - - [Test] - public void two_top_cells_unequal_with_two_bottom_cells() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - List topColumnWidths = new List { 3, 2 }; - List bottomColumnWidths = new List { 2, 3 }; - - string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); - - Assert.That(actual, Is.EqualTo("├──┬┴──┤")); - } - - [Test] - public void one_top_cell_equal_with_two_bottom_cells() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - List topColumnWidths = new List { 6 }; - List bottomColumnWidths = new List { 2, 3 }; - - string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); - - Assert.That(actual, Is.EqualTo("├──┬───┤")); - } - - [Test] - public void two_top_cells_equal_with_one_bottom_cell() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - List topColumnWidths = new List { 3, 2 }; - List bottomColumnWidths = new List { 6 }; - - string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); - - Assert.That(actual, Is.EqualTo("├───┴──┤")); - } - - [Test] - public void one_top_cell_smaller_than_one_bottom_cell() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - List topColumnWidths = new List { 3 }; - List bottomColumnWidths = new List { 6 }; - - string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); - - Assert.That(actual, Is.EqualTo("├───┴──┐")); - } - - [Test] - public void one_top_cell_greater_than_one_bottom_cell() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - List topColumnWidths = new List { 6 }; - List bottomColumnWidths = new List { 2 }; - - string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); - - Assert.That(actual, Is.EqualTo("├──┬───┘")); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.BorderTemplateTests +{ + [TestFixture] + public class GenerateHorizontalSeparator2Tests + { + [Test] + public void returns_string_empty_if_both_column_lists_are_null() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(null, null); + + Assert.That(actual, Is.EqualTo(string.Empty)); + } + + [Test] + public void returns_string_empty_if_top_column_list_is_null() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(null, new List()); + + Assert.That(actual, Is.EqualTo(string.Empty)); + } + + [Test] + public void returns_string_empty_if_bottom_column_list_is_null() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(new List(), null); + + Assert.That(actual, Is.EqualTo(string.Empty)); + } + + [Test] + public void returns_string_empty_if_both_column_lists_are_empty() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateHorizontalSeparator(new List(), new List()); + + Assert.That(actual, Is.EqualTo(string.Empty)); + } + + [Test] + public void one_top_cell_equal_with_one_bottom_cell() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + List topColumnWidths = new List { 5 }; + List bottomColumnWidths = new List { 5 }; + + string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); + + Assert.That(actual, Is.EqualTo("├─────┤")); + } + + [Test] + public void two_top_cells_equal_with_two_bottom_cells() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + List topColumnWidths = new List { 3, 2 }; + List bottomColumnWidths = new List { 3, 2 }; + + string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); + + Assert.That(actual, Is.EqualTo("├───┼──┤")); + } + + [Test] + public void two_top_cells_unequal_with_two_bottom_cells() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + List topColumnWidths = new List { 3, 2 }; + List bottomColumnWidths = new List { 2, 3 }; + + string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); + + Assert.That(actual, Is.EqualTo("├──┬┴──┤")); + } + + [Test] + public void one_top_cell_equal_with_two_bottom_cells() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + List topColumnWidths = new List { 6 }; + List bottomColumnWidths = new List { 2, 3 }; + + string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); + + Assert.That(actual, Is.EqualTo("├──┬───┤")); + } + + [Test] + public void two_top_cells_equal_with_one_bottom_cell() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + List topColumnWidths = new List { 3, 2 }; + List bottomColumnWidths = new List { 6 }; + + string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); + + Assert.That(actual, Is.EqualTo("├───┴──┤")); + } + + [Test] + public void one_top_cell_smaller_than_one_bottom_cell() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + List topColumnWidths = new List { 3 }; + List bottomColumnWidths = new List { 6 }; + + string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); + + Assert.That(actual, Is.EqualTo("├───┴──┐")); + } + + [Test] + public void one_top_cell_greater_than_one_bottom_cell() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + List topColumnWidths = new List { 6 }; + List bottomColumnWidths = new List { 2 }; + + string actual = borderTemplate.GenerateHorizontalSeparator(topColumnWidths, bottomColumnWidths); + + Assert.That(actual, Is.EqualTo("├──┬───┘")); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateTopBorderTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateTopBorderTests.cs index d66de5e2..4e659613 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/BorderTemplateTests/GenerateTopBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateTopBorderTests.cs @@ -1,111 +1,111 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose - -using System.Collections.Generic; -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.BorderTemplateTests -{ - [TestFixture] - public class GenerateTopBorderTests - { - [Test] - public void returns_string_empty_if_no_column_is_provided() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateTopBorder(); - - Assert.That(actual, Is.EqualTo(string.Empty)); - } - - [Test] - public void one_column_with_length_0() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateTopBorder(0); - - Assert.That(actual, Is.EqualTo("┌┐")); - } - - [Test] - public void one_column_with_length_5() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateTopBorder(5); - - Assert.That(actual, Is.EqualTo("┌─────┐")); - } - - [Test] - public void two_columns_with_length_0() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateTopBorder(0, 0); - - Assert.That(actual, Is.EqualTo("┌┬┐")); - } - - [Test] - public void two_columns_with_length_0_and_5() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateTopBorder(0, 5); - - Assert.That(actual, Is.EqualTo("┌┬─────┐")); - } - - [Test] - public void two_columns_with_length_5_and_0() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateTopBorder(5, 0); - - Assert.That(actual, Is.EqualTo("┌─────┬┐")); - } - - [Test] - public void two_columns_with_length_5_and_5() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateTopBorder(5, 5); - - Assert.That(actual, Is.EqualTo("┌─────┬─────┐")); - } - - [Test] - public void two_columns_with_length_5_and_5_List() - { - BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; - - string actual = borderTemplate.GenerateTopBorder(new List { 5, 5 }); - - Assert.That(actual, Is.EqualTo("┌─────┬─────┐")); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.BorderTemplateTests +{ + [TestFixture] + public class GenerateTopBorderTests + { + [Test] + public void returns_string_empty_if_no_column_is_provided() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateTopBorder(); + + Assert.That(actual, Is.EqualTo(string.Empty)); + } + + [Test] + public void one_column_with_length_0() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateTopBorder(0); + + Assert.That(actual, Is.EqualTo("┌┐")); + } + + [Test] + public void one_column_with_length_5() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateTopBorder(5); + + Assert.That(actual, Is.EqualTo("┌─────┐")); + } + + [Test] + public void two_columns_with_length_0() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateTopBorder(0, 0); + + Assert.That(actual, Is.EqualTo("┌┬┐")); + } + + [Test] + public void two_columns_with_length_0_and_5() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateTopBorder(0, 5); + + Assert.That(actual, Is.EqualTo("┌┬─────┐")); + } + + [Test] + public void two_columns_with_length_5_and_0() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateTopBorder(5, 0); + + Assert.That(actual, Is.EqualTo("┌─────┬┐")); + } + + [Test] + public void two_columns_with_length_5_and_5() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateTopBorder(5, 5); + + Assert.That(actual, Is.EqualTo("┌─────┬─────┐")); + } + + [Test] + public void two_columns_with_length_5_and_5_List() + { + BorderTemplate borderTemplate = BorderTemplate.SingleLineBorderTemplate; + + string actual = borderTemplate.GenerateTopBorder(new List { 5, 5 }); + + Assert.That(actual, Is.EqualTo("┌─────┬─────┐")); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs new file mode 100644 index 00000000..032f3ac8 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs @@ -0,0 +1,147 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel; +using Moq; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.CellXTests +{ + [TestFixture] + public class RenderTextTests + { + private List renderOutput; + private Mock tablePrinter; + + [SetUp] + public void SetUp() + { + renderOutput = new List(); + + tablePrinter = new Mock(); + tablePrinter + .Setup(x => x.Write(It.IsAny(), It.IsAny(), It.IsAny())) + .Callback((line, fg, bg) => + { + renderOutput.Add(line); + }); + } + + [Test] + public void HavingContentShorterThanCellWidth_WhenRendered_LineIsFilledWithSpaces() + { + CellX cell = new CellX + { + Content = "text", + Size = new Size(10, 1) + }; + + RenderAllLines(cell); + + Assert.That(renderOutput, Is.EqualTo(new[] { "text " })); + } + + [Test] + public void HavingContentLongerThanCellWidth_WhenRendered_ThenLineIsNotTrimmed() + { + CellX cell = new CellX + { + Content = "some long text", + Size = new Size(10, 1) + }; + + RenderAllLines(cell); + + Assert.That(renderOutput, Is.EqualTo(new List { "some long text" })); + } + + [Test] + public void HavingContentWithLessLinesThanCellHeight_WhenRendered_ThenEmptyLinesAreAdded() + { + CellX cell = new CellX + { + Content = "text", + Size = new Size(10, 2) + }; + + RenderAllLines(cell); + + Assert.That(renderOutput, Is.EqualTo(new List + { + "text ", + " " + })); + } + + [Test] + public void HavingContentWithMoreLinesThanCellHeight_WhenRendered_ThenOnlyTheRequiredLinesAreRendered() + { + CellX cell = new CellX + { + Content = new MultilineText(new[] { "line1", "line2", "line3" }), + Size = new Size(10, 2) + }; + + RenderAllLines(cell); + + Assert.That(renderOutput, Is.EqualTo(new List + { + "line1 ", + "line2 " + })); + } + + [Test] + public void HavingPaddingLeftAndContentShorterThanCellWidth_WhenRendered_LineContainsPaddingLeft() + { + CellX cell = new CellX + { + Content = "text", + Size = new Size(10, 1), + PaddingLeft = 2 + }; + + RenderAllLines(cell); + + Assert.That(renderOutput, Is.EqualTo(new[] { " text " })); + } + + [Test] + public void HavingPaddingRightAndContentShorterThanCellWidth_WhenRendered_LineContainsPaddingRight() + { + CellX cell = new CellX + { + Content = "text", + Size = new Size(10, 1), + PaddingRight = 2, + HorizontalAlignment = HorizontalAlignment.Right + }; + + RenderAllLines(cell); + + Assert.That(renderOutput, Is.EqualTo(new[] { " text " })); + } + + private void RenderAllLines(CellX cellX) + { + for (int i = 0; i < cellX.Size.Height; i++) + cellX.RenderNextLine(tablePrinter.Object); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs new file mode 100644 index 00000000..65946a4a --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs @@ -0,0 +1,88 @@ +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +{ + [TestFixture] + public class CalculatePaddingLeftTests + { + [Test] + public void HavingCellWithNoPadding_WhenCalculatingPaddingLeft_ThenPaddingLeftIs1() + { + DataCell dataCell = new DataCell(); + + int actual = dataCell.CalculatePaddingLeft(); + + Assert.That(actual, Is.EqualTo(1)); + } + + [Test] + public void HavingCellWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() + { + DataCell dataCell = new DataCell + { + PaddingLeft = 5 + }; + + int actual = dataCell.CalculatePaddingLeft(); + + Assert.That(actual, Is.EqualTo(5)); + } + + [Test] + public void HavingRowWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() + { + DataCell dataCell = new DataCell(); + DataRow dataRow = new DataRow + { + CellPaddingLeft = 5 + }; + dataRow.AddCell(dataCell); + + int actual = dataCell.CalculatePaddingLeft(); + + Assert.That(actual, Is.EqualTo(5)); + } + + [Test] + public void HavingDataGridWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() + { + DataCell dataCell = new DataCell(); + + DataRow dataRow = new DataRow(); + dataRow.AddCell(dataCell); + + DataGrid dataGrid = new DataGrid + { + CellPaddingLeft = 5 + }; + dataGrid.Rows.Add(dataRow); + + int actual = dataCell.CalculatePaddingLeft(); + + Assert.That(actual, Is.EqualTo(5)); + } + + [Test] + public void HavingColumnWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() + { + DataCell dataCell = new DataCell(); + + DataRow dataRow = new DataRow(); + dataRow.AddCell(dataCell); + + DataGrid dataGrid = new DataGrid(); + dataGrid.Rows.Add(dataRow); + + Column column = new Column + { + CellPaddingLeft = 5 + }; + dataGrid.Columns.Add(column); + + int actual = dataCell.CalculatePaddingLeft(); + + Assert.That(actual, Is.EqualTo(5)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs new file mode 100644 index 00000000..fd41d7ee --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs @@ -0,0 +1,88 @@ +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +{ + [TestFixture] + public class CalculatePaddingRightRight + { + [Test] + public void HavingCellWithNoPadding_WhenCalculatingPaddingRight_ThenPaddingRightIs1() + { + DataCell dataCell = new DataCell(); + + int actual = dataCell.CalculatePaddingRight(); + + Assert.That(actual, Is.EqualTo(1)); + } + + [Test] + public void HavingCellWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() + { + DataCell dataCell = new DataCell + { + PaddingRight = 5 + }; + + int actual = dataCell.CalculatePaddingRight(); + + Assert.That(actual, Is.EqualTo(5)); + } + + [Test] + public void HavingRowWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() + { + DataCell dataCell = new DataCell(); + DataRow dataRow = new DataRow + { + CellPaddingRight = 5 + }; + dataRow.AddCell(dataCell); + + int actual = dataCell.CalculatePaddingRight(); + + Assert.That(actual, Is.EqualTo(5)); + } + + [Test] + public void HavingDataGridWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() + { + DataCell dataCell = new DataCell(); + + DataRow dataRow = new DataRow(); + dataRow.AddCell(dataCell); + + DataGrid dataGrid = new DataGrid + { + CellPaddingRight = 5 + }; + dataGrid.Rows.Add(dataRow); + + int actual = dataCell.CalculatePaddingRight(); + + Assert.That(actual, Is.EqualTo(5)); + } + + [Test] + public void HavingColumnWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() + { + DataCell dataCell = new DataCell(); + + DataRow dataRow = new DataRow(); + dataRow.AddCell(dataCell); + + DataGrid dataGrid = new DataGrid(); + dataGrid.Rows.Add(dataRow); + + Column column = new Column + { + CellPaddingRight = 5 + }; + dataGrid.Columns.Add(column); + + int actual = dataCell.CalculatePaddingRight(); + + Assert.That(actual, Is.EqualTo(5)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs similarity index 93% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs index e8ce1c0e..c9a7525c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs @@ -1,52 +1,52 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests -{ - [TestFixture] - public class ConstructorMultilineTextAndAlignmentTests - { - private DataCell dataCell; - - [SetUp] - public void SetUp() - { - MultilineText multilineText = new MultilineText("some content"); - dataCell = new DataCell(multilineText, HorizontalAlignment.Center); - } - - [Test] - public void Content_is_the_one_provided_on_constructor() - { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); - } - - [Test] - public void IsEmpty_is_false() - { - Assert.That(dataCell.IsEmpty, Is.False); - } - - [Test] - public void HorizontalAlignment_is_Center() - { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +{ + [TestFixture] + public class ConstructorMultilineTextAndAlignmentTests + { + private DataCell dataCell; + + [SetUp] + public void SetUp() + { + MultilineText multilineText = new MultilineText("some content"); + dataCell = new DataCell(multilineText, HorizontalAlignment.Center); + } + + [Test] + public void Content_is_the_one_provided_on_constructor() + { + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); + } + + [Test] + public void IsEmpty_is_false() + { + Assert.That(dataCell.IsEmpty, Is.False); + } + + [Test] + public void HorizontalAlignment_is_Center() + { + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs similarity index 93% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs index a1f9b053..63ae82ff 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs @@ -1,52 +1,52 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests -{ - [TestFixture] - public class ConstructorMultilineTextTests - { - private DataCell dataCell; - - [SetUp] - public void SetUp() - { - MultilineText multilineText = new MultilineText("some content"); - dataCell = new DataCell(multilineText); - } - - [Test] - public void Content_is_the_one_provided_on_constructor() - { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); - } - - [Test] - public void IsEmpty_is_false() - { - Assert.That(dataCell.IsEmpty, Is.False); - } - - [Test] - public void HorizontalAlignment_is_Default() - { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +{ + [TestFixture] + public class ConstructorMultilineTextTests + { + private DataCell dataCell; + + [SetUp] + public void SetUp() + { + MultilineText multilineText = new MultilineText("some content"); + dataCell = new DataCell(multilineText); + } + + [Test] + public void Content_is_the_one_provided_on_constructor() + { + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); + } + + [Test] + public void IsEmpty_is_false() + { + Assert.That(dataCell.IsEmpty, Is.False); + } + + [Test] + public void HorizontalAlignment_is_Default() + { + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs similarity index 92% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs index 0ee8d2f6..5b64d918 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorNoParamsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs @@ -1,51 +1,51 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests -{ - [TestFixture] - public class ConstructorNoParamsTests - { - private DataCell dataCell; - - [SetUp] - public void SetUp() - { - dataCell = new DataCell(); - } - - [Test] - public void Content_is_empty() - { - Assert.That(dataCell.Content, Is.SameAs(MultilineText.Empty)); - } - - [Test] - public void IsEmpty_is_true() - { - Assert.That(dataCell.IsEmpty, Is.True); - } - - [Test] - public void HorizontalAlignment_is_Default() - { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +{ + [TestFixture] + public class ConstructorNoParamsTests + { + private DataCell dataCell; + + [SetUp] + public void SetUp() + { + dataCell = new DataCell(); + } + + [Test] + public void Content_is_empty() + { + Assert.That(dataCell.Content, Is.SameAs(MultilineText.Empty)); + } + + [Test] + public void IsEmpty_is_true() + { + Assert.That(dataCell.IsEmpty, Is.True); + } + + [Test] + public void HorizontalAlignment_is_Default() + { + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs similarity index 93% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs index 58e01f75..8e33e7fb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs @@ -1,60 +1,60 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests -{ - [TestFixture] - public class ConstructorObjectAndAlignmentTests - { - private DataCell dataCell; - - private class Content - { - public override string ToString() - { - return "content"; - } - } - - [SetUp] - public void SetUp() - { - Content content = new Content(); - dataCell = new DataCell(content, HorizontalAlignment.Center); - } - - [Test] - public void Content_is_the_one_provided_on_constructor() - { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("content"))); - } - - [Test] - public void IsEmpty_is_false() - { - Assert.That(dataCell.IsEmpty, Is.False); - } - - [Test] - public void HorizontalAlignment_is_Center() - { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +{ + [TestFixture] + public class ConstructorObjectAndAlignmentTests + { + private DataCell dataCell; + + private class Content + { + public override string ToString() + { + return "content"; + } + } + + [SetUp] + public void SetUp() + { + Content content = new Content(); + dataCell = new DataCell(content, HorizontalAlignment.Center); + } + + [Test] + public void Content_is_the_one_provided_on_constructor() + { + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("content"))); + } + + [Test] + public void IsEmpty_is_false() + { + Assert.That(dataCell.IsEmpty, Is.False); + } + + [Test] + public void HorizontalAlignment_is_Center() + { + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs similarity index 93% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs index 82adf7db..20abd18b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorObjectTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs @@ -1,60 +1,60 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests -{ - [TestFixture] - public class ConstructorObjectTests - { - private DataCell dataCell; - - private class Content - { - public override string ToString() - { - return "content"; - } - } - - [SetUp] - public void SetUp() - { - Content content = new Content(); - dataCell = new DataCell(content); - } - - [Test] - public void Content_is_the_one_provided_on_constructor() - { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("content"))); - } - - [Test] - public void IsEmpty_is_false() - { - Assert.That(dataCell.IsEmpty, Is.False); - } - - [Test] - public void HorizontalAlignment_is_Default() - { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +{ + [TestFixture] + public class ConstructorObjectTests + { + private DataCell dataCell; + + private class Content + { + public override string ToString() + { + return "content"; + } + } + + [SetUp] + public void SetUp() + { + Content content = new Content(); + dataCell = new DataCell(content); + } + + [Test] + public void Content_is_the_one_provided_on_constructor() + { + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("content"))); + } + + [Test] + public void IsEmpty_is_false() + { + Assert.That(dataCell.IsEmpty, Is.False); + } + + [Test] + public void HorizontalAlignment_is_Default() + { + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs similarity index 92% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs index 51cf5bbb..a85c9b52 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs @@ -1,51 +1,51 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests -{ - [TestFixture] - public class ConstructorStringAndAlignmentTests - { - private DataCell dataCell; - - [SetUp] - public void SetUp() - { - dataCell = new DataCell("some content", HorizontalAlignment.Center); - } - - [Test] - public void Content_is_the_one_provided_on_constructor() - { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); - } - - [Test] - public void IsEmpty_is_false() - { - Assert.That(dataCell.IsEmpty, Is.False); - } - - [Test] - public void HorizontalAlignment_is_Center() - { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +{ + [TestFixture] + public class ConstructorStringAndAlignmentTests + { + private DataCell dataCell; + + [SetUp] + public void SetUp() + { + dataCell = new DataCell("some content", HorizontalAlignment.Center); + } + + [Test] + public void Content_is_the_one_provided_on_constructor() + { + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); + } + + [Test] + public void IsEmpty_is_false() + { + Assert.That(dataCell.IsEmpty, Is.False); + } + + [Test] + public void HorizontalAlignment_is_Center() + { + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs similarity index 92% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs index 26b8d9e9..53e43332 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/ConstructorStringTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs @@ -1,51 +1,51 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests -{ - [TestFixture] - public class ConstructorStringTests - { - private DataCell dataCell; - - [SetUp] - public void SetUp() - { - dataCell = new DataCell("some content"); - } - - [Test] - public void Content_is_the_one_provided_on_constructor() - { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); - } - - [Test] - public void IsEmpty_is_false() - { - Assert.That(dataCell.IsEmpty, Is.False); - } - - [Test] - public void HorizontalAlignment_is_Default() - { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +{ + [TestFixture] + public class ConstructorStringTests + { + private DataCell dataCell; + + [SetUp] + public void SetUp() + { + dataCell = new DataCell("some content"); + } + + [Test] + public void Content_is_the_one_provided_on_constructor() + { + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); + } + + [Test] + public void IsEmpty_is_false() + { + Assert.That(dataCell.IsEmpty, Is.False); + } + + [Test] + public void HorizontalAlignment_is_Default() + { + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs index c47126a6..c5f68604 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromDataTable +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromDataTable { [TestFixture] public class ColumnTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/RowTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/RowTests.cs index 9349e1a1..c1ba77bd 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/RowTests.cs @@ -24,7 +24,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromDataTable +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromDataTable { [TestFixture] public class RowTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs index e130b2a1..1d9befb7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromDataTable/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromDataTable +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromDataTable { [TestFixture] public class TitleTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/ColumnTests.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/ColumnTests.cs index a4c7022b..14917b75 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/ColumnTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromList +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromList { [TestFixture] public class ColumnTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/RowTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/RowTests.cs index 0f62b8ea..e7cb7f94 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/RowTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromList +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromList { [TestFixture] public class RowTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/TitleTests.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/TitleTests.cs index 28becb2c..11ae56f7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataGridTests/BuildFromList/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/TitleTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataGridTests.BuildFromList +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromList { [TestFixture] public class TitleTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellEnumerationTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellEnumerationTests.cs new file mode 100644 index 00000000..db6c6eca --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellEnumerationTests.cs @@ -0,0 +1,76 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +{ + [TestFixture] + public class AddCellEnumerationTests + { + private DataGrid dataGrid; + private DataRowList dataRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + dataRowList = new DataRowList(dataGrid); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenThreeCellsAreAdded_ThenRowCountIs1() + { + IEnumerable cells = new List + { + new DataCell(), + new DataCell(), + new DataCell() + }; + + dataRowList.Add(cells); + + Assert.That(dataRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenThreeCellsAreAdded_ThenRowContainsTheThreeCells() + { + IEnumerable cells = new List + { + new DataCell(), + new DataCell(), + new DataCell() + }; + + dataRowList.Add(cells); + + Assert.That(dataRowList[0], Is.EqualTo(cells)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenNullDataCellEnumerationIsAdded_ThenThrows() + { + Assert.Throws(() => + { + dataRowList.Add((List)null); + }); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellsTests.cs new file mode 100644 index 00000000..6a746778 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellsTests.cs @@ -0,0 +1,74 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +{ + [TestFixture] + public class AddCellsTests + { + private DataGrid dataGrid; + private DataRowList dataRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + dataRowList = new DataRowList(dataGrid); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenThreeCellsAreAdded_ThenRowCountIs1() + { + DataCell dataCell1 = new DataCell(); + DataCell dataCell2 = new DataCell(); + DataCell dataCell3 = new DataCell(); + + dataRowList.Add(dataCell1, dataCell2, dataCell3); + + Assert.That(dataRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenThreeCellsAreAdded_ThenRowContainsTheThreeCells() + { + DataCell dataCell1 = new DataCell(); + DataCell dataCell2 = new DataCell(); + DataCell dataCell3 = new DataCell(); + + dataRowList.Add(dataCell1, dataCell2, dataCell3); + + List expected = new List + { + dataCell1, + dataCell2, + dataCell3 + }; + Assert.That(dataRowList[0], Is.EqualTo(expected)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenNullDataCellIsAdded_ThenRowContainsEmptyCell() + { + dataRowList.Add((DataCell)null); + + Assert.That(dataRowList[0][0].IsEmpty, Is.True); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddDataRowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddDataRowTests.cs new file mode 100644 index 00000000..a38def55 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddDataRowTests.cs @@ -0,0 +1,75 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +{ + [TestFixture] + public class AddDataRowTests + { + private DataGrid dataGrid; + private DataRowList dataRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + dataRowList = new DataRowList(dataGrid); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenOneDataRowIsAdded_ThenRowCountIs1() + { + DataRow dataRow = new DataRow(); + + dataRowList.Add(dataRow); + + Assert.That(dataRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenOneDataRowIsAdded_ThenListContainsTheDataRow() + { + DataRow dataRow = new DataRow(); + + dataRowList.Add(dataRow); + + Assert.That(dataRowList[0], Is.SameAs(dataRow)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenOneDataRowIsAdded_ThenDataGridIsSetToDataRow() + { + DataRow dataRow = new DataRow(); + + dataRowList.Add(dataRow); + + Assert.That(dataRow.ParentDataGrid, Is.SameAs(dataGrid)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenNullDataRowIsAdded_ThenThrows() + { + Assert.Throws(() => + { + dataRowList.Add((DataRow)null); + }); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringEnumerationTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringEnumerationTests.cs new file mode 100644 index 00000000..154a88dc --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringEnumerationTests.cs @@ -0,0 +1,75 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using System.Linq; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +{ + [TestFixture] + public class AddStringEnumerationTests + { + private DataGrid dataGrid; + private DataRowList dataRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + dataRowList = new DataRowList(dataGrid); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenThreeStringsAreAdded_ThenRowCountIs1() + { + IEnumerable values = new List + { + "value 1", "value 2", "value 3" + }; + + dataRowList.Add(values); + + Assert.That(dataRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenThreeStringsAreAdded_ThenRowContainsThreeCellsWithCorrectValues() + { + IEnumerable values = new List + { + "value 1", "value 2", "value 3" + }; + + dataRowList.Add(values); + + IEnumerable actual = dataRowList[0] + .Select(x => x.Content.ToString()); + Assert.That(actual, Is.EqualTo(values)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenNullStringEnumerationIsAdded_ThenThrows() + { + Assert.Throws(() => + { + dataRowList.Add((IEnumerable)null); + }); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringsTests.cs new file mode 100644 index 00000000..2144e19a --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringsTests.cs @@ -0,0 +1,68 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System.Collections.Generic; +using System.Linq; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +{ + [TestFixture] + public class AddStringsTests + { + private DataGrid dataGrid; + private DataRowList dataRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + dataRowList = new DataRowList(dataGrid); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenThreeStringsAreAdded_ThenRowCountIs1() + { + dataRowList.Add("value 1", "value 2", "value 3"); + + Assert.That(dataRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenThreeStringsAreAdded_ThenRowContainsThreeCellsWithCorrectValues() + { + dataRowList.Add("value 1", "value 2", "value 3"); + + IEnumerable actual = dataRowList[0] + .Select(x => x.Content.ToString()); + IEnumerable expected = new List + { + "value 1", "value 2", "value 3" + }; + + Assert.That(actual, Is.EqualTo(expected)); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenNullStringIsAdded_ThenRowContainsEmptyCell() + { + dataRowList.Add((string)null); + + Assert.That(dataRowList[0][0].IsEmpty, Is.True); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ClearTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ClearTests.cs new file mode 100644 index 00000000..8b38f14e --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ClearTests.cs @@ -0,0 +1,48 @@ +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +{ + [TestFixture] + public class ClearTests + { + private DataGrid dataGrid; + private DataRowList dataRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + dataRowList = new DataRowList(dataGrid); + } + + [Test] + public void HavingAnEmptyDataRowList_WhenClear_ThenCountIs0() + { + dataRowList.Clear(); + + Assert.That(dataRowList.Count, Is.EqualTo(0)); + } + + [Test] + public void HavingADataRowListWithOneRow_WhenClear_ThenCountIs0() + { + dataRowList.Add(new DataRow()); + + dataRowList.Clear(); + + Assert.That(dataRowList.Count, Is.EqualTo(0)); + } + + [Test] + public void HavingADataRowListWithTwoRows_WhenClear_ThenCountIs0() + { + dataRowList.Add(new DataRow()); + dataRowList.Add(new DataRow()); + + dataRowList.Clear(); + + Assert.That(dataRowList.Count, Is.EqualTo(0)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ConstructorTests.cs new file mode 100644 index 00000000..6032188e --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ConstructorTests.cs @@ -0,0 +1,43 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +{ + [TestFixture] + public class ConstructorTests + { + [Test] + public void HavingNullDataGrid_WhenDataRowListIsInstantiated_ThenThrows() + { + Assert.Throws(() => + { + DataRowList dataRowList = new DataRowList(null); + }); + } + + [Test] + public void HavingValidDataGrid_WhenDataRowListIsInstantiated_ThenSuccess() + { + DataGrid dataGrid = new DataGrid(); + + DataRowList dataRowList = new DataRowList(dataGrid); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveAtTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveAtTests.cs new file mode 100644 index 00000000..1984793f --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveAtTests.cs @@ -0,0 +1,82 @@ +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +{ + [TestFixture] + public class RemoveAtTests + { + private DataGrid dataGrid; + private DataRowList dataRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + dataRowList = new DataRowList(dataGrid); + } + + [Test] + public void HavingADataRowListWithOneRow_WhenRemoveTheRow_ThenCountIs0() + { + DataRow dataRow = new DataRow("value 1"); + dataRowList.Add(dataRow); + + dataRowList.RemoveAt(0); + + Assert.That(dataRowList.Count, Is.EqualTo(0)); + } + + [Test] + public void HavingADataRowListWithTwoRows_WhenRemoveFirstRow_ThenCountIs1() + { + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); + + dataRowList.RemoveAt(0); + + Assert.That(dataRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingADataRowListWithTwoRows_WhenRemoveFirstRow_ThenSecondRowIsStillInList() + { + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); + + dataRowList.RemoveAt(0); + + Assert.That(dataRowList[0], Is.EqualTo(dataRow2)); + } + + [Test] + public void HavingADataRowListWithTwoRows_WhenRemoveSecondRow_ThenCountIs1() + { + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); + + dataRowList.RemoveAt(1); + + Assert.That(dataRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingADataRowListWithTwoRows_WhenRemoveSecondRow_ThenFirstRowIsStillInList() + { + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); + + dataRowList.RemoveAt(1); + + Assert.That(dataRowList[0], Is.EqualTo(dataRow1)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveTests.cs new file mode 100644 index 00000000..fac72bc8 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveTests.cs @@ -0,0 +1,82 @@ +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +{ + [TestFixture] + public class RemoveTests + { + private DataGrid dataGrid; + private DataRowList dataRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + dataRowList = new DataRowList(dataGrid); + } + + [Test] + public void HavingADataRowListWithOneRow_WhenRemoveTheRow_ThenCountIs0() + { + DataRow dataRow = new DataRow("value 1"); + dataRowList.Add(dataRow); + + dataRowList.Remove(dataRow); + + Assert.That(dataRowList.Count, Is.EqualTo(0)); + } + + [Test] + public void HavingADataRowListWithTwoRows_WhenRemoveFirstRow_ThenCountIs1() + { + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); + + dataRowList.Remove(dataRow1); + + Assert.That(dataRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingADataRowListWithTwoRows_WhenRemoveFirstRow_ThenSecondRowIsStillInList() + { + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); + + dataRowList.Remove(dataRow1); + + Assert.That(dataRowList[0], Is.EqualTo(dataRow2)); + } + + [Test] + public void HavingADataRowListWithTwoRows_WhenRemoveSecondRow_ThenCountIs1() + { + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); + + dataRowList.Remove(dataRow2); + + Assert.That(dataRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingADataRowListWithTwoRows_WhenRemoveSecondRow_ThenFirstRowIsStillInList() + { + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); + + dataRowList.Remove(dataRow2); + + Assert.That(dataRowList[0], Is.EqualTo(dataRow1)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/HorizontalBorderXTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/HorizontalBorderXTests.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/HorizontalBorderXTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/HorizontalBorderXTests.cs diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs index b5ffd515..6907cce8 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs @@ -1,65 +1,65 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData -{ - [TestFixture] - public class RowTests - { - [Test] - public void Constructor_sets_ParentRow_for_each_cell() - { - DataCell cell0 = new DataCell("cell content"); - DataCell cell1 = new DataCell("cell content"); - DataCell cell2 = new DataCell("cell content"); - - DataRow row = new DataRow(cell0, cell1, cell2); - - Assert.That(cell0.ParentRow, Is.SameAs(row)); - Assert.That(cell1.ParentRow, Is.SameAs(row)); - Assert.That(cell2.ParentRow, Is.SameAs(row)); - } - - [Test] - public void Constructor_keeps_the_received_Cell_instances() - { - DataCell cell0 = new DataCell("cell content"); - DataCell cell1 = new DataCell("cell content"); - DataCell cell2 = new DataCell("cell content"); - - DataRow row = new DataRow(cell0, cell1, cell2); - - Assert.That(row[0], Is.SameAs(cell0)); - Assert.That(row[1], Is.SameAs(cell1)); - Assert.That(row[2], Is.SameAs(cell2)); - } - - [Test] - public void Constructor_created_empty_Cell_if_one_item_is_null() - { - DataCell cell0 = new DataCell("cell content"); - DataCell cell2 = new DataCell("cell content"); - - DataRow row = new DataRow(cell0, null, cell2); - - Assert.That(row[1], Is.InstanceOf()); - Assert.That(row[1].IsEmpty, Is.True); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables +{ + [TestFixture] + public class RowTests + { + [Test] + public void Constructor_sets_ParentRow_for_each_cell() + { + DataCell cell0 = new DataCell("cell content"); + DataCell cell1 = new DataCell("cell content"); + DataCell cell2 = new DataCell("cell content"); + + DataRow row = new DataRow(cell0, cell1, cell2); + + Assert.That(cell0.ParentRow, Is.SameAs(row)); + Assert.That(cell1.ParentRow, Is.SameAs(row)); + Assert.That(cell2.ParentRow, Is.SameAs(row)); + } + + [Test] + public void Constructor_keeps_the_received_Cell_instances() + { + DataCell cell0 = new DataCell("cell content"); + DataCell cell1 = new DataCell("cell content"); + DataCell cell2 = new DataCell("cell content"); + + DataRow row = new DataRow(cell0, cell1, cell2); + + Assert.That(row[0], Is.SameAs(cell0)); + Assert.That(row[1], Is.SameAs(cell1)); + Assert.That(row[2], Is.SameAs(cell2)); + } + + [Test] + public void Constructor_created_empty_Cell_if_one_item_is_null() + { + DataCell cell0 = new DataCell("cell content"); + DataCell cell2 = new DataCell("cell content"); + + DataRow row = new DataRow(cell0, null, cell2); + + Assert.That(row[1], Is.InstanceOf()); + Assert.That(row[1].IsEmpty, Is.True); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs index 910ff701..cc48bd0b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs @@ -1,91 +1,91 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class CellAlignmentPerColumnTests - { - [Test] - public void column_0_is_aligned_to_Right() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.HeaderRow.IsVisible = false; - - Column column0 = new Column("Col 0"); - column0.CellHorizontalAlignment = HorizontalAlignment.Right; - dataGrid.Columns.Add(column0); - - Column column1 = new Column("Col 1"); - dataGrid.Columns.Add(column1); - - Column column2 = new Column("Col 2"); - dataGrid.Columns.Add(column2); - - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add("1,0", "1,1", "1,2"); - dataGrid.Rows.Add("2,0", "2,1", "2,2"); - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -| 1,0 | 1,1 | 1,2 | -| 2,0 | 2,1 | 2,2 | -+----------+----------+---------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void column_0_is_aligned_to_Right_and_cell_1_0_is_aligned_to_Left() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.HeaderRow.IsVisible = false; - - Column column0 = new Column("Col 0"); - column0.CellHorizontalAlignment = HorizontalAlignment.Right; - dataGrid.Columns.Add(column0); - - Column column1 = new Column("Col 1"); - dataGrid.Columns.Add(column1); - - Column column2 = new Column("Col 2"); - dataGrid.Columns.Add(column2); - - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); - dataGrid.Rows.Add("2,0", "2,1", "2,2"); - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -| 1,0 | 1,1 | 1,2 | -| 2,0 | 2,1 | 2,2 | -+----------+----------+---------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class CellAlignmentPerColumnTests + { + [Test] + public void column_0_is_aligned_to_Right() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.HeaderRow.IsVisible = false; + + Column column0 = new Column("Col 0"); + column0.CellHorizontalAlignment = HorizontalAlignment.Right; + dataGrid.Columns.Add(column0); + + Column column1 = new Column("Col 1"); + dataGrid.Columns.Add(column1); + + Column column2 = new Column("Col 2"); + dataGrid.Columns.Add(column2); + + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid.Rows.Add("1,0", "1,1", "1,2"); + dataGrid.Rows.Add("2,0", "2,1", "2,2"); + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | +| 1,0 | 1,1 | 1,2 | +| 2,0 | 2,1 | 2,2 | ++----------+----------+---------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void column_0_is_aligned_to_Right_and_cell_1_0_is_aligned_to_Left() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.HeaderRow.IsVisible = false; + + Column column0 = new Column("Col 0"); + column0.CellHorizontalAlignment = HorizontalAlignment.Right; + dataGrid.Columns.Add(column0); + + Column column1 = new Column("Col 1"); + dataGrid.Columns.Add(column1); + + Column column2 = new Column("Col 2"); + dataGrid.Columns.Add(column2); + + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); + dataGrid.Rows.Add("2,0", "2,1", "2,2"); + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | +| 1,0 | 1,1 | 1,2 | +| 2,0 | 2,1 | 2,2 | ++----------+----------+---------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerTableTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerTableTests.cs index 030c02fc..bff71f62 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentPerTableTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerTableTests.cs @@ -1,82 +1,82 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class CellAlignmentPerTableTests - { - [Test] - public void whole_table_is_aligned_to_Right_without_explicit_columns() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.HeaderRow.IsVisible = false; - dataGrid.CellHorizontalAlignment = HorizontalAlignment.Right; - - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add("1,0", "1,1", "1,2"); - dataGrid.Rows.Add("2,0", "2,1", "2,2"); - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -| 1,0 | 1,1 | 1,2 | -| 2,0 | 2,1 | 2,2 | -+----------+----------+---------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void whole_table_is_aligned_to_Right_with_explicit_declared_columns() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.CellHorizontalAlignment = HorizontalAlignment.Right; - dataGrid.HeaderRow.IsVisible = false; - - Column column0 = new Column("Col 0"); - dataGrid.Columns.Add(column0); - - Column column1 = new Column("Col 1"); - dataGrid.Columns.Add(column1); - - Column column2 = new Column("Col 2"); - dataGrid.Columns.Add(column2); - - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add("1,0", "1,1", "1,2"); - dataGrid.Rows.Add("2,0", "2,1", "2,2"); - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -| 1,0 | 1,1 | 1,2 | -| 2,0 | 2,1 | 2,2 | -+----------+----------+---------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class CellAlignmentPerTableTests + { + [Test] + public void whole_table_is_aligned_to_Right_without_explicit_columns() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.HeaderRow.IsVisible = false; + dataGrid.CellHorizontalAlignment = HorizontalAlignment.Right; + + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid.Rows.Add("1,0", "1,1", "1,2"); + dataGrid.Rows.Add("2,0", "2,1", "2,2"); + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | +| 1,0 | 1,1 | 1,2 | +| 2,0 | 2,1 | 2,2 | ++----------+----------+---------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void whole_table_is_aligned_to_Right_with_explicit_declared_columns() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.CellHorizontalAlignment = HorizontalAlignment.Right; + dataGrid.HeaderRow.IsVisible = false; + + Column column0 = new Column("Col 0"); + dataGrid.Columns.Add(column0); + + Column column1 = new Column("Col 1"); + dataGrid.Columns.Add(column1); + + Column column2 = new Column("Col 2"); + dataGrid.Columns.Add(column2); + + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid.Rows.Add("1,0", "1,1", "1,2"); + dataGrid.Rows.Add("2,0", "2,1", "2,2"); + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | +| 1,0 | 1,1 | 1,2 | +| 2,0 | 2,1 | 2,2 | ++----------+----------+---------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs index ffde2980..4284629f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs @@ -1,216 +1,216 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class CellAlignmentTests - { - [Test] - public void by_default_cell_content_is_aligned_to_left() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -+----------+----------+---------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void cell_0_1_is_alignment_Default_after_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid[0][1].HorizontalAlignment = HorizontalAlignment.Default; - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -+----------+----------+---------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void cell_0_1_is_alignment_Left_after_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid[0][1].HorizontalAlignment = HorizontalAlignment.Left; - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -+----------+----------+---------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void cell_0_1_is_alignment_Center_after_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid[0][1].HorizontalAlignment = HorizontalAlignment.Center; - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -+----------+----------+---------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void cell_0_1_is_alignment_Right_after_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid[0][1].HorizontalAlignment = HorizontalAlignment.Right; - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -+----------+----------+---------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void cell_1_1_is_alignment_Default_at_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Default), "1,1", "1,2" }); - dataGrid.Rows.Add("2,0", "2,1", "2,2"); - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -| 1,0 | 1,1 | 1,2 | -| 2,0 | 2,1 | 2,2 | -+----------+----------+---------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void cell_1_1_is_alignment_Left_at_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); - dataGrid.Rows.Add("2,0", "2,1", "2,2"); - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -| 1,0 | 1,1 | 1,2 | -| 2,0 | 2,1 | 2,2 | -+----------+----------+---------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void cell_1_1_is_alignment_Center_at_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Center), "1,1", "1,2" }); - dataGrid.Rows.Add("2,0", "2,1", "2,2"); - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -| 1,0 | 1,1 | 1,2 | -| 2,0 | 2,1 | 2,2 | -+----------+----------+---------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void cell_1_1_is_alignment_Right_at_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a cell alignment test"); - dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Right), "1,1", "1,2" }); - dataGrid.Rows.Add("2,0", "2,1", "2,2"); - - string expected = - @"+-------------------------------+ -| This is a cell alignment test | -+----------+----------+---------+ -| 0,0 | 0,1 | 0,2 | -| 1,0 | 1,1 | 1,2 | -| 2,0 | 2,1 | 2,2 | -+----------+----------+---------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void TestCellHorizontalAlign2() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "My Title"; - - dataGrid.Rows.Add("1234567", "123456", "one two"); - dataGrid.Rows.Add(new DataCell("1", HorizontalAlignment.Center), new DataCell("asd", HorizontalAlignment.Center), new DataCell("asas")); - dataGrid.Rows.Add("12", "a", "errr"); - - string expected = - @"+----------------------------+ -| My Title | -+---------+--------+---------+ -| 1234567 | 123456 | one two | -| 1 | asd | asas | -| 12 | a | errr | -+---------+--------+---------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class CellAlignmentTests + { + [Test] + public void by_default_cell_content_is_aligned_to_left() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | ++----------+----------+---------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void cell_0_1_is_alignment_Default_after_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid[0][1].HorizontalAlignment = HorizontalAlignment.Default; + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | ++----------+----------+---------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void cell_0_1_is_alignment_Left_after_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid[0][1].HorizontalAlignment = HorizontalAlignment.Left; + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | ++----------+----------+---------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void cell_0_1_is_alignment_Center_after_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid[0][1].HorizontalAlignment = HorizontalAlignment.Center; + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | ++----------+----------+---------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void cell_0_1_is_alignment_Right_after_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid[0][1].HorizontalAlignment = HorizontalAlignment.Right; + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | ++----------+----------+---------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void cell_1_1_is_alignment_Default_at_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Default), "1,1", "1,2" }); + dataGrid.Rows.Add("2,0", "2,1", "2,2"); + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | +| 1,0 | 1,1 | 1,2 | +| 2,0 | 2,1 | 2,2 | ++----------+----------+---------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void cell_1_1_is_alignment_Left_at_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); + dataGrid.Rows.Add("2,0", "2,1", "2,2"); + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | +| 1,0 | 1,1 | 1,2 | +| 2,0 | 2,1 | 2,2 | ++----------+----------+---------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void cell_1_1_is_alignment_Center_at_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Center), "1,1", "1,2" }); + dataGrid.Rows.Add("2,0", "2,1", "2,2"); + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | +| 1,0 | 1,1 | 1,2 | +| 2,0 | 2,1 | 2,2 | ++----------+----------+---------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void cell_1_1_is_alignment_Right_at_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a cell alignment test"); + dataGrid.Rows.Add("0,0", "0,1", "0,2"); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Right), "1,1", "1,2" }); + dataGrid.Rows.Add("2,0", "2,1", "2,2"); + + string expected = + @"+-------------------------------+ +| This is a cell alignment test | ++----------+----------+---------+ +| 0,0 | 0,1 | 0,2 | +| 1,0 | 1,1 | 1,2 | +| 2,0 | 2,1 | 2,2 | ++----------+----------+---------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void TestCellHorizontalAlign2() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "My Title"; + + dataGrid.Rows.Add("1234567", "123456", "one two"); + dataGrid.Rows.Add(new DataCell("1", HorizontalAlignment.Center), new DataCell("asd", HorizontalAlignment.Center), new DataCell("asas")); + dataGrid.Rows.Add("12", "a", "errr"); + + string expected = + @"+----------------------------+ +| My Title | ++---------+--------+---------+ +| 1234567 | 123456 | one two | +| 1 | asd | asas | +| 12 | a | errr | ++---------+--------+---------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellMultilineTests.cs similarity index 93% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellMultilineTests.cs index 1736fceb..0a283af2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CellMultilineTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellMultilineTests.cs @@ -1,45 +1,45 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class CellMultilineTests - { - [Test] - public void TestMultilineCellContent() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "My Title"; - dataGrid.Rows.Add("first line\nsecond line", "single line", "one\ntwo\nthree"); - - string expected = - @"+-----------------------------------+ -| My Title | -+-------------+-------------+-------+ -| first line | single line | one | -| second line | | two | -| | | three | -+-------------+-------------+-------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class CellMultilineTests + { + [Test] + public void TestMultilineCellContent() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "My Title"; + dataGrid.Rows.Add("first line\nsecond line", "single line", "one\ntwo\nthree"); + + string expected = + @"+-----------------------------------+ +| My Title | ++-------------+-------------+-------+ +| first line | single line | one | +| second line | | two | +| | | three | ++-------------+-------------+-------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs index e7bb269b..c0a25439 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs @@ -1,67 +1,67 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class ConstructorTests - { - [Test] - public void TestConstructor1() - { - DataGrid dataGrid = new DataGrid(); - - Assert.That(dataGrid.Title, Is.EqualTo(MultilineText.Empty)); - Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); - Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); - Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); - Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); - } - - [Test] - public void TestConstructor2() - { - DataGrid dataGrid = new DataGrid("My Title"); - - Assert.That(dataGrid.Title, Is.EqualTo(new MultilineText("My Title"))); - Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); - Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); - Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); - Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); - } - - [Test] - public void TestConstructor3() - { - DataGrid dataGrid = new DataGrid(new MultilineText("My Title")); - - Assert.That(dataGrid.Title, Is.EqualTo(new MultilineText("My Title"))); - Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); - Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); - Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); - Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class ConstructorTests + { + [Test] + public void TestConstructor1() + { + DataGrid dataGrid = new DataGrid(); + + Assert.That(dataGrid.Title, Is.EqualTo(MultilineText.Empty)); + Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); + Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); + Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); + Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); + } + + [Test] + public void TestConstructor2() + { + DataGrid dataGrid = new DataGrid("My Title"); + + Assert.That(dataGrid.Title, Is.EqualTo(new MultilineText("My Title"))); + Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); + Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); + Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); + Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); + } + + [Test] + public void TestConstructor3() + { + DataGrid dataGrid = new DataGrid(new MultilineText("My Title")); + + Assert.That(dataGrid.Title, Is.EqualTo(new MultilineText("My Title"))); + Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); + Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); + Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); + Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs index 1fb681a4..f1e8e268 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/CustomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs @@ -1,154 +1,154 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class CustomBorderTests - { - [Test] - public void render_simple_table_with_custom_border() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔═══════╦══════╦══════╗ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚═══════╩══════╩══════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void render_table_with_custom_border_and_title() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "My Title"; - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔═════════════════════╗ -║ My Title ║ -╠═══════╦══════╦══════╣ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚═══════╩══════╩══════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void render_table_with_custom_border_and_headers() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.HeaderRow.IsVisible = true; - dataGrid.Columns.Add(new Column("One")); - dataGrid.Columns.Add(new Column("Two")); - dataGrid.Columns.Add(new Column("Three")); - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔═══════╦══════╦═══════╗ -║ One ║ Two ║ Three ║ -╠═══════╬══════╬═══════╣ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚═══════╩══════╩═══════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void render_table_with_custom_border_title_and_headers() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Title = "My Title"; - dataGrid.HeaderRow.IsVisible = true; - dataGrid.Columns.Add(new Column("One")); - dataGrid.Columns.Add(new Column("Two")); - dataGrid.Columns.Add(new Column("Three")); - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔══════════════════════╗ -║ My Title ║ -╠═══════╦══════╦═══════╣ -║ One ║ Two ║ Three ║ -╠═══════╬══════╬═══════╣ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚═══════╩══════╩═══════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void render_table_with_digit_and_letter_border() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = new BorderTemplate("1234567890abcde"); - dataGrid.Title = "My Title"; - dataGrid.HeaderRow.IsVisible = true; - dataGrid.CellPaddingLeft = 3; - dataGrid.CellPaddingRight = 3; - dataGrid.Columns.Add(new Column("One")); - dataGrid.Columns.Add(new Column("Two")); - dataGrid.Columns.Add(new Column("Three")); - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"122222222222222222222222222222222223 -8 My Title 4 -beeeeeeeeeee9eeeeeeeeee9eeeeeeeeeee0 -8 One d Two d Three 4 -beeeeeeeeeeeceeeeeeeeeeceeeeeeeeeee0 -8 one d ichi d eins 4 -8 two d ni d zwei 4 -8 three d san d drei 4 -766666666666a6666666666a666666666665 -"; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class CustomBorderTests + { + [Test] + public void render_simple_table_with_custom_border() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔═══════╦══════╦══════╗ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚═══════╩══════╩══════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void render_table_with_custom_border_and_title() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "My Title"; + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔═════════════════════╗ +║ My Title ║ +╠═══════╦══════╦══════╣ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚═══════╩══════╩══════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void render_table_with_custom_border_and_headers() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.HeaderRow.IsVisible = true; + dataGrid.Columns.Add(new Column("One")); + dataGrid.Columns.Add(new Column("Two")); + dataGrid.Columns.Add(new Column("Three")); + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔═══════╦══════╦═══════╗ +║ One ║ Two ║ Three ║ +╠═══════╬══════╬═══════╣ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚═══════╩══════╩═══════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void render_table_with_custom_border_title_and_headers() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Title = "My Title"; + dataGrid.HeaderRow.IsVisible = true; + dataGrid.Columns.Add(new Column("One")); + dataGrid.Columns.Add(new Column("Two")); + dataGrid.Columns.Add(new Column("Three")); + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔══════════════════════╗ +║ My Title ║ +╠═══════╦══════╦═══════╣ +║ One ║ Two ║ Three ║ +╠═══════╬══════╬═══════╣ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚═══════╩══════╩═══════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void render_table_with_digit_and_letter_border() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = new BorderTemplate("1234567890abcde"); + dataGrid.Title = "My Title"; + dataGrid.HeaderRow.IsVisible = true; + dataGrid.CellPaddingLeft = 3; + dataGrid.CellPaddingRight = 3; + dataGrid.Columns.Add(new Column("One")); + dataGrid.Columns.Add(new Column("Two")); + dataGrid.Columns.Add(new Column("Three")); + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"122222222222222222222222222222222223 +8 My Title 4 +beeeeeeeeeee9eeeeeeeeee9eeeeeeeeeee0 +8 One d Two d Three 4 +beeeeeeeeeeeceeeeeeeeeeceeeeeeeeeee0 +8 one d ichi d eins 4 +8 two d ni d zwei 4 +8 three d san d drei 4 +766666666666a6666666666a666666666665 +"; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/HeaderAlignmentTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/HeaderAlignmentTests.cs index 68ab2310..710aee75 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/HeaderAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/HeaderAlignmentTests.cs @@ -1,154 +1,154 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class HeaderAlignmentTests - { - [Test] - public void by_default_header_cell_content_is_aligned_to_left() - { - DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); - dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); - dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); - - string expected = - @"+--------------------------------------------------------+ -| This is a header cell alignment test | -+------------------+------------------+------------------+ -| Header 1 | Header 2 | Header 3 | -+------------------+------------------+------------------+ -| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | -| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | -| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | -+------------------+------------------+------------------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void header_cell_1_is_alignment_Default_after_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); - dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); - dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); - dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Default; - - string expected = - @"+--------------------------------------------------------+ -| This is a header cell alignment test | -+------------------+------------------+------------------+ -| Header 1 | Header 2 | Header 3 | -+------------------+------------------+------------------+ -| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | -| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | -| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | -+------------------+------------------+------------------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void header_cell_1_is_alignment_Left_after_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); - dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); - dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); - dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Left; - - string expected = - @"+--------------------------------------------------------+ -| This is a header cell alignment test | -+------------------+------------------+------------------+ -| Header 1 | Header 2 | Header 3 | -+------------------+------------------+------------------+ -| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | -| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | -| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | -+------------------+------------------+------------------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void header_cell_1_is_alignment_Center_after_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); - dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); - dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); - dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Center; - - string expected = - @"+--------------------------------------------------------+ -| This is a header cell alignment test | -+------------------+------------------+------------------+ -| Header 1 | Header 2 | Header 3 | -+------------------+------------------+------------------+ -| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | -| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | -| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | -+------------------+------------------+------------------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void header_cell_1_is_alignment_Right_after_cell_creation() - { - DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); - dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); - dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); - dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Right; - - string expected = - @"+--------------------------------------------------------+ -| This is a header cell alignment test | -+------------------+------------------+------------------+ -| Header 1 | Header 2 | Header 3 | -+------------------+------------------+------------------+ -| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | -| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | -| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | -+------------------+------------------+------------------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class HeaderAlignmentTests + { + [Test] + public void by_default_header_cell_content_is_aligned_to_left() + { + DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); + dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); + dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); + + string expected = + @"+--------------------------------------------------------+ +| This is a header cell alignment test | ++------------------+------------------+------------------+ +| Header 1 | Header 2 | Header 3 | ++------------------+------------------+------------------+ +| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | +| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | +| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | ++------------------+------------------+------------------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void header_cell_1_is_alignment_Default_after_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); + dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); + dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); + dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Default; + + string expected = + @"+--------------------------------------------------------+ +| This is a header cell alignment test | ++------------------+------------------+------------------+ +| Header 1 | Header 2 | Header 3 | ++------------------+------------------+------------------+ +| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | +| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | +| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | ++------------------+------------------+------------------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void header_cell_1_is_alignment_Left_after_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); + dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); + dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); + dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Left; + + string expected = + @"+--------------------------------------------------------+ +| This is a header cell alignment test | ++------------------+------------------+------------------+ +| Header 1 | Header 2 | Header 3 | ++------------------+------------------+------------------+ +| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | +| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | +| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | ++------------------+------------------+------------------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void header_cell_1_is_alignment_Center_after_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); + dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); + dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); + dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Center; + + string expected = + @"+--------------------------------------------------------+ +| This is a header cell alignment test | ++------------------+------------------+------------------+ +| Header 1 | Header 2 | Header 3 | ++------------------+------------------+------------------+ +| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | +| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | +| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | ++------------------+------------------+------------------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void header_cell_1_is_alignment_Right_after_cell_creation() + { + DataGrid dataGrid = new DataGrid("This is a header cell alignment test"); + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + dataGrid.Rows.Add("Cell Content 0,0", "Cell Content 0,1", "Cell Content 0,2"); + dataGrid.Rows.Add("Cell Content 1,0", "Cell Content 1,1", "Cell Content 1,2"); + dataGrid.Rows.Add("Cell Content 2,0", "Cell Content 2,1", "Cell Content 2,2"); + dataGrid.Columns[1].CellHorizontalAlignment = HorizontalAlignment.Right; + + string expected = + @"+--------------------------------------------------------+ +| This is a header cell alignment test | ++------------------+------------------+------------------+ +| Header 1 | Header 2 | Header 3 | ++------------------+------------------+------------------+ +| Cell Content 0,0 | Cell Content 0,1 | Cell Content 0,2 | +| Cell Content 1,0 | Cell Content 1,1 | Cell Content 1,2 | +| Cell Content 2,0 | Cell Content 2,1 | Cell Content 2,2 | ++------------------+------------------+------------------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/LinesBetweenRowsTests.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/LinesBetweenRowsTests.cs index e197a03e..70d0541e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/LinesBetweenRowsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/LinesBetweenRowsTests.cs @@ -1,73 +1,73 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class LinesBetweenRowsTests - { - [Test] - public void three_rows_without_lines_between_them() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "My Title"; - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"+---------------------+ -| My Title | -+-------+------+------+ -| one | ichi | eins | -| two | ni | zwei | -| three | san | drei | -+-------+------+------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void three_rows_with_lines_between_them() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "My Title"; - dataGrid.DisplayBorderBetweenRows = true; - - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"+---------------------+ -| My Title | -+-------+------+------+ -| one | ichi | eins | -+-------+------+------+ -| two | ni | zwei | -+-------+------+------+ -| three | san | drei | -+-------+------+------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class LinesBetweenRowsTests + { + [Test] + public void three_rows_without_lines_between_them() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "My Title"; + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"+---------------------+ +| My Title | ++-------+------+------+ +| one | ichi | eins | +| two | ni | zwei | +| three | san | drei | ++-------+------+------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void three_rows_with_lines_between_them() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "My Title"; + dataGrid.DisplayBorderBetweenRows = true; + + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"+---------------------+ +| My Title | ++-------+------+------+ +| one | ichi | eins | ++-------+------+------+ +| two | ni | zwei | ++-------+------+------+ +| three | san | drei | ++-------+------+------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs similarity index 93% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs index 8c0b5cd2..e4d7eb88 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/NoBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs @@ -1,63 +1,63 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class NoBorderTests - { - [Test] - public void render_simple_table_without_border() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.DisplayBorder = false; - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @" one ichi eins - two ni zwei - three san drei -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void render_table_with_title_and_no_border() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.DisplayBorder = false; - dataGrid.Title = "My Title"; - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @" My Title - one ichi eins - two ni zwei - three san drei -"; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class NoBorderTests + { + [Test] + public void render_simple_table_without_border() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.DisplayBorder = false; + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @" one ichi eins + two ni zwei + three san drei +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void render_table_with_title_and_no_border() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.DisplayBorder = false; + dataGrid.Title = "My Title"; + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @" My Title + one ichi eins + two ni zwei + three san drei +"; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs index 9ae69b00..3d776db7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.LongTitle.Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs @@ -1,187 +1,187 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class SpecialCaseBorderTests_LongTitle - { - [Test] - public void all() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Title = "This is a title longer than the rows"; - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔══════════════════════════════════════╗ -║ This is a title longer than the rows ║ -╠════════════╦════════════╦════════════╣ -║ Header 1 ║ Header 2 ║ Header 3 ║ -╠════════════╬════════════╬════════════╣ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚════════════╩════════════╩════════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void no_title() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔══════════╦══════════╦══════════╗ -║ Header 1 ║ Header 2 ║ Header 3 ║ -╠══════════╬══════════╬══════════╣ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚══════════╩══════════╩══════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void no_header() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "This is a title longer than the rows"; - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔══════════════════════════════════════╗ -║ This is a title longer than the rows ║ -╠═════════════╦════════════╦═══════════╣ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚═════════════╩════════════╩═══════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void no_data() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "This is a title longer than the rows"; - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - - string expected = - @"╔══════════════════════════════════════╗ -║ This is a title longer than the rows ║ -╠════════════╦════════════╦════════════╣ -║ Header 1 ║ Header 2 ║ Header 3 ║ -╚════════════╩════════════╩════════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void only_data() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔═══════╦══════╦══════╗ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚═══════╩══════╩══════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void only_header() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - - string expected = - @"╔══════════╦══════════╦══════════╗ -║ Header 1 ║ Header 2 ║ Header 3 ║ -╚══════════╩══════════╩══════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void only_title() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "This is a title longer than the rows"; - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - - string expected = - @"╔══════════════════════════════════════╗ -║ This is a title longer than the rows ║ -╚══════════════════════════════════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void no_title_no_header_no_data() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - - string expected = string.Empty; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class SpecialCaseBorderTests_LongTitle + { + [Test] + public void all() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Title = "This is a title longer than the rows"; + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔══════════════════════════════════════╗ +║ This is a title longer than the rows ║ +╠════════════╦════════════╦════════════╣ +║ Header 1 ║ Header 2 ║ Header 3 ║ +╠════════════╬════════════╬════════════╣ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚════════════╩════════════╩════════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void no_title() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔══════════╦══════════╦══════════╗ +║ Header 1 ║ Header 2 ║ Header 3 ║ +╠══════════╬══════════╬══════════╣ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚══════════╩══════════╩══════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void no_header() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "This is a title longer than the rows"; + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔══════════════════════════════════════╗ +║ This is a title longer than the rows ║ +╠═════════════╦════════════╦═══════════╣ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚═════════════╩════════════╩═══════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void no_data() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "This is a title longer than the rows"; + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + + string expected = + @"╔══════════════════════════════════════╗ +║ This is a title longer than the rows ║ +╠════════════╦════════════╦════════════╣ +║ Header 1 ║ Header 2 ║ Header 3 ║ +╚════════════╩════════════╩════════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void only_data() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔═══════╦══════╦══════╗ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚═══════╩══════╩══════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void only_header() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + + string expected = + @"╔══════════╦══════════╦══════════╗ +║ Header 1 ║ Header 2 ║ Header 3 ║ +╚══════════╩══════════╩══════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void only_title() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "This is a title longer than the rows"; + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + + string expected = + @"╔══════════════════════════════════════╗ +║ This is a title longer than the rows ║ +╚══════════════════════════════════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void no_title_no_header_no_data() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + + string expected = string.Empty; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs index 1c7d3b62..dd06d628 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs @@ -1,187 +1,187 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class SpecialCaseBorderTests_ShortTitle - { - [Test] - public void all() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Title = "Short Title"; - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔════════════════════════════════╗ -║ Short Title ║ -╠══════════╦══════════╦══════════╣ -║ Header 1 ║ Header 2 ║ Header 3 ║ -╠══════════╬══════════╬══════════╣ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚══════════╩══════════╩══════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void no_title() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔══════════╦══════════╦══════════╗ -║ Header 1 ║ Header 2 ║ Header 3 ║ -╠══════════╬══════════╬══════════╣ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚══════════╩══════════╩══════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void no_header() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "Short Title"; - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔═════════════════════╗ -║ Short Title ║ -╠═══════╦══════╦══════╣ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚═══════╩══════╩══════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void no_data() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "Short Title"; - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - - string expected = - @"╔════════════════════════════════╗ -║ Short Title ║ -╠══════════╦══════════╦══════════╣ -║ Header 1 ║ Header 2 ║ Header 3 ║ -╚══════════╩══════════╩══════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void only_data() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Rows.Add("one", "ichi", "eins"); - dataGrid.Rows.Add("two", "ni", "zwei"); - dataGrid.Rows.Add("three", "san", "drei"); - - string expected = - @"╔═══════╦══════╦══════╗ -║ one ║ ichi ║ eins ║ -║ two ║ ni ║ zwei ║ -║ three ║ san ║ drei ║ -╚═══════╩══════╩══════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void only_header() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - dataGrid.Columns.Add(new Column("Header 1")); - dataGrid.Columns.Add(new Column("Header 2")); - dataGrid.Columns.Add(new Column("Header 3")); - - string expected = - @"╔══════════╦══════════╦══════════╗ -║ Header 1 ║ Header 2 ║ Header 3 ║ -╚══════════╩══════════╩══════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void only_title() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "Short Title"; - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - - string expected = - @"╔═════════════╗ -║ Short Title ║ -╚═════════════╝ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void no_title_no_header_no_data() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; - - string expected = string.Empty; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class SpecialCaseBorderTests_ShortTitle + { + [Test] + public void all() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Title = "Short Title"; + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔════════════════════════════════╗ +║ Short Title ║ +╠══════════╦══════════╦══════════╣ +║ Header 1 ║ Header 2 ║ Header 3 ║ +╠══════════╬══════════╬══════════╣ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚══════════╩══════════╩══════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void no_title() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔══════════╦══════════╦══════════╗ +║ Header 1 ║ Header 2 ║ Header 3 ║ +╠══════════╬══════════╬══════════╣ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚══════════╩══════════╩══════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void no_header() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "Short Title"; + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔═════════════════════╗ +║ Short Title ║ +╠═══════╦══════╦══════╣ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚═══════╩══════╩══════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void no_data() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "Short Title"; + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + + string expected = + @"╔════════════════════════════════╗ +║ Short Title ║ +╠══════════╦══════════╦══════════╣ +║ Header 1 ║ Header 2 ║ Header 3 ║ +╚══════════╩══════════╩══════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void only_data() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @"╔═══════╦══════╦══════╗ +║ one ║ ichi ║ eins ║ +║ two ║ ni ║ zwei ║ +║ three ║ san ║ drei ║ +╚═══════╩══════╩══════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void only_header() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Columns.Add(new Column("Header 1")); + dataGrid.Columns.Add(new Column("Header 2")); + dataGrid.Columns.Add(new Column("Header 3")); + + string expected = + @"╔══════════╦══════════╦══════════╗ +║ Header 1 ║ Header 2 ║ Header 3 ║ +╚══════════╩══════════╩══════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void only_title() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "Short Title"; + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + + string expected = + @"╔═════════════╗ +║ Short Title ║ +╚═════════════╝ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void no_title_no_header_no_data() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + + string expected = string.Empty; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs index 10adc48b..fed570df 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TablePaddingTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs @@ -1,77 +1,77 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class TablePaddingTests - { - private DataGrid dataGrid; - - [SetUp] - public void SetUp() - { - dataGrid = new DataGrid("My Title"); - - dataGrid.Rows.Add("1234567", "123456", "one two"); - dataGrid.Rows.Add("1", "asd", "asas"); - dataGrid.Rows.Add("12", "a", "errr"); - } - - [Test] - public void added_a_padding_left_of_2() - { - dataGrid.CellPaddingLeft = 2; - - const string expected = - @"+-------------------------------+ -| My Title | -+----------+---------+----------+ -| 1234567 | 123456 | one two | -| 1 | asd | asas | -| 12 | a | errr | -+----------+---------+----------+ -"; - - Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(2)); - Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void added_a_padding_right_of_2() - { - dataGrid.CellPaddingRight = 2; - - const string expected = - @"+-------------------------------+ -| My Title | -+----------+---------+----------+ -| 1234567 | 123456 | one two | -| 1 | asd | asas | -| 12 | a | errr | -+----------+---------+----------+ -"; - - Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(2)); - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class TablePaddingTests + { + private DataGrid dataGrid; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid("My Title"); + + dataGrid.Rows.Add("1234567", "123456", "one two"); + dataGrid.Rows.Add("1", "asd", "asas"); + dataGrid.Rows.Add("12", "a", "errr"); + } + + [Test] + public void added_a_padding_left_of_2() + { + dataGrid.CellPaddingLeft = 2; + + const string expected = + @"+-------------------------------+ +| My Title | ++----------+---------+----------+ +| 1234567 | 123456 | one two | +| 1 | asd | asas | +| 12 | a | errr | ++----------+---------+----------+ +"; + + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(2)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void added_a_padding_right_of_2() + { + dataGrid.CellPaddingRight = 2; + + const string expected = + @"+-------------------------------+ +| My Title | ++----------+---------+----------+ +| 1234567 | 123456 | one two | +| 1 | asd | asas | +| 12 | a | errr | ++----------+---------+----------+ +"; + + Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(2)); + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleAlignmentTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleAlignmentTests.cs index 49700edb..5208ae2f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleAlignmentTests.cs @@ -1,109 +1,109 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class TitleAlignmentTests - { - [Test] - public void by_default_title_content_is_aligned_to_left() - { - DataGrid dataGrid = new DataGrid("Title"); - dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); - - string expected = - @"+--------------------------------+ -| Title | -+----------+----------+----------+ -| Cell 0,0 | Cell 0,1 | Cell 0,2 | -+----------+----------+----------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void title_alignment_Default() - { - DataGrid dataGrid = new DataGrid("Title"); - dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); - dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Default; - - string expected = - @"+--------------------------------+ -| Title | -+----------+----------+----------+ -| Cell 0,0 | Cell 0,1 | Cell 0,2 | -+----------+----------+----------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void title_alignment_Left() - { - DataGrid dataGrid = new DataGrid("Title"); - dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); - dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Left; - - string expected = - @"+--------------------------------+ -| Title | -+----------+----------+----------+ -| Cell 0,0 | Cell 0,1 | Cell 0,2 | -+----------+----------+----------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void title_alignment_Center() - { - DataGrid dataGrid = new DataGrid("Title"); - dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); - dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Center; - - string expected = - @"+--------------------------------+ -| Title | -+----------+----------+----------+ -| Cell 0,0 | Cell 0,1 | Cell 0,2 | -+----------+----------+----------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void title_alignment_Right() - { - DataGrid dataGrid = new DataGrid("Title"); - dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); - dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Right; - - string expected = - @"+--------------------------------+ -| Title | -+----------+----------+----------+ -| Cell 0,0 | Cell 0,1 | Cell 0,2 | -+----------+----------+----------+ -"; - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class TitleAlignmentTests + { + [Test] + public void by_default_title_content_is_aligned_to_left() + { + DataGrid dataGrid = new DataGrid("Title"); + dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); + + string expected = + @"+--------------------------------+ +| Title | ++----------+----------+----------+ +| Cell 0,0 | Cell 0,1 | Cell 0,2 | ++----------+----------+----------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void title_alignment_Default() + { + DataGrid dataGrid = new DataGrid("Title"); + dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); + dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Default; + + string expected = + @"+--------------------------------+ +| Title | ++----------+----------+----------+ +| Cell 0,0 | Cell 0,1 | Cell 0,2 | ++----------+----------+----------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void title_alignment_Left() + { + DataGrid dataGrid = new DataGrid("Title"); + dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); + dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Left; + + string expected = + @"+--------------------------------+ +| Title | ++----------+----------+----------+ +| Cell 0,0 | Cell 0,1 | Cell 0,2 | ++----------+----------+----------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void title_alignment_Center() + { + DataGrid dataGrid = new DataGrid("Title"); + dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); + dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Center; + + string expected = + @"+--------------------------------+ +| Title | ++----------+----------+----------+ +| Cell 0,0 | Cell 0,1 | Cell 0,2 | ++----------+----------+----------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void title_alignment_Right() + { + DataGrid dataGrid = new DataGrid("Title"); + dataGrid.Rows.Add("Cell 0,0", "Cell 0,1", "Cell 0,2"); + dataGrid.TitleRow.CellHorizontalAlignment = HorizontalAlignment.Right; + + string expected = + @"+--------------------------------+ +| Title | ++----------+----------+----------+ +| Cell 0,0 | Cell 0,1 | Cell 0,2 | ++----------+----------+----------+ +"; + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleTests.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleTests.cs index d96a3283..13327ba7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/TableTests/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleTests.cs @@ -1,84 +1,84 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using System.Collections.Generic; -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.TableTests -{ - [TestFixture] - public class TitleTests - { - [Test] - public void title_is_shorter_than_row() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "My Title"; - dataGrid.Rows.Add("asd", "qwe", "zxczxc"); - - string actual = dataGrid.ToString(); - - string expected = - @"+--------------------+ -| My Title | -+-----+-----+--------+ -| asd | qwe | zxczxc | -+-----+-----+--------+ -"; - Assert.That(actual, Is.EqualTo(expected)); - } - - [Test] - public void title_is_longer_than_row() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = "My Title My Title My Title My Title"; - dataGrid.Rows.Add("asd", "qwe", "zxczxc"); - - string expected = - @"+-------------------------------------+ -| My Title My Title My Title My Title | -+-----------+-----------+-------------+ -| asd | qwe | zxczxc | -+-----------+-----------+-------------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - - [Test] - public void multiline_title() - { - DataGrid dataGrid = new DataGrid(); - dataGrid.Title = new List { "My Title1", "My Title2", "My Title3", "My Title4" }; - dataGrid.Rows.Add("asd", "qwe", "zxczxc"); - - string expected = - @"+--------------------+ -| My Title1 | -| My Title2 | -| My Title3 | -| My Title4 | -+-----+-----+--------+ -| asd | qwe | zxczxc | -+-----+-----+--------+ -"; - - CustomAssert.TableRender(dataGrid, expected); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +{ + [TestFixture] + public class TitleTests + { + [Test] + public void title_is_shorter_than_row() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "My Title"; + dataGrid.Rows.Add("asd", "qwe", "zxczxc"); + + string actual = dataGrid.ToString(); + + string expected = + @"+--------------------+ +| My Title | ++-----+-----+--------+ +| asd | qwe | zxczxc | ++-----+-----+--------+ +"; + Assert.That(actual, Is.EqualTo(expected)); + } + + [Test] + public void title_is_longer_than_row() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = "My Title My Title My Title My Title"; + dataGrid.Rows.Add("asd", "qwe", "zxczxc"); + + string expected = + @"+-------------------------------------+ +| My Title My Title My Title My Title | ++-----------+-----------+-------------+ +| asd | qwe | zxczxc | ++-----------+-----------+-------------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + + [Test] + public void multiline_title() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Title = new List { "My Title1", "My Title2", "My Title3", "My Title4" }; + dataGrid.Rows.Add("asd", "qwe", "zxczxc"); + + string expected = + @"+--------------------+ +| My Title1 | +| My Title2 | +| My Title3 | +| My Title4 | ++-----+-----+--------+ +| asd | qwe | zxczxc | ++-----+-----+--------+ +"; + + CustomAssert.TableRender(dataGrid, expected); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs deleted file mode 100644 index 3bb435de..00000000 --- a/sources/ConsoleTools/ConsoleTools.Tests/TabularData/DataCellTests/RenderLineTests.cs +++ /dev/null @@ -1,245 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using System.Collections.Generic; -using System.Linq; -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.TabularData.DataCellTests -{ - [TestFixture] - public class RenderLineTests - { - [Test] - public void content_is_shorter_than_required_width() - { - DataCell cell = new DataCell("text"); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { "text " })); - } - - [Test] - public void content_is_longer_than_required_width() - { - DataCell cell = new DataCell("some long text"); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { "some long text" })); - } - - [Test] - public void content_is_shorter_than_required_height() - { - DataCell cell = new DataCell("text"); - Size size = new Size(10, 2); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List - { - "text ", - " " - })); - } - - [Test] - public void content_is_longer_than_required_height() - { - DataCell cell = new DataCell(new MultilineText(new[] { "line1", "line2", "line3" })); - Size size = new Size(10, 2); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List - { - "line1 ", - "line2 " - })); - } - - [Test] - public void cell_has_padding_left() - { - DataGrid dataGrid = new DataGrid(); - DataRow row = new DataRow(); - dataGrid.Rows.Add(row); - DataCell cell = new DataCell("text") - { - PaddingLeft = 2, - PaddingRight = 0 - }; - row.AddCell(cell); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { " text " })); - } - - [Test] - public void parent_column_has_padding_left() - { - DataGrid dataGrid = new DataGrid(); - Column column = new Column(string.Empty) - { - CellPaddingLeft = 2, - CellPaddingRight = 0 - }; - dataGrid.Columns.Add(column); - DataRow row = new DataRow(); - dataGrid.Rows.Add(row); - DataCell cell = new DataCell("text"); - row.AddCell(cell); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { " text " })); - } - - [Test] - public void parent_row_has_padding_left() - { - DataGrid dataGrid = new DataGrid(); - DataRow row = new DataRow - { - CellPaddingLeft = 2, - CellPaddingRight = 0 - }; - dataGrid.Rows.Add(row); - DataCell cell = new DataCell("text"); - row.AddCell(cell); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { " text " })); - } - - [Test] - public void parent_table_has_padding_left() - { - DataGrid dataGrid = new DataGrid - { - CellPaddingLeft = 2, - CellPaddingRight = 0 - }; - DataRow row = new DataRow(); - dataGrid.Rows.Add(row); - DataCell cell = new DataCell("text"); - row.AddCell(cell); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { " text " })); - } - - [Test] - public void cell_has_padding_right() - { - DataGrid dataGrid = new DataGrid(); - DataRow row = new DataRow(); - dataGrid.Rows.Add(row); - DataCell cell = new DataCell("text") - { - HorizontalAlignment = HorizontalAlignment.Right, - PaddingLeft = 0, - PaddingRight = 2 - }; - row.AddCell(cell); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { " text " })); - } - - [Test] - public void parent_column_has_padding_right() - { - DataGrid dataGrid = new DataGrid(); - Column column = new Column(string.Empty) - { - CellPaddingLeft = 0, - CellPaddingRight = 2 - }; - dataGrid.Columns.Add(column); - DataRow row = new DataRow(); - dataGrid.Rows.Add(row); - DataCell cell = new DataCell("text") - { - HorizontalAlignment = HorizontalAlignment.Right - }; - row.AddCell(cell); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { " text " })); - } - - [Test] - public void parent_row_has_padding_right() - { - DataGrid dataGrid = new DataGrid(); - DataRow row = new DataRow - { - CellPaddingLeft = 0, - CellPaddingRight = 2 - }; - dataGrid.Rows.Add(row); - DataCell cell = new DataCell("text") - { - HorizontalAlignment = HorizontalAlignment.Right - }; - row.AddCell(cell); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { " text " })); - } - - [Test] - public void parent_table_has_padding_right() - { - DataGrid dataGrid = new DataGrid - { - CellPaddingLeft = 0, - CellPaddingRight = 2 - }; - DataRow row = new DataRow(); - dataGrid.Rows.Add(row); - DataCell cell = new DataCell("text") - { - HorizontalAlignment = HorizontalAlignment.Right - }; - row.AddCell(cell); - Size size = new Size(10, 1); - - List actual = cell.RenderText(size).ToList(); - - Assert.That(actual, Is.EqualTo(new List { " text " })); - } - } -} \ No newline at end of file From 9ea926684ae525f0037b5a735a2cf4627876bd98 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 13 Dec 2020 00:18:49 +0200 Subject: [PATCH 41/57] created the DataGridBorder class to represent the border in the grid. --- .../ConsoleTools.Controls.Tables/DataGrid.cs | 149 ++++++++++++------ .../DataGridBorder.cs | 53 +++++++ .../ITablePrinter.cs | 14 +- .../Printers/ConsoleTablePrinter.cs | 47 +----- .../Printers/StreamTablePrinter.cs | 14 +- .../Printers/StringTablePrinter.cs | 22 +-- .../RenderingModel/BottomBorderData.cs | 2 +- .../RenderingModel/DataBottomBorder.cs | 24 ++- .../RenderingModel/DataDataSeparator.cs | 30 ++-- .../RenderingModel/DataGridBorderX.cs | 52 ++++++ .../RenderingModel/DataGridX.cs | 9 ++ .../RenderingModel/DataGridXBuilder.cs | 40 ++--- .../RenderingModel/DataRowX.cs | 28 ++-- .../RenderingModel/DataTopBorder.cs | 24 ++- .../RenderingModel/HeaderBottomBorder.cs | 24 ++- .../RenderingModel/HeaderDataSeparator.cs | 30 ++-- .../RenderingModel/HeaderRowX.cs | 28 ++-- .../RenderingModel/HeaderTopBorder.cs | 24 ++- .../RenderingModel/TitleBottomBorder.cs | 24 ++- .../RenderingModel/TitleDataSeparator.cs | 30 ++-- .../RenderingModel/TitleHeaderSeparator.cs | 30 ++-- .../RenderingModel/TitleRowX.cs | 21 +-- .../RenderingModel/TitleTopBorder.cs | 24 ++- .../ConsoleTools.Controls.Tables/RowBase.cs | 4 +- .../Commands/ColorsCommand.cs | 56 +++---- 25 files changed, 505 insertions(+), 298 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridBorderX.cs diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index 0210ec9e..3fb688f5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -28,15 +28,16 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables { /// - /// A control that renders a table with data into the console. + /// A control that renders a data grid into the console. /// public class DataGrid : BlockControl { private TitleRow titleRow; private HeaderRow headerRow; + private DataGridBorder border; /// - /// Gets the instance that represents the title row of the table. + /// Gets the instance that represents the title row of the data grid. /// public TitleRow TitleRow { @@ -58,7 +59,7 @@ public MultilineText Title } /// - /// Gets or sets the horizontal alignment for the content of the cells contained by the current table. + /// Gets or sets the horizontal alignment for the content of the cells contained by the current data grid. /// public HorizontalAlignment CellHorizontalAlignment { get; set; } = ConsoleTools.HorizontalAlignment.Default; @@ -73,23 +74,17 @@ public MultilineText Title public int? CellPaddingRight { get; set; } /// - /// Gets a value that specifies if border lines should be drawn between rows. - /// Default value: false - /// - public bool DisplayBorderBetweenRows { get; set; } - - /// - /// Gets the list of columns contained by the current table. + /// Gets the list of columns contained by the current data grid. /// public ColumnList Columns { get; } /// - /// Gets the instance that represents the columns header row of the table. + /// Gets the columns header row of the data grid. /// public HeaderRow HeaderRow { get => headerRow; - set + private set { headerRow = value; headerRow.ParentDataGrid = this; @@ -97,7 +92,7 @@ public HeaderRow HeaderRow } /// - /// The list of rows contained by the current table. + /// Gets the list of rows contained by the current data grid. /// public DataRowList Rows { get; } @@ -117,27 +112,17 @@ public HeaderRow HeaderRow public DataCell this[int rowIndex, int columnIndex] => Rows[rowIndex][columnIndex]; /// - /// Gets or sets a value that specifies if the borders are visible. - /// Default value: true - /// - public bool DisplayBorder { get; set; } = true; - - /// - /// Gets or sets the table borders. - /// - public BorderTemplate BorderTemplate { get; set; } = BorderTemplate.PlusMinusBorderTemplate; - - /// - /// Gets or sets the foreground color for the borders. - /// Default value: null - /// - public ConsoleColor? BorderColor { get; set; } - - /// - /// Gets or sets the background color for the borders. - /// Default value: null + /// Gets an object representing the border of the data grid. /// - public ConsoleColor? BorderBackgroundColor { get; set; } + public DataGridBorder Border + { + get => border; + private set + { + border = value; + border.ParentDataGrid = this; + } + } #region Obsolete Properties @@ -156,14 +141,22 @@ public bool DisplayTitle /// Default value: null /// [Obsolete("Use TitleRow.ForegroundColor property instead.")] - public ConsoleColor? TitleColor { get; set; } + public ConsoleColor? TitleColor + { + get => TitleRow.ForegroundColor; + set => TitleRow.ForegroundColor = value; + } /// /// Gets or sets the background color for the title. /// Default value: null /// [Obsolete("Use TitleRow.BackgroundColor property instead.")] - public ConsoleColor? TitleBackgroundColor { get; set; } + public ConsoleColor? TitleBackgroundColor + { + get => TitleRow.BackgroundColor; + set => TitleRow.BackgroundColor = value; + } /// /// Gets or sets a value that specifies if the column headers are displayed. @@ -181,14 +174,72 @@ public bool DisplayColumnHeaders /// Default value: null /// [Obsolete("Use HeaderRow.ForegroundColor property instead.")] - public ConsoleColor? HeaderColor { get; set; } + public ConsoleColor? HeaderColor + { + get => HeaderRow.ForegroundColor; + set => HeaderRow.ForegroundColor = value; + } /// /// Gets or sets the background color for the column headers. /// Default value: null /// [Obsolete("Use HeaderRow.BackgroundColor property instead.")] - public ConsoleColor? HeaderBackgroundColor { get; set; } + public ConsoleColor? HeaderBackgroundColor + { + get => HeaderRow.BackgroundColor; + set => HeaderRow.BackgroundColor = value; + } + + /// + /// Gets or sets a value that specifies if the borders are visible. + /// Default value: true + /// + [Obsolete("Use Border.IsVisible property instead.")] + public bool DisplayBorder { get; set; } = true; + + /// + /// Gets or sets the data grid borders. + /// + [Obsolete("Use Border.Template property instead.")] + public BorderTemplate BorderTemplate + { + get => Border.Template; + set => Border.Template = value; + } + + /// + /// Gets or sets the foreground color for the borders. + /// Default value: null + /// + [Obsolete("Use Border.ForegroundColor property instead.")] + public ConsoleColor? BorderColor + { + get => Border.ForegroundColor; + set => Border.ForegroundColor = value; + } + + /// + /// Gets or sets the background color for the borders. + /// Default value: null + /// + [Obsolete("Use Border.BackgroundColor property instead.")] + public ConsoleColor? BorderBackgroundColor + { + get => Border.BackgroundColor; + set => Border.BackgroundColor = value; + } + + /// + /// Gets a value that specifies if border lines should be drawn between rows. + /// Default value: false + /// + [Obsolete("Use Border.DisplayBorderBetweenRows property instead.")] + public bool DisplayBorderBetweenRows + { + get => border.DisplayBorderBetweenRows; + set => border.DisplayBorderBetweenRows = value; + } #endregion @@ -201,11 +252,12 @@ public DataGrid() Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(); + Border = new DataGridBorder(); } /// /// Initializes a new instance of the class with - /// the table title. + /// the data grid title. /// public DataGrid(string title) { @@ -213,11 +265,12 @@ public DataGrid(string title) Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); + Border = new DataGridBorder(); } /// /// Initializes a new instance of the class with - /// the table title. + /// the data grid title. /// public DataGrid(MultilineText title) { @@ -225,11 +278,12 @@ public DataGrid(MultilineText title) Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); + Border = new DataGridBorder(); } /// /// Initializes a new instance of the class with - /// the table title. + /// the data grid title. /// public DataGrid(object title) { @@ -237,6 +291,7 @@ public DataGrid(object title) Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); + Border = new DataGridBorder(); } /// @@ -244,15 +299,7 @@ public DataGrid(object title) /// protected override void DoDisplayContent(ControlDisplay display) { - ConsoleTablePrinter consoleTablePrinter = new ConsoleTablePrinter - { - ForegroundColor = ForegroundColor, - BorderColor = BorderColor, - - BackgroundColor = BackgroundColor, - BorderBackgroundColor = BorderBackgroundColor, - }; - + ConsoleTablePrinter consoleTablePrinter = new ConsoleTablePrinter(); RenderInternal(consoleTablePrinter); } @@ -273,9 +320,7 @@ private void RenderInternal(ITablePrinter tablePrinter) TitleRow = TitleRow, HeaderRow = HeaderRow, Rows = Rows, - DisplayBorderBetweenRows = DisplayBorderBetweenRows, - BorderTemplate = BorderTemplate, - DisplayBorder = DisplayBorder + DataGridBorder = Border }; DataGridX dataGridX = dataGridXBuilder.Build(); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs new file mode 100644 index 00000000..7b5444a6 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs @@ -0,0 +1,53 @@ +using System; + +namespace DustInTheWind.ConsoleTools.Controls.Tables +{ + public class DataGridBorder + { + /// + /// Gets or sets the that contains the current instance. + /// + public DataGrid ParentDataGrid { get; internal set; } + + /// + /// Gets or sets a value that specifies if the border is displayed or not. + /// Default value: true + /// + public bool IsVisible { get; set; } = true; + + /// + /// Gets or sets the template to be used. + /// + public BorderTemplate Template { get; set; } = BorderTemplate.PlusMinusBorderTemplate; + + /// + /// Gets or sets the foreground color for the border. + /// Default value: null + /// + public ConsoleColor? ForegroundColor { get; set; } + + /// + /// Gets or sets the background color for the border. + /// Default value: null + /// + public ConsoleColor? BackgroundColor { get; set; } + + /// + /// Gets a value that specifies if border lines should be drawn between rows. + /// Default value: false + /// + public bool DisplayBorderBetweenRows { get; set; } + + public ConsoleColor? CalculateForegroundColor() + { + return ForegroundColor ?? + ParentDataGrid?.ForegroundColor; + } + + public ConsoleColor? CalculateBackgroundColor() + { + return BackgroundColor ?? + ParentDataGrid?.BackgroundColor; + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs index f50c5780..5e8e43e3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ITablePrinter.cs @@ -30,20 +30,20 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables public interface ITablePrinter { /// - /// Writes the specified text, applying the formatting specific for a border, - /// followed by the current line terminator. + /// Writes the specified character, using the specified colors. /// - void WriteLineBorder(string text); + void Write(char c, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor); /// - /// Writes the specified character, applying the formatting specific for a border. + /// Writes the specified text, using the specified colors. /// - void WriteBorder(char c); + void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor); /// - /// Writes the specified text, applying the default formatting. + /// Writes the specified text, using the specified colors, + /// followed by the current line terminator. /// - void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor); + void WriteLine(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor); /// /// Writes the current line terminator. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs index c0043caf..fe334080 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/ConsoleTablePrinter.cs @@ -30,58 +30,27 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.Printers public class ConsoleTablePrinter : ITablePrinter { /// - /// Gets or sets the foreground color for the borders. - /// Default value: Gray + /// Writes the specified character to the . /// - public ConsoleColor? BorderColor { get; set; } = ConsoleColor.Gray; - - /// - /// Gets or sets the default foreground color. - /// Default value: Gray - /// - public ConsoleColor? ForegroundColor { get; set; } = ConsoleColor.Gray; - - /// - /// Gets or sets the background color used to write the text. - /// Default value: null - /// - public ConsoleColor? BackgroundColor { get; set; } - - /// - /// Gets or sets the background color for the borders. - /// Default value: null - /// - public ConsoleColor? BorderBackgroundColor { get; set; } - - /// - /// Writes the specified character to the using the . - /// - public void WriteBorder(char c) + public void Write(char c, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { - ConsoleColor? foregroundColor = BorderColor ?? ForegroundColor; - ConsoleColor? backgroundColor = BorderBackgroundColor ?? BackgroundColor; - Write(foregroundColor, backgroundColor, c); } /// - /// Writes the specified text to the using the , - /// followed by a line terminator. + /// Writes the specified text to the . /// - public void WriteLineBorder(string text) + public void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { - ConsoleColor? foregroundColor = BorderColor ?? ForegroundColor; - ConsoleColor? backgroundColor = BorderBackgroundColor ?? BackgroundColor; - - WriteLine(foregroundColor, backgroundColor, text); + Write(foregroundColor, backgroundColor, text); } /// - /// Writes the specified text to the using the . + /// Writes the specified text to the , followed by a line terminator. /// - public void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) + public void WriteLine(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { - Write(foregroundColor, backgroundColor, text); + WriteLine(foregroundColor, backgroundColor, text); } /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs index db88d7fd..ded790ee 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StreamTablePrinter.cs @@ -48,25 +48,25 @@ public StreamTablePrinter(Stream stream) /// /// Writes the specified character in the underlying . /// - public void WriteBorder(char c) + public void Write(char c, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { streamWriter.Write(c); } /// - /// Writes the specified text in the underlying , followed by a line terminator. + /// Writes the specified text in the underlying . /// - public void WriteLineBorder(string text) + public void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { - streamWriter.WriteLine(text); + streamWriter.Write(text); } /// - /// Writes the specified text in the underlying . + /// Writes the specified text in the underlying , followed by a line terminator. /// - public void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) + public void WriteLine(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { - streamWriter.Write(text); + streamWriter.WriteLine(text); } /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs index ccc6a1bf..6a940e86 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Printers/StringTablePrinter.cs @@ -40,36 +40,28 @@ public StringTablePrinter() sb = new StringBuilder(); } - /// - /// Stores the specified text in the internal . - /// - public void WriteBorder(string text) - { - sb.Append(text); - } - /// /// Stores the specified character in the internal . /// - public void WriteBorder(char c) + public void Write(char c, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { sb.Append(c); } /// - /// Stores the specified text in the internal , followed by a line terminator. + /// Stores the specified text in the internal . /// - public void WriteLineBorder(string text) + public void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { - sb.AppendLine(text); + sb.Append(text); } /// - /// Stores the specified text in the internal . + /// Stores the specified text in the internal , followed by a line terminator. /// - public void Write(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) + public void WriteLine(string text, ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { - sb.Append(text); + sb.AppendLine(text); } /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs index 7c45146b..48dd6b79 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/BottomBorderData.cs @@ -53,7 +53,7 @@ public void Render(ITablePrinter tablePrinter) if (borderText == null) borderText = borderTemplate.GenerateBottomBorder(columnsWidths); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, null, null); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs index b38a80e7..4dd00bea 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs @@ -26,7 +26,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataBottomBorder { - private readonly BorderTemplate borderTemplate; private string borderText; private List columnsWidths; @@ -43,17 +42,28 @@ public List ColumnsWidths } } - public DataBottomBorder(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { if (borderText == null) - borderText = borderTemplate.GenerateBottomBorder(columnsWidths); + borderText = BorderTemplate.GenerateBottomBorder(columnsWidths); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); + } + + public static DataBottomBorder CreateFrom(DataGridBorder dataGridBorder) + { + return new DataBottomBorder + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs index 5113f297..ee0a2064 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs @@ -27,7 +27,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataDataSeparator { - private readonly BorderTemplate borderTemplate; private string borderText; private List columnsWidths; @@ -44,38 +43,49 @@ public List ColumnsWidths } } - public DataDataSeparator(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { if (borderText == null) borderText = GenerateDataRowSeparatorBorder(); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } private string GenerateDataRowSeparatorBorder() { StringBuilder sb = new StringBuilder(); - sb.Append(borderTemplate.LeftIntersection); + sb.Append(BorderTemplate.LeftIntersection); for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) { int columnWidth = columnsWidths[columnIndex]; - sb.Append(new string(borderTemplate.Horizontal, columnWidth)); + sb.Append(new string(BorderTemplate.Horizontal, columnWidth)); char columnBorderRight = columnIndex < columnsWidths.Count - 1 - ? borderTemplate.MiddleIntersection - : borderTemplate.RightIntersection; + ? BorderTemplate.MiddleIntersection + : BorderTemplate.RightIntersection; sb.Append(columnBorderRight); } return sb.ToString(); } + + public static DataDataSeparator CreateFrom(DataGridBorder dataGridBorder) + { + return new DataDataSeparator + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridBorderX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridBorderX.cs new file mode 100644 index 00000000..3fa06ee0 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridBorderX.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; + +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel +{ + internal class DataGridBorderX + { + public bool IsVisible { get; set; } + + public BorderTemplate Template { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } + + public int TotalWidth { get; set; } + + public List ColumnWidths { get; set; } + + public void RenderRowLeftBorder(ITablePrinter tablePrinter) + { + if (IsVisible) + tablePrinter.Write(Template.Left, ForegroundColor, BackgroundColor); + } + + public void RenderRowRightBorder(ITablePrinter tablePrinter) + { + if (IsVisible) + tablePrinter.Write(Template.Right, ForegroundColor, BackgroundColor); + } + + public void RenderRowInsideBorder(ITablePrinter tablePrinter) + { + if (IsVisible) + tablePrinter.Write(Template.Vertical, ForegroundColor, BackgroundColor); + } + + public static DataGridBorderX CreateFrom(DataGridBorder dataGridBorder) + { + if (dataGridBorder == null) + return new DataGridBorderX(); + + return new DataGridBorderX + { + IsVisible = dataGridBorder.IsVisible, + Template = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs index 2247ef47..9cd4f7a3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs @@ -28,6 +28,7 @@ internal class DataGridX { private readonly bool displayBorder; + private DataGridBorderX dataGridBorderX; private TitleRowX titleRowX; private HeaderRowX headerRowX; private readonly List dataRowXs = new List(); @@ -54,6 +55,11 @@ public DataGridX(bool displayBorder) this.displayBorder = displayBorder; } + public void AddBorder(DataGridBorderX dataGridBorderX) + { + this.dataGridBorderX = dataGridBorderX; + } + public void AddTitleRow(TitleRowX titleRowX) { this.titleRowX = titleRowX; @@ -116,6 +122,9 @@ public void MakeFinalAdjustments() if (DataDataSeparator != null) DataDataSeparator.ColumnsWidths = columnsWidths; if (DataBottomBorder != null) DataBottomBorder.ColumnsWidths = columnsWidths; + + dataGridBorderX.TotalWidth = totalWidth; + dataGridBorderX.ColumnWidths = columnsWidths; } private int CalculateTotalWidth() diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index 8fb25e42..fe054106 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -30,6 +30,7 @@ internal class DataGridXBuilder private bool isTitleVisible; private bool isColumnHeaderRowVisible; private bool areDataRowsVisible; + private DataGridBorderX dataGridBorderX; public TitleRow TitleRow { get; set; } @@ -37,15 +38,13 @@ internal class DataGridXBuilder public DataRowList Rows { get; set; } - public BorderTemplate BorderTemplate { get; set; } - public bool DisplayBorder { get; set; } - public bool DisplayBorderBetweenRows { get; set; } + public DataGridBorder DataGridBorder { get; set; } public int MinWidth { get; set; } public DataGridX Build() { - dataGridX = new DataGridX(DisplayBorder) + dataGridX = new DataGridX(DataGridBorder?.IsVisible == true) { MinWidth = MinWidth }; @@ -54,6 +53,9 @@ public DataGridX Build() isColumnHeaderRowVisible = HeaderRow != null && HeaderRow.IsVisible && HeaderRow.CellCount > 0; areDataRowsVisible = Rows.Count > 0; + dataGridBorderX = DataGridBorderX.CreateFrom(DataGridBorder); + dataGridX.AddBorder(dataGridBorderX); + if (isTitleVisible) AddTitle(); @@ -63,7 +65,7 @@ public DataGridX Build() if (areDataRowsVisible) AddRows(); - if (DisplayBorder) + if (DataGridBorder?.IsVisible == true) AddHorizontalBorders(); dataGridX.MakeFinalAdjustments(); @@ -73,13 +75,13 @@ public DataGridX Build() private void AddTitle() { - TitleRowX titleRowX = new TitleRowX(TitleRow); + TitleRowX titleRowX = new TitleRowX(TitleRow, dataGridBorderX); dataGridX.AddTitleRow(titleRowX); } private void AddHeader() { - HeaderRowX headerRowX = new HeaderRowX(HeaderRow, DisplayBorder); + HeaderRowX headerRowX = new HeaderRowX(HeaderRow, dataGridBorderX); dataGridX.AddHeaderRow(headerRowX); } @@ -87,7 +89,7 @@ private void AddRows() { IEnumerable rows = Rows .Where(x => x.IsVisible) - .Select(x => new DataRowX(x, DisplayBorder)); + .Select(x => new DataRowX(x, dataGridBorderX)); foreach (DataRowX row in rows) dataGridX.AddDataRow(row); @@ -96,36 +98,36 @@ private void AddRows() private void AddHorizontalBorders() { if (isTitleVisible) - dataGridX.TitleTopBorder = new TitleTopBorder(BorderTemplate); + dataGridX.TitleTopBorder = TitleTopBorder.CreateFrom(DataGridBorder); else if (isColumnHeaderRowVisible) - dataGridX.HeaderTopBorder = new HeaderTopBorder(BorderTemplate); + dataGridX.HeaderTopBorder = HeaderTopBorder.CreateFrom(DataGridBorder); else if (areDataRowsVisible) - dataGridX.DataTopBorder = new DataTopBorder(BorderTemplate); + dataGridX.DataTopBorder = DataTopBorder.CreateFrom(DataGridBorder); if (isTitleVisible) { if (isColumnHeaderRowVisible) - dataGridX.TitleHeaderSeparator = new TitleHeaderSeparator(BorderTemplate); + dataGridX.TitleHeaderSeparator = TitleHeaderSeparator.CreateFrom(DataGridBorder); else if (areDataRowsVisible) - dataGridX.TitleDataSeparator = new TitleDataSeparator(BorderTemplate); + dataGridX.TitleDataSeparator = TitleDataSeparator.CreateFrom(DataGridBorder); else - dataGridX.TitleBottomBorder = new TitleBottomBorder(BorderTemplate); + dataGridX.TitleBottomBorder = TitleBottomBorder.CreateFrom(DataGridBorder); } if (isColumnHeaderRowVisible) { if (areDataRowsVisible) - dataGridX.HeaderDataSeparator = new HeaderDataSeparator(BorderTemplate); + dataGridX.HeaderDataSeparator = HeaderDataSeparator.CreateFrom(DataGridBorder); else - dataGridX.HeaderBottomBorder = new HeaderBottomBorder(BorderTemplate); + dataGridX.HeaderBottomBorder = HeaderBottomBorder.CreateFrom(DataGridBorder); } if (areDataRowsVisible) { - if (DisplayBorderBetweenRows) - dataGridX.DataDataSeparator = new DataDataSeparator(BorderTemplate); + if (DataGridBorder?.DisplayBorderBetweenRows == true) + dataGridX.DataDataSeparator = DataDataSeparator.CreateFrom(DataGridBorder); - dataGridX.DataBottomBorder = new DataBottomBorder(BorderTemplate); + dataGridX.DataBottomBorder = DataBottomBorder.CreateFrom(DataGridBorder); } } } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs index 734ea15e..0146b6b5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs @@ -27,16 +27,16 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataRowX { - private readonly bool hasBorder; private readonly DataRow dataRow; + private readonly DataGridBorderX dataGridBorderX; private readonly List cells = new List(); public Size Size { get; private set; } - public DataRowX(DataRow dataRow, bool hasBorder) + public DataRowX(DataRow dataRow, DataGridBorderX dataGridBorderX) { this.dataRow = dataRow ?? throw new ArgumentNullException(nameof(dataRow)); - this.hasBorder = hasBorder; + this.dataGridBorderX = dataGridBorderX ?? throw new ArgumentNullException(nameof(dataGridBorderX)); CreateCells(); } @@ -57,13 +57,13 @@ private void AddCellToSize(CellX cell) { int initialCount = cells.Count; - int width = initialCount == 0 && hasBorder + int width = initialCount == 0 && dataGridBorderX.IsVisible ? 1 : Size.Width; width += cell.Size.Width; - if (hasBorder) + if (dataGridBorderX.IsVisible) width++; int height = Size.Height < cell.Size.Height @@ -81,27 +81,21 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) cellX.Size = new Size(cellWidths[i], Size.Height); } - BorderTemplate borderTemplate = dataRow.ParentDataGrid?.BorderTemplate; - bool displayBorder = borderTemplate != null && dataRow.ParentDataGrid?.DisplayBorder == true; - for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) { - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Left); + dataGridBorderX.RenderRowLeftBorder(tablePrinter); for (int columnIndex = 0; columnIndex < cells.Count; columnIndex++) { CellX cellX = cells[columnIndex]; cellX.RenderNextLine(tablePrinter); - if (displayBorder) - { - char cellBorderRight = columnIndex < cells.Count - 1 - ? borderTemplate.Vertical - : borderTemplate.Right; + bool isLastCell = columnIndex >= cells.Count - 1; - tablePrinter.WriteBorder(cellBorderRight); - } + if (isLastCell) + dataGridBorderX.RenderRowRightBorder(tablePrinter); + else + dataGridBorderX.RenderRowInsideBorder(tablePrinter); } tablePrinter.WriteLine(); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs index 73929d46..31c54f3d 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs @@ -26,7 +26,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataTopBorder { - private readonly BorderTemplate borderTemplate; private string borderText; private List columnsWidths; @@ -43,17 +42,28 @@ public List ColumnsWidths } } - public DataTopBorder(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { if (borderText == null) - borderText = borderTemplate.GenerateTopBorder(columnsWidths); + borderText = BorderTemplate.GenerateTopBorder(columnsWidths); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); + } + + public static DataTopBorder CreateFrom(DataGridBorder dataGridBorder) + { + return new DataTopBorder + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs index acb285c3..b257585a 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs @@ -26,7 +26,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderBottomBorder { - private readonly BorderTemplate borderTemplate; private string borderText; private List columnsWidths; @@ -43,17 +42,28 @@ public List ColumnsWidths } } - public HeaderBottomBorder(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { if (borderText == null) - borderText = borderTemplate.GenerateBottomBorder(columnsWidths); + borderText = BorderTemplate.GenerateBottomBorder(columnsWidths); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); + } + + public static HeaderBottomBorder CreateFrom(DataGridBorder dataGridBorder) + { + return new HeaderBottomBorder + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs index e2ef1316..eb07bf27 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs @@ -27,7 +27,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderDataSeparator { - private readonly BorderTemplate borderTemplate; private string borderText; private List columnsWidths; @@ -44,38 +43,49 @@ public List ColumnsWidths } } - public HeaderDataSeparator(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { if (borderText == null) borderText = GenerateDataRowSeparatorBorder(); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } private string GenerateDataRowSeparatorBorder() { StringBuilder sb = new StringBuilder(); - sb.Append(borderTemplate.LeftIntersection); + sb.Append(BorderTemplate.LeftIntersection); for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) { int columnWidth = columnsWidths[columnIndex]; - sb.Append(new string(borderTemplate.Horizontal, columnWidth)); + sb.Append(new string(BorderTemplate.Horizontal, columnWidth)); char columnBorderRight = columnIndex < columnsWidths.Count - 1 - ? borderTemplate.MiddleIntersection - : borderTemplate.RightIntersection; + ? BorderTemplate.MiddleIntersection + : BorderTemplate.RightIntersection; sb.Append(columnBorderRight); } return sb.ToString(); } + + public static HeaderDataSeparator CreateFrom(DataGridBorder dataGridBorder) + { + return new HeaderDataSeparator + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs index 5f27f817..2f2fe40a 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs @@ -27,16 +27,16 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderRowX { - private readonly bool hasBorder; private readonly HeaderRow headerRow; private readonly List cells = new List(); + private readonly DataGridBorderX dataGridBorderX; public Size Size { get; private set; } - public HeaderRowX(HeaderRow headerRow, bool hasBorder) + public HeaderRowX(HeaderRow headerRow, DataGridBorderX dataGridBorderX) { this.headerRow = headerRow ?? throw new ArgumentNullException(nameof(headerRow)); - this.hasBorder = hasBorder; + this.dataGridBorderX = dataGridBorderX ?? throw new ArgumentNullException(nameof(dataGridBorderX)); CreateCells(); } @@ -57,13 +57,13 @@ private void AddCellToSize(CellX cell) { int initialCount = cells.Count; - int width = initialCount == 0 && hasBorder + int width = initialCount == 0 && dataGridBorderX.IsVisible ? 1 : Size.Width; width += cell.Size.Width; - if (hasBorder) + if (dataGridBorderX.IsVisible) width++; int height = Size.Height < cell.Size.Height @@ -81,27 +81,21 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) cellX.Size = new Size(cellWidths[i], Size.Height); } - BorderTemplate borderTemplate = headerRow.ParentDataGrid?.BorderTemplate; - bool displayBorder = borderTemplate != null && headerRow.ParentDataGrid?.DisplayBorder == true; - for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) { - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Left); + dataGridBorderX.RenderRowLeftBorder(tablePrinter); for (int columnIndex = 0; columnIndex < cells.Count; columnIndex++) { CellX cellX = cells[columnIndex]; cellX.RenderNextLine(tablePrinter); - if (displayBorder) - { - char cellBorderRight = columnIndex < cells.Count - 1 - ? borderTemplate.Vertical - : borderTemplate.Right; + bool isLastCell = columnIndex >= cells.Count - 1; - tablePrinter.WriteBorder(cellBorderRight); - } + if (isLastCell) + dataGridBorderX.RenderRowRightBorder(tablePrinter); + else + dataGridBorderX.RenderRowInsideBorder(tablePrinter); } tablePrinter.WriteLine(); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs index 2f9df721..80d95702 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs @@ -26,7 +26,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderTopBorder { - private readonly BorderTemplate borderTemplate; private string borderText; private List columnsWidths; @@ -43,17 +42,28 @@ public List ColumnsWidths } } - public HeaderTopBorder(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { if (borderText == null) - borderText = borderTemplate.GenerateTopBorder(columnsWidths); + borderText = BorderTemplate.GenerateTopBorder(columnsWidths); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); + } + + public static HeaderTopBorder CreateFrom(DataGridBorder dataGridBorder) + { + return new HeaderTopBorder + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs index c062c5e4..a426662d 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs @@ -25,7 +25,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleBottomBorder { - private readonly BorderTemplate borderTemplate; private string borderText; private int width; @@ -42,17 +41,28 @@ public int Width } } - public TitleBottomBorder(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { if (borderText == null) - borderText = borderTemplate.GenerateBottomBorder(width - 2); + borderText = BorderTemplate.GenerateBottomBorder(width - 2); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); + } + + public static TitleBottomBorder CreateFrom(DataGridBorder dataGridBorder) + { + return new TitleBottomBorder + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs index 0db42bc8..cf4ad583 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs @@ -27,7 +27,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleDataSeparator { - private readonly BorderTemplate borderTemplate; private string borderText; private List columnsWidths; @@ -44,10 +43,11 @@ public List ColumnsWidths } } - public TitleDataSeparator(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { @@ -60,7 +60,7 @@ public void Render(ITablePrinter tablePrinter) // borderText = borderTemplate.GenerateHorizontalSeparator(new[] { titleCellWidth }, columnsWidths); //} - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } /// @@ -71,21 +71,31 @@ private string GenerateTitleDataSeparator() { StringBuilder sb = new StringBuilder(); - sb.Append(borderTemplate.LeftIntersection); + sb.Append(BorderTemplate.LeftIntersection); for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) { int columnWidth = columnsWidths[columnIndex]; - sb.Append(new string(borderTemplate.Horizontal, columnWidth)); + sb.Append(new string(BorderTemplate.Horizontal, columnWidth)); char columnBorderRight = columnIndex < columnsWidths.Count - 1 - ? borderTemplate.TopIntersection - : borderTemplate.RightIntersection; + ? BorderTemplate.TopIntersection + : BorderTemplate.RightIntersection; sb.Append(columnBorderRight); } return sb.ToString(); } + + public static TitleDataSeparator CreateFrom(DataGridBorder dataGridBorder) + { + return new TitleDataSeparator + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs index ba29d593..896f9924 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs @@ -27,7 +27,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleHeaderSeparator { - private readonly BorderTemplate borderTemplate; private string borderText; private List columnsWidths; @@ -44,17 +43,18 @@ public List ColumnsWidths } } - public TitleHeaderSeparator(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { if (borderText == null) borderText = GenerateTitleHeaderSeparator(); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } /// @@ -65,21 +65,31 @@ private string GenerateTitleHeaderSeparator() { StringBuilder sb = new StringBuilder(); - sb.Append(borderTemplate.LeftIntersection); + sb.Append(BorderTemplate.LeftIntersection); for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) { int columnWidth = columnsWidths[columnIndex]; - sb.Append(new string(borderTemplate.Horizontal, columnWidth)); + sb.Append(new string(BorderTemplate.Horizontal, columnWidth)); char columnBorderRight = columnIndex < columnsWidths.Count - 1 - ? borderTemplate.TopIntersection - : borderTemplate.RightIntersection; + ? BorderTemplate.TopIntersection + : BorderTemplate.RightIntersection; sb.Append(columnBorderRight); } return sb.ToString(); } + + public static TitleHeaderSeparator CreateFrom(DataGridBorder dataGridBorder) + { + return new TitleHeaderSeparator + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs index bc88c6e8..c3a56e59 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs @@ -19,19 +19,21 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; + namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleRowX { - private readonly TitleRow titleRow; private readonly bool isVisible; private readonly CellX cellX; + private readonly DataGridBorderX dataGridBorderX; public Size Size { get; set; } - public TitleRowX(TitleRow titleRow) + public TitleRowX(TitleRow titleRow, DataGridBorderX dataGridBorderX) { - this.titleRow = titleRow; + this.dataGridBorderX = dataGridBorderX ?? throw new ArgumentNullException(nameof(dataGridBorderX)); isVisible = titleRow != null; Size = titleRow?.CalculatePreferredSize() ?? Size.Empty; @@ -43,10 +45,7 @@ public void Render(ITablePrinter tablePrinter) if (!isVisible) return; - BorderTemplate borderTemplate = titleRow?.ParentDataGrid?.BorderTemplate; - bool displayBorder = borderTemplate != null && titleRow?.ParentDataGrid?.DisplayBorder == true; - - Size cellSize = displayBorder + Size cellSize = dataGridBorderX.IsVisible ? Size.InflateWidth(-2) : Size; @@ -54,13 +53,9 @@ public void Render(ITablePrinter tablePrinter) for (int lineIndex = 0; lineIndex < cellSize.Height; lineIndex++) { - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Left); - + dataGridBorderX.RenderRowLeftBorder(tablePrinter); cellX.RenderNextLine(tablePrinter); - - if (displayBorder) - tablePrinter.WriteBorder(borderTemplate.Right); + dataGridBorderX.RenderRowRightBorder(tablePrinter); tablePrinter.WriteLine(); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs index cf9795a9..d22f9100 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs @@ -25,7 +25,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleTopBorder { - private readonly BorderTemplate borderTemplate; private string borderText; private int width; @@ -42,17 +41,28 @@ public int Width } } - public TitleTopBorder(BorderTemplate borderTemplate) - { - this.borderTemplate = borderTemplate ?? throw new ArgumentNullException(nameof(borderTemplate)); - } + public BorderTemplate BorderTemplate { get; set; } + + public ConsoleColor? ForegroundColor { get; set; } + + public ConsoleColor? BackgroundColor { get; set; } public void Render(ITablePrinter tablePrinter) { if (borderText == null) - borderText = borderTemplate.GenerateTopBorder(width - 2); + borderText = BorderTemplate.GenerateTopBorder(width - 2); - tablePrinter.WriteLineBorder(borderText); + tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); + } + + public static TitleTopBorder CreateFrom(DataGridBorder dataGridBorder) + { + return new TitleTopBorder + { + BorderTemplate = dataGridBorder.Template, + ForegroundColor = dataGridBorder.CalculateForegroundColor(), + BackgroundColor = dataGridBorder.CalculateBackgroundColor() + }; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs index b5375ed8..5955b0bb 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs @@ -28,7 +28,7 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables public abstract class RowBase : IEnumerable { /// - /// Gets or sets the instance that contains the current instance. + /// Gets or sets the instance that contains the current instance. /// public DataGrid ParentDataGrid { get; internal set; } @@ -45,7 +45,7 @@ public abstract class RowBase : IEnumerable public ConsoleColor? BackgroundColor { get; set; } /// - /// Gets or sets the horizontal alignment for the content of the cells contained by the current instance of the . + /// Gets or sets the horizontal alignment for the content of the cells contained by the current instance. /// public HorizontalAlignment CellHorizontalAlignment { get; set; } = HorizontalAlignment.Default; diff --git a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs index 4b3ff221..59d3878a 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.TabularData/Commands/ColorsCommand.cs @@ -22,9 +22,10 @@ private static void DisplayUncoloredTable() dataGrid.Title = "Table without colors"; - dataGrid.DisplayBorderBetweenRows = true; + dataGrid.Border.Template = BorderTemplate.SingleLineBorderTemplate; + dataGrid.Border.DisplayBorderBetweenRows = true; + dataGrid.HeaderRow.IsVisible = true; - dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; dataGrid.Display(); } @@ -33,16 +34,17 @@ private static void DisplayColoredTable() { DataGrid dataGrid = CreateTable(); - dataGrid.Title = "Different foreground colors for border, title and column headers"; - dataGrid.ForegroundColor = ConsoleColor.Blue; - dataGrid.BorderColor = ConsoleColor.DarkBlue; + + dataGrid.Title = "Different foreground colors for border, title and column headers"; dataGrid.TitleRow.ForegroundColor = ConsoleColor.Yellow; - dataGrid.HeaderRow.ForegroundColor = ConsoleColor.DarkYellow; - dataGrid.DisplayBorderBetweenRows = true; + dataGrid.Border.ForegroundColor = ConsoleColor.DarkBlue; + dataGrid.Border.Template = BorderTemplate.SingleLineBorderTemplate; + dataGrid.Border.DisplayBorderBetweenRows = true; + + dataGrid.HeaderRow.ForegroundColor = ConsoleColor.DarkYellow; dataGrid.HeaderRow.IsVisible = true; - dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; dataGrid.Display(); } @@ -51,18 +53,18 @@ private static void DisplayBackgroundColoredTable() { DataGrid dataGrid = CreateTable(); - dataGrid.Title = "Custom global background color"; - dataGrid.ForegroundColor = ConsoleColor.Blue; - dataGrid.BorderColor = ConsoleColor.DarkBlue; - dataGrid.TitleRow.ForegroundColor = ConsoleColor.Yellow; - dataGrid.HeaderRow.ForegroundColor = ConsoleColor.DarkYellow; - dataGrid.BackgroundColor = ConsoleColor.Gray; - dataGrid.DisplayBorderBetweenRows = true; + dataGrid.Title = "Custom global background color"; + dataGrid.TitleRow.ForegroundColor = ConsoleColor.Yellow; + + dataGrid.Border.ForegroundColor = ConsoleColor.DarkBlue; + dataGrid.Border.Template = BorderTemplate.SingleLineBorderTemplate; + dataGrid.Border.DisplayBorderBetweenRows = true; + + dataGrid.HeaderRow.ForegroundColor = ConsoleColor.DarkYellow; dataGrid.HeaderRow.IsVisible = true; - dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; dataGrid.Display(); } @@ -71,22 +73,22 @@ private static void DisplayBackgroundColoredTable2() { DataGrid dataGrid = CreateTable(); - dataGrid.Title = "Different background colors for border, title and column headers"; - dataGrid.ForegroundColor = ConsoleColor.Blue; - dataGrid.BorderColor = ConsoleColor.DarkBlue; - dataGrid.TitleRow.ForegroundColor = ConsoleColor.Yellow; - dataGrid.HeaderRow.ForegroundColor = ConsoleColor.DarkYellow; - dataGrid.BackgroundColor = ConsoleColor.Gray; - dataGrid.BorderBackgroundColor = ConsoleColor.White; + + dataGrid.Title = "Different background colors for border, title and column headers"; + dataGrid.TitleRow.ForegroundColor = ConsoleColor.Yellow; dataGrid.TitleRow.BackgroundColor = ConsoleColor.DarkYellow; - dataGrid.HeaderRow.BackgroundColor = ConsoleColor.Yellow; - dataGrid.DisplayBorderBetweenRows = true; + dataGrid.Border.Template = BorderTemplate.SingleLineBorderTemplate; + dataGrid.Border.ForegroundColor = ConsoleColor.DarkBlue; + dataGrid.Border.BackgroundColor = ConsoleColor.White; + dataGrid.Border.DisplayBorderBetweenRows = true; + + dataGrid.HeaderRow.ForegroundColor = ConsoleColor.DarkYellow; + dataGrid.HeaderRow.BackgroundColor = ConsoleColor.Yellow; dataGrid.HeaderRow.IsVisible = true; - dataGrid.BorderTemplate = BorderTemplate.SingleLineBorderTemplate; - + dataGrid.Display(); } From c99473f62241c150c5de44835f79b0f062977a03 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 13 Dec 2020 20:29:25 +0200 Subject: [PATCH 42/57] added ColumnX class and rethought the layout mechanism. --- .../RenderingModel/CellX.cs | 42 +++++- .../RenderingModel/ColumnX.cs | 28 ++++ .../RenderingModel/DataBottomBorder.cs | 24 ++-- .../RenderingModel/DataDataSeparator.cs | 26 +--- .../RenderingModel/DataGridBorderX.cs | 18 +-- .../RenderingModel/DataGridX.cs | 122 ++++++------------ .../RenderingModel/DataGridXBuilder.cs | 17 +-- .../RenderingModel/DataRowX.cs | 105 ++++++++------- .../RenderingModel/DataTopBorder.cs | 25 ++-- .../RenderingModel/HeaderBottomBorder.cs | 24 ++-- .../RenderingModel/HeaderDataSeparator.cs | 26 +--- .../RenderingModel/HeaderRowX.cs | 111 ++++++++-------- .../RenderingModel/HeaderTopBorder.cs | 25 ++-- .../RenderingModel/TitleBottomBorder.cs | 18 +-- .../RenderingModel/TitleDataSeparator.cs | 33 +---- .../RenderingModel/TitleHeaderSeparator.cs | 27 +--- .../RenderingModel/TitleRowX.cs | 61 +++++---- .../RenderingModel/TitleTopBorder.cs | 24 +--- .../ConsoleTools.Controls.Tables/TitleRow.cs | 21 --- .../Tables/CellXTests/RenderTextTests.cs | 28 ++-- 20 files changed, 344 insertions(+), 461 deletions(-) create mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/ColumnX.cs diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs index d256b0a8..d7dfcad3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs @@ -33,7 +33,7 @@ internal class CellX public Size Size { get; set; } public ConsoleColor? ForegroundColor { get; set; } - + public ConsoleColor? BackgroundColor { get; set; } public int PaddingLeft { get; set; } @@ -41,11 +41,37 @@ internal class CellX public int PaddingRight { get; set; } public HorizontalAlignment HorizontalAlignment { get; set; } - - public void RenderNextLine(ITablePrinter tablePrinter) + + public void CalculateLayout() + { + Size = CalculatePreferredSize(); + } + + private Size CalculatePreferredSize() { - if(lineEnumerator == null) - lineEnumerator = RenderContent(Size).GetEnumerator(); + int cellWidth; + int cellHeight; + + bool isEmpty = Content == null || Content.IsEmpty; + + if (isEmpty) + { + cellWidth = PaddingLeft + PaddingRight; + cellHeight = 0; + } + else + { + cellWidth = PaddingLeft + Content.Size.Width + PaddingRight; + cellHeight = Content.Size.Height; + } + + return new Size(cellWidth, cellHeight); + } + + public void RenderNextLine(ITablePrinter tablePrinter, Size actualSize) + { + if (lineEnumerator == null) + lineEnumerator = RenderContent(actualSize).GetEnumerator(); string content = lineEnumerator.MoveNext() ? lineEnumerator.Current @@ -86,7 +112,7 @@ private string RenderLine(int lineIndex, int width) public static CellX CreateFrom(CellBase cellBase) { - return new CellX + CellX cellX = new CellX { ForegroundColor = cellBase.CalculateForegroundColor(), BackgroundColor = cellBase.CalculateBackgroundColor(), @@ -96,6 +122,10 @@ public static CellX CreateFrom(CellBase cellBase) Size = cellBase.CalculatePreferredSize(), Content = cellBase.Content }; + + cellX.CalculateLayout(); + + return cellX; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/ColumnX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/ColumnX.cs new file mode 100644 index 00000000..50897ee2 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/ColumnX.cs @@ -0,0 +1,28 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + +namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel +{ + internal class ColumnX + { + public int Width { get; set; } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs index 4dd00bea..a5f8cdf7 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataBottomBorder.cs @@ -21,26 +21,13 @@ using System; using System.Collections.Generic; +using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataBottomBorder { private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get => columnsWidths; - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -48,10 +35,15 @@ public List ColumnsWidths public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = BorderTemplate.GenerateBottomBorder(columnsWidths); + { + List columnWidths = columns + .Select(x => x.Width) + .ToList(); + + borderText = BorderTemplate.GenerateBottomBorder(columnWidths);} tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs index ee0a2064..0cb728ae 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs @@ -28,20 +28,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel internal class DataDataSeparator { private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get => columnsWidths; - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -49,26 +35,26 @@ public List ColumnsWidths public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = GenerateDataRowSeparatorBorder(); + borderText = GenerateDataRowSeparatorBorder(columns); tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } - private string GenerateDataRowSeparatorBorder() + private string GenerateDataRowSeparatorBorder(List columns) { StringBuilder sb = new StringBuilder(); sb.Append(BorderTemplate.LeftIntersection); - for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) + for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) { - int columnWidth = columnsWidths[columnIndex]; + int columnWidth = columns[columnIndex].Width; sb.Append(new string(BorderTemplate.Horizontal, columnWidth)); - char columnBorderRight = columnIndex < columnsWidths.Count - 1 + char columnBorderRight = columnIndex < columns.Count - 1 ? BorderTemplate.MiddleIntersection : BorderTemplate.RightIntersection; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridBorderX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridBorderX.cs index 3fa06ee0..680f4894 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridBorderX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridBorderX.cs @@ -5,34 +5,29 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataGridBorderX { - public bool IsVisible { get; set; } - public BorderTemplate Template { get; set; } public ConsoleColor? ForegroundColor { get; set; } public ConsoleColor? BackgroundColor { get; set; } - + public int TotalWidth { get; set; } - - public List ColumnWidths { get; set; } + + public List ColumnWidths { get; set; } public void RenderRowLeftBorder(ITablePrinter tablePrinter) { - if (IsVisible) - tablePrinter.Write(Template.Left, ForegroundColor, BackgroundColor); + tablePrinter.Write(Template.Left, ForegroundColor, BackgroundColor); } public void RenderRowRightBorder(ITablePrinter tablePrinter) { - if (IsVisible) - tablePrinter.Write(Template.Right, ForegroundColor, BackgroundColor); + tablePrinter.Write(Template.Right, ForegroundColor, BackgroundColor); } public void RenderRowInsideBorder(ITablePrinter tablePrinter) { - if (IsVisible) - tablePrinter.Write(Template.Vertical, ForegroundColor, BackgroundColor); + tablePrinter.Write(Template.Vertical, ForegroundColor, BackgroundColor); } public static DataGridBorderX CreateFrom(DataGridBorder dataGridBorder) @@ -42,7 +37,6 @@ public static DataGridBorderX CreateFrom(DataGridBorder dataGridBorder) return new DataGridBorderX { - IsVisible = dataGridBorder.IsVisible, Template = dataGridBorder.Template, ForegroundColor = dataGridBorder.CalculateForegroundColor(), BackgroundColor = dataGridBorder.CalculateBackgroundColor() diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs index 9cd4f7a3..40c4ab3e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs @@ -28,13 +28,11 @@ internal class DataGridX { private readonly bool displayBorder; - private DataGridBorderX dataGridBorderX; private TitleRowX titleRowX; private HeaderRowX headerRowX; - private readonly List dataRowXs = new List(); - private readonly List columnsWidths = new List(); - - public int MinWidth { get; set; } + private readonly List dataRows = new List(); + private readonly List columns = new List(); + private int actualWidth; public TitleTopBorder TitleTopBorder { get; set; } public HeaderTopBorder HeaderTopBorder { get; set; } @@ -55,11 +53,6 @@ public DataGridX(bool displayBorder) this.displayBorder = displayBorder; } - public void AddBorder(DataGridBorderX dataGridBorderX) - { - this.dataGridBorderX = dataGridBorderX; - } - public void AddTitleRow(TitleRowX titleRowX) { this.titleRowX = titleRowX; @@ -68,87 +61,44 @@ public void AddTitleRow(TitleRowX titleRowX) public void AddHeaderRow(HeaderRowX headerRowX) { this.headerRowX = headerRowX; - headerRowX.UpdateColumnsWidths(columnsWidths); + headerRowX.UpdateColumnsWidths(columns); } public void AddDataRow(DataRowX dataRowX) { - dataRowX.UpdateColumnsWidths(columnsWidths); - dataRowXs.Add(dataRowX); - } - - public void Clear() - { - titleRowX = null; - headerRowX = null; - dataRowXs.Clear(); - columnsWidths.Clear(); - - MinWidth = 0; - - TitleTopBorder = null; - HeaderTopBorder = null; - DataTopBorder = null; - - TitleHeaderSeparator = null; - TitleDataSeparator = null; - TitleBottomBorder = null; - - HeaderDataSeparator = null; - HeaderBottomBorder = null; - - DataDataSeparator = null; - DataBottomBorder = null; + dataRowX.UpdateColumnsWidths(columns); + dataRows.Add(dataRowX); } - public void MakeFinalAdjustments() + public void CalculateLayout(int minWidth) { - int totalWidth = CalculateTotalWidth(); - - if (titleRowX?.Size.Width < totalWidth) - titleRowX.Size = new Size(totalWidth, titleRowX.Size.Height); - - if (TitleTopBorder != null) TitleTopBorder.Width = totalWidth; - - if (HeaderTopBorder != null) HeaderTopBorder.ColumnsWidths = columnsWidths; - if (DataTopBorder != null) DataTopBorder.ColumnsWidths = columnsWidths; - - if (TitleHeaderSeparator != null) TitleHeaderSeparator.ColumnsWidths = columnsWidths; - if (TitleDataSeparator != null) TitleDataSeparator.ColumnsWidths = columnsWidths; - if (TitleBottomBorder != null) TitleBottomBorder.Width = totalWidth; - - if (HeaderDataSeparator != null) HeaderDataSeparator.ColumnsWidths = columnsWidths; - if (HeaderBottomBorder != null) HeaderBottomBorder.ColumnsWidths = columnsWidths; - - if (DataDataSeparator != null) DataDataSeparator.ColumnsWidths = columnsWidths; - if (DataBottomBorder != null) DataBottomBorder.ColumnsWidths = columnsWidths; - - dataGridBorderX.TotalWidth = totalWidth; - dataGridBorderX.ColumnWidths = columnsWidths; + actualWidth = CalculateTotalWidth(minWidth); } - private int CalculateTotalWidth() + private int CalculateTotalWidth(int minWidth) { - int totalWidth = MinWidth; + int totalWidth = minWidth; if (titleRowX?.Size.Width > totalWidth) totalWidth = titleRowX.Size.Width; - if (columnsWidths.Count <= 0) + if (columns.Count <= 0) return totalWidth; - int columnsTotalWidth = columnsWidths.Sum(); + int columnsTotalWidth = columns + .Select(x => x.Width) + .Sum(); if (displayBorder) - columnsTotalWidth += columnsWidths.Count + 1; + columnsTotalWidth += columns.Count + 1; if (columnsTotalWidth < totalWidth) { int diff = totalWidth - columnsTotalWidth; - int colCount = columnsWidths.Count; + int colCount = columns.Count; for (int i = 0; i < diff; i++) - columnsWidths[i % colCount]++; + columns[i % colCount].Width++; } else if (columnsTotalWidth > totalWidth) { @@ -167,47 +117,49 @@ public void Render(ITablePrinter tablePrinter) private void RenderTitle(ITablePrinter tablePrinter) { - TitleTopBorder?.Render(tablePrinter); + TitleTopBorder?.Render(tablePrinter, actualWidth); - titleRowX?.Render(tablePrinter); + if (titleRowX != null) + { + Size rowSize = new Size(actualWidth, titleRowX.Size.Height); + titleRowX?.Render(tablePrinter, rowSize); + } - TitleHeaderSeparator?.Render(tablePrinter); - TitleDataSeparator?.Render(tablePrinter); - TitleBottomBorder?.Render(tablePrinter); + TitleHeaderSeparator?.Render(tablePrinter, columns); + TitleDataSeparator?.Render(tablePrinter, columns); + TitleBottomBorder?.Render(tablePrinter, actualWidth); } private void RenderHeader(ITablePrinter tablePrinter) { - HeaderTopBorder?.Render(tablePrinter); + HeaderTopBorder?.Render(tablePrinter, columns); - headerRowX?.Render(tablePrinter, columnsWidths); + headerRowX?.Render(tablePrinter, columns); - HeaderDataSeparator?.Render(tablePrinter); - HeaderBottomBorder?.Render(tablePrinter); + HeaderDataSeparator?.Render(tablePrinter, columns); + HeaderBottomBorder?.Render(tablePrinter, columns); } private void RenderData(ITablePrinter tablePrinter) { - DataTopBorder?.Render(tablePrinter); + DataTopBorder?.Render(tablePrinter, columns); RenderDataRows(tablePrinter); - DataBottomBorder?.Render(tablePrinter); + DataBottomBorder?.Render(tablePrinter, columns); } private void RenderDataRows(ITablePrinter tablePrinter) { - List cellWidths = columnsWidths; - - for (int rowIndex = 0; rowIndex < dataRowXs.Count; rowIndex++) + for (int rowIndex = 0; rowIndex < dataRows.Count; rowIndex++) { - DataRowX row = dataRowXs[rowIndex]; - row.Render(tablePrinter, cellWidths); + DataRowX row = dataRows[rowIndex]; + row.Render(tablePrinter, columns); - bool isLastRow = rowIndex == dataRowXs.Count - 1; + bool isLastRow = rowIndex == dataRows.Count - 1; if (!isLastRow) - DataDataSeparator?.Render(tablePrinter); + DataDataSeparator?.Render(tablePrinter, columns); } } } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index fe054106..10e6e25d 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -30,7 +30,6 @@ internal class DataGridXBuilder private bool isTitleVisible; private bool isColumnHeaderRowVisible; private bool areDataRowsVisible; - private DataGridBorderX dataGridBorderX; public TitleRow TitleRow { get; set; } @@ -44,18 +43,12 @@ internal class DataGridXBuilder public DataGridX Build() { - dataGridX = new DataGridX(DataGridBorder?.IsVisible == true) - { - MinWidth = MinWidth - }; + dataGridX = new DataGridX(DataGridBorder?.IsVisible == true); isTitleVisible = TitleRow != null && TitleRow.IsVisible && TitleRow.HasContent; isColumnHeaderRowVisible = HeaderRow != null && HeaderRow.IsVisible && HeaderRow.CellCount > 0; areDataRowsVisible = Rows.Count > 0; - dataGridBorderX = DataGridBorderX.CreateFrom(DataGridBorder); - dataGridX.AddBorder(dataGridBorderX); - if (isTitleVisible) AddTitle(); @@ -68,20 +61,20 @@ public DataGridX Build() if (DataGridBorder?.IsVisible == true) AddHorizontalBorders(); - dataGridX.MakeFinalAdjustments(); + dataGridX.CalculateLayout(MinWidth); return dataGridX; } private void AddTitle() { - TitleRowX titleRowX = new TitleRowX(TitleRow, dataGridBorderX); + TitleRowX titleRowX = TitleRowX.CreateFrom(TitleRow); dataGridX.AddTitleRow(titleRowX); } private void AddHeader() { - HeaderRowX headerRowX = new HeaderRowX(HeaderRow, dataGridBorderX); + HeaderRowX headerRowX = HeaderRowX.CreateFrom(HeaderRow); dataGridX.AddHeaderRow(headerRowX); } @@ -89,7 +82,7 @@ private void AddRows() { IEnumerable rows = Rows .Where(x => x.IsVisible) - .Select(x => new DataRowX(x, dataGridBorderX)); + .Select(DataRowX.CreateFrom); foreach (DataRowX row in rows) dataGridX.AddDataRow(row); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs index 0146b6b5..f05bab1e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs @@ -27,93 +27,98 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataRowX { - private readonly DataRow dataRow; - private readonly DataGridBorderX dataGridBorderX; - private readonly List cells = new List(); - public Size Size { get; private set; } - public DataRowX(DataRow dataRow, DataGridBorderX dataGridBorderX) - { - this.dataRow = dataRow ?? throw new ArgumentNullException(nameof(dataRow)); - this.dataGridBorderX = dataGridBorderX ?? throw new ArgumentNullException(nameof(dataGridBorderX)); + public DataGridBorderX DataGridBorderX { get; set; } - CreateCells(); - } + public List Cells { get; set; } = new List(); - private void CreateCells() + public void CalculateLayout() { - IEnumerable dataCellXes = dataRow - .Select(CellX.CreateFrom); - - foreach (CellX dataCellX in dataCellXes) - { - AddCellToSize(dataCellX); - cells.Add(dataCellX); - } + Size = CalculatePreferredSize(); } - private void AddCellToSize(CellX cell) + private Size CalculatePreferredSize() { - int initialCount = cells.Count; - - int width = initialCount == 0 && dataGridBorderX.IsVisible - ? 1 - : Size.Width; - - width += cell.Size.Width; + int width = 0; + int height = 0; - if (dataGridBorderX.IsVisible) - width++; + if (Cells != null) + { + foreach (CellX cell in Cells) + { + width += cell.Size.Width; + height = Math.Max(height, cell.Size.Height); + } + } - int height = Size.Height < cell.Size.Height - ? cell.Size.Height - : Size.Height; + if (DataGridBorderX != null) + width += Cells?.Count ?? 0 + 1; - Size = new Size(width, height); + return new Size(width, height); } - public void Render(ITablePrinter tablePrinter, List cellWidths) + public void Render(ITablePrinter tablePrinter, List cellWidths) { - for (int i = 0; i < cells.Count; i++) + for (int i = 0; i < Cells.Count; i++) { - CellX cellX = cells[i]; - cellX.Size = new Size(cellWidths[i], Size.Height); + CellX cellX = Cells[i]; + cellX.Size = new Size(cellWidths[i].Width, Size.Height); } for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) { - dataGridBorderX.RenderRowLeftBorder(tablePrinter); + DataGridBorderX.RenderRowLeftBorder(tablePrinter); - for (int columnIndex = 0; columnIndex < cells.Count; columnIndex++) + for (int columnIndex = 0; columnIndex < Cells.Count; columnIndex++) { - CellX cellX = cells[columnIndex]; - cellX.RenderNextLine(tablePrinter); + CellX cellX = Cells[columnIndex]; + Size cellSize = new Size(cellWidths[columnIndex].Width, Size.Height); + cellX.RenderNextLine(tablePrinter, cellSize); - bool isLastCell = columnIndex >= cells.Count - 1; + bool isLastCell = columnIndex >= Cells.Count - 1; if (isLastCell) - dataGridBorderX.RenderRowRightBorder(tablePrinter); + DataGridBorderX.RenderRowRightBorder(tablePrinter); else - dataGridBorderX.RenderRowInsideBorder(tablePrinter); + DataGridBorderX.RenderRowInsideBorder(tablePrinter); } tablePrinter.WriteLine(); } } - public void UpdateColumnsWidths(List columnsWidths) + public void UpdateColumnsWidths(List columnsWidths) { - for (int i = 0; i < cells.Count; i++) + for (int i = 0; i < Cells.Count; i++) { while (columnsWidths.Count <= i) - columnsWidths.Add(0); + columnsWidths.Add(new ColumnX()); - Size cellSize = cells[i].Size; + Size cellSize = Cells[i].Size; - if (cellSize.Width > columnsWidths[i]) - columnsWidths[i] = cellSize.Width; + if (cellSize.Width > columnsWidths[i].Width) + columnsWidths[i].Width = cellSize.Width; } } + + public static DataRowX CreateFrom(DataRow dataRow) + { + if (dataRow == null) throw new ArgumentNullException(nameof(dataRow)); + + DataRowX dataRowX = new DataRowX + { + DataGridBorderX = dataRow.ParentDataGrid?.Border != null + ? DataGridBorderX.CreateFrom(dataRow.ParentDataGrid.Border) + : null, + Cells = dataRow + .Select(CellX.CreateFrom) + .ToList() + }; + + dataRowX.CalculateLayout(); + + return dataRowX; + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs index 31c54f3d..efce3387 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataTopBorder.cs @@ -21,26 +21,13 @@ using System; using System.Collections.Generic; +using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class DataTopBorder { private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get => columnsWidths; - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -48,10 +35,16 @@ public List ColumnsWidths public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = BorderTemplate.GenerateTopBorder(columnsWidths); + { + List columnWidths = columns + .Select(x => x.Width) + .ToList(); + + borderText = BorderTemplate.GenerateTopBorder(columnWidths); + } tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs index b257585a..b174f614 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderBottomBorder.cs @@ -21,26 +21,13 @@ using System; using System.Collections.Generic; +using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderBottomBorder { private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get => columnsWidths; - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -48,10 +35,15 @@ public List ColumnsWidths public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = BorderTemplate.GenerateBottomBorder(columnsWidths); + { + List columnWidths = columns + .Select(x => x.Width) + .ToList(); + + borderText = BorderTemplate.GenerateBottomBorder(columnWidths);} tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs index eb07bf27..9791eede 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs @@ -28,20 +28,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel internal class HeaderDataSeparator { private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get => columnsWidths; - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -49,26 +35,26 @@ public List ColumnsWidths public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = GenerateDataRowSeparatorBorder(); + borderText = GenerateDataRowSeparatorBorder(columns); tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } - private string GenerateDataRowSeparatorBorder() + private string GenerateDataRowSeparatorBorder(List columns) { StringBuilder sb = new StringBuilder(); sb.Append(BorderTemplate.LeftIntersection); - for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) + for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) { - int columnWidth = columnsWidths[columnIndex]; + int columnWidth = columns[columnIndex].Width; sb.Append(new string(BorderTemplate.Horizontal, columnWidth)); - char columnBorderRight = columnIndex < columnsWidths.Count - 1 + char columnBorderRight = columnIndex < columns.Count - 1 ? BorderTemplate.MiddleIntersection : BorderTemplate.RightIntersection; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs index 2f2fe40a..b7970c37 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs @@ -27,93 +27,98 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderRowX { - private readonly HeaderRow headerRow; - private readonly List cells = new List(); - private readonly DataGridBorderX dataGridBorderX; - public Size Size { get; private set; } - public HeaderRowX(HeaderRow headerRow, DataGridBorderX dataGridBorderX) - { - this.headerRow = headerRow ?? throw new ArgumentNullException(nameof(headerRow)); - this.dataGridBorderX = dataGridBorderX ?? throw new ArgumentNullException(nameof(dataGridBorderX)); + public DataGridBorderX DataGridBorderX { get; set; } - CreateCells(); - } + public List Cells { get; set; } - private void CreateCells() + public void CalculateLayout() { - IEnumerable dataCellXes = headerRow - .Select(CellX.CreateFrom); - - foreach (CellX dataCellX in dataCellXes) - { - AddCellToSize(dataCellX); - cells.Add(dataCellX); - } + Size = CalculatePreferredSize(); } - private void AddCellToSize(CellX cell) + private Size CalculatePreferredSize() { - int initialCount = cells.Count; + int width = 0; + int height = 0; - int width = initialCount == 0 && dataGridBorderX.IsVisible - ? 1 - : Size.Width; - - width += cell.Size.Width; - - if (dataGridBorderX.IsVisible) - width++; + if (Cells != null) + { + foreach (CellX cell in Cells) + { + width += cell.Size.Width; + height = Math.Max(height, cell.Size.Height); + } + } - int height = Size.Height < cell.Size.Height - ? cell.Size.Height - : Size.Height; + if (DataGridBorderX != null) + width += Cells?.Count ?? 0 + 1; - Size = new Size(width, height); + return new Size(width, height); } - - public void Render(ITablePrinter tablePrinter, List cellWidths) + + public void Render(ITablePrinter tablePrinter, List cellWidths) { - for (int i = 0; i < cells.Count; i++) - { - CellX cellX = cells[i]; - cellX.Size = new Size(cellWidths[i], Size.Height); - } + //for (int i = 0; i < Cells.Count; i++) + //{ + // CellX cellX = Cells[i]; + // cellX.Size = new Size(cellWidths[i].Width, Size.Height); + //} for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) { - dataGridBorderX.RenderRowLeftBorder(tablePrinter); + DataGridBorderX.RenderRowLeftBorder(tablePrinter); - for (int columnIndex = 0; columnIndex < cells.Count; columnIndex++) + for (int columnIndex = 0; columnIndex < Cells.Count; columnIndex++) { - CellX cellX = cells[columnIndex]; - cellX.RenderNextLine(tablePrinter); + CellX cellX = Cells[columnIndex]; + Size cellSize = new Size(cellWidths[columnIndex].Width, Size.Height); + cellX.RenderNextLine(tablePrinter, cellSize); - bool isLastCell = columnIndex >= cells.Count - 1; + bool isLastCell = columnIndex >= Cells.Count - 1; if (isLastCell) - dataGridBorderX.RenderRowRightBorder(tablePrinter); + DataGridBorderX.RenderRowRightBorder(tablePrinter); else - dataGridBorderX.RenderRowInsideBorder(tablePrinter); + DataGridBorderX.RenderRowInsideBorder(tablePrinter); } tablePrinter.WriteLine(); } } - public void UpdateColumnsWidths(List columnsWidths) + public void UpdateColumnsWidths(List columnsWidths) { - for (int i = 0; i < cells.Count; i++) + for (int i = 0; i < Cells.Count; i++) { while (columnsWidths.Count <= i) - columnsWidths.Add(0); + columnsWidths.Add(new ColumnX()); - Size cellSize = cells[i].Size; + Size cellSize = Cells[i].Size; - if (cellSize.Width > columnsWidths[i]) - columnsWidths[i] = cellSize.Width; + if (cellSize.Width > columnsWidths[i].Width) + columnsWidths[i].Width = cellSize.Width; } } + + public static HeaderRowX CreateFrom(HeaderRow headerRow) + { + if (headerRow == null) throw new ArgumentNullException(nameof(headerRow)); + + HeaderRowX headerRowX = new HeaderRowX + { + DataGridBorderX = headerRow.ParentDataGrid?.Border != null + ? DataGridBorderX.CreateFrom(headerRow.ParentDataGrid.Border) + : null, + Cells = headerRow + .Select(CellX.CreateFrom) + .ToList() + }; + + headerRowX.CalculateLayout(); + + return headerRowX; + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs index 80d95702..d32b1444 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderTopBorder.cs @@ -21,26 +21,13 @@ using System; using System.Collections.Generic; +using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class HeaderTopBorder { private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get => columnsWidths; - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -48,10 +35,16 @@ public List ColumnsWidths public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = BorderTemplate.GenerateTopBorder(columnsWidths); + { + List columnWidths = columns + .Select(x => x.Width) + .ToList(); + + borderText = BorderTemplate.GenerateTopBorder(columnWidths); + } tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs index a426662d..750ec0e4 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleBottomBorder.cs @@ -26,20 +26,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel internal class TitleBottomBorder { private string borderText; - private int width; - - public int Width - { - get => width; - set - { - if (value == width) - return; - - width = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -47,10 +33,10 @@ public int Width public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, int actualWidth) { if (borderText == null) - borderText = BorderTemplate.GenerateBottomBorder(width - 2); + borderText = BorderTemplate.GenerateBottomBorder(actualWidth - 2); tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs index cf4ad583..f3d12a57 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleDataSeparator.cs @@ -28,20 +28,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel internal class TitleDataSeparator { private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get => columnsWidths; - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -49,16 +35,10 @@ public List ColumnsWidths public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = GenerateTitleDataSeparator(); - - //if (borderText == null) - //{ - // int titleCellWidth = columnsWidths.Sum() + columnsWidths.Count - 1; - // borderText = borderTemplate.GenerateHorizontalSeparator(new[] { titleCellWidth }, columnsWidths); - //} + borderText = GenerateTitleDataSeparator(columns); tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } @@ -67,18 +47,19 @@ public void Render(ITablePrinter tablePrinter) /// Generates the border displayed between title and the first data row. /// This border is used only when title is visible, column header row is hidden and there is at least one row of data. /// - private string GenerateTitleDataSeparator() + /// + private string GenerateTitleDataSeparator(List columns) { StringBuilder sb = new StringBuilder(); sb.Append(BorderTemplate.LeftIntersection); - for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) + for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) { - int columnWidth = columnsWidths[columnIndex]; + int columnWidth = columns[columnIndex].Width; sb.Append(new string(BorderTemplate.Horizontal, columnWidth)); - char columnBorderRight = columnIndex < columnsWidths.Count - 1 + char columnBorderRight = columnIndex < columns.Count - 1 ? BorderTemplate.TopIntersection : BorderTemplate.RightIntersection; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs index 896f9924..48b340f5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleHeaderSeparator.cs @@ -28,20 +28,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel internal class TitleHeaderSeparator { private string borderText; - private List columnsWidths; - - public List ColumnsWidths - { - get => columnsWidths; - set - { - if (value == columnsWidths) - return; - - columnsWidths = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -49,10 +35,10 @@ public List ColumnsWidths public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = GenerateTitleHeaderSeparator(); + borderText = GenerateTitleHeaderSeparator(columns); tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } @@ -61,18 +47,19 @@ public void Render(ITablePrinter tablePrinter) /// Generates the border displayed between title and column header rows. /// This border is used only when both title and column header rows are visible. /// - private string GenerateTitleHeaderSeparator() + /// + private string GenerateTitleHeaderSeparator(List columns) { StringBuilder sb = new StringBuilder(); sb.Append(BorderTemplate.LeftIntersection); - for (int columnIndex = 0; columnIndex < columnsWidths.Count; columnIndex++) + for (int columnIndex = 0; columnIndex < columns.Count; columnIndex++) { - int columnWidth = columnsWidths[columnIndex]; + int columnWidth = columns[columnIndex].Width; sb.Append(new string(BorderTemplate.Horizontal, columnWidth)); - char columnBorderRight = columnIndex < columnsWidths.Count - 1 + char columnBorderRight = columnIndex < columns.Count - 1 ? BorderTemplate.TopIntersection : BorderTemplate.RightIntersection; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs index c3a56e59..a6985efd 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs @@ -19,46 +19,63 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose -using System; - namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleRowX { - private readonly bool isVisible; - private readonly CellX cellX; - private readonly DataGridBorderX dataGridBorderX; - public Size Size { get; set; } - public TitleRowX(TitleRow titleRow, DataGridBorderX dataGridBorderX) - { - this.dataGridBorderX = dataGridBorderX ?? throw new ArgumentNullException(nameof(dataGridBorderX)); + public CellX CellX { get; set; } + + public DataGridBorderX GridBorderX { get; set; } - isVisible = titleRow != null; - Size = titleRow?.CalculatePreferredSize() ?? Size.Empty; - cellX = CellX.CreateFrom(titleRow?.TitleCell); + public void CalculateLayout() + { + Size = CalculatePreferredSize(); } - public void Render(ITablePrinter tablePrinter) + private Size CalculatePreferredSize() { - if (!isVisible) - return; + Size cellSize = CellX.Size; + + int rowWidth = cellSize.Width; + int rowHeight = cellSize.Height; - Size cellSize = dataGridBorderX.IsVisible - ? Size.InflateWidth(-2) - : Size; + if (GridBorderX != null) + rowWidth += 2; - cellX.Size = cellSize; + return new Size(rowWidth, rowHeight); + } + + public void Render(ITablePrinter tablePrinter, Size actualSize) + { + Size cellSize = GridBorderX != null + ? actualSize.InflateWidth(-2) + : actualSize; for (int lineIndex = 0; lineIndex < cellSize.Height; lineIndex++) { - dataGridBorderX.RenderRowLeftBorder(tablePrinter); - cellX.RenderNextLine(tablePrinter); - dataGridBorderX.RenderRowRightBorder(tablePrinter); + GridBorderX?.RenderRowLeftBorder(tablePrinter); + CellX.RenderNextLine(tablePrinter, cellSize); + GridBorderX?.RenderRowRightBorder(tablePrinter); tablePrinter.WriteLine(); } } + + public static TitleRowX CreateFrom(TitleRow titleRow) + { + TitleRowX titleRowX = new TitleRowX + { + CellX = CellX.CreateFrom(titleRow.TitleCell), + GridBorderX = titleRow.ParentDataGrid.Border.IsVisible + ? DataGridBorderX.CreateFrom(titleRow.ParentDataGrid.Border) + : null + }; + + titleRowX.CalculateLayout(); + + return titleRowX; + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs index d22f9100..05a0a59c 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleTopBorder.cs @@ -25,21 +25,8 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { internal class TitleTopBorder { + private int? lastWidth; private string borderText; - private int width; - - public int Width - { - get => width; - set - { - if (value == width) - return; - - width = value; - borderText = null; - } - } public BorderTemplate BorderTemplate { get; set; } @@ -47,10 +34,13 @@ public int Width public ConsoleColor? BackgroundColor { get; set; } - public void Render(ITablePrinter tablePrinter) + public void Render(ITablePrinter tablePrinter, int actualWidth) { - if (borderText == null) - borderText = BorderTemplate.GenerateTopBorder(width - 2); + if (lastWidth != actualWidth || borderText == null) + { + borderText = BorderTemplate.GenerateTopBorder(actualWidth - 2); + lastWidth = actualWidth; + } tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs index 705a910d..dad8aad3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/TitleRow.cs @@ -101,27 +101,6 @@ public TitleRow(object title) }; } - /// - /// Calculates the space (in characters) the current instance occupies without other restrictions. - /// - public Size CalculatePreferredSize() - { - bool displayBorder = ParentDataGrid?.DisplayBorder ?? false; - - int titleRowWidth = 0; - - if (displayBorder) - titleRowWidth += 1; - - Size cellSize = TitleCell.CalculatePreferredSize(); - titleRowWidth += cellSize.Width; - - if (displayBorder) - titleRowWidth += 1; - - return new Size(titleRowWidth, cellSize.Height); - } - public override IEnumerator GetEnumerator() { return new TitleCellEnumerator(this); diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs index 032f3ac8..5c01b0f5 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs @@ -48,11 +48,10 @@ public void HavingContentShorterThanCellWidth_WhenRendered_LineIsFilledWithSpace { CellX cell = new CellX { - Content = "text", - Size = new Size(10, 1) + Content = "text" }; - RenderAllLines(cell); + RenderAllLines(cell, new Size(10, 1)); Assert.That(renderOutput, Is.EqualTo(new[] { "text " })); } @@ -62,11 +61,10 @@ public void HavingContentLongerThanCellWidth_WhenRendered_ThenLineIsNotTrimmed() { CellX cell = new CellX { - Content = "some long text", - Size = new Size(10, 1) + Content = "some long text" }; - RenderAllLines(cell); + RenderAllLines(cell, new Size(10, 1)); Assert.That(renderOutput, Is.EqualTo(new List { "some long text" })); } @@ -76,11 +74,10 @@ public void HavingContentWithLessLinesThanCellHeight_WhenRendered_ThenEmptyLines { CellX cell = new CellX { - Content = "text", - Size = new Size(10, 2) + Content = "text" }; - RenderAllLines(cell); + RenderAllLines(cell, new Size(10, 2)); Assert.That(renderOutput, Is.EqualTo(new List { @@ -95,10 +92,9 @@ public void HavingContentWithMoreLinesThanCellHeight_WhenRendered_ThenOnlyTheReq CellX cell = new CellX { Content = new MultilineText(new[] { "line1", "line2", "line3" }), - Size = new Size(10, 2) }; - RenderAllLines(cell); + RenderAllLines(cell, new Size(10, 2)); Assert.That(renderOutput, Is.EqualTo(new List { @@ -113,11 +109,10 @@ public void HavingPaddingLeftAndContentShorterThanCellWidth_WhenRendered_LineCon CellX cell = new CellX { Content = "text", - Size = new Size(10, 1), PaddingLeft = 2 }; - RenderAllLines(cell); + RenderAllLines(cell, new Size(10, 1)); Assert.That(renderOutput, Is.EqualTo(new[] { " text " })); } @@ -128,20 +123,19 @@ public void HavingPaddingRightAndContentShorterThanCellWidth_WhenRendered_LineCo CellX cell = new CellX { Content = "text", - Size = new Size(10, 1), PaddingRight = 2, HorizontalAlignment = HorizontalAlignment.Right }; - RenderAllLines(cell); + RenderAllLines(cell, new Size(10, 1)); Assert.That(renderOutput, Is.EqualTo(new[] { " text " })); } - private void RenderAllLines(CellX cellX) + private void RenderAllLines(CellX cellX, Size size) { for (int i = 0; i < cellX.Size.Height; i++) - cellX.RenderNextLine(tablePrinter.Object); + cellX.RenderNextLine(tablePrinter.Object, size); } } } \ No newline at end of file From b8d618c8168d45e75523c8f17e7db9225e7a5145 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Mon, 14 Dec 2020 12:09:49 +0200 Subject: [PATCH 43/57] fixed some unit tests for the data grid. --- doc/DataGrid.drawio | 0 release-build/.gitignore | 1 + release-build/config.ps1 | 41 +++++ release-build/run.ps1 | 22 +++ release-build/scripts/build.ps1 | 18 +++ release-build/scripts/configuration.ps1 | 74 +++++++++ release-build/scripts/git.ps1 | 53 +++++++ release-build/scripts/logging.ps1 | 12 ++ release-build/scripts/release-directory.ps1 | 17 +++ release-build/scripts/run.ps1 | 52 +++++++ release-build/scripts/sources-directory.ps1 | 18 +++ release-build/scripts/versioning.ps1 | 144 ++++++++++++++++++ .../ColumnList.cs | 2 - .../ConsoleTools.Controls.Tables/DataGrid.cs | 19 ++- .../ConsoleTools.Controls.Tables/RowBase.cs | 3 + .../Tables/CellXTests/RenderTextTests.cs | 20 +-- .../Tables/TableTests/ConstructorTests.cs | 24 +-- .../Tables/TableTests/CustomBorderTests.cs | 12 +- .../Tables/TableTests/TablePaddingTests.cs | 6 +- 19 files changed, 504 insertions(+), 34 deletions(-) create mode 100644 doc/DataGrid.drawio create mode 100644 release-build/.gitignore create mode 100644 release-build/config.ps1 create mode 100644 release-build/run.ps1 create mode 100644 release-build/scripts/build.ps1 create mode 100644 release-build/scripts/configuration.ps1 create mode 100644 release-build/scripts/git.ps1 create mode 100644 release-build/scripts/logging.ps1 create mode 100644 release-build/scripts/release-directory.ps1 create mode 100644 release-build/scripts/run.ps1 create mode 100644 release-build/scripts/sources-directory.ps1 create mode 100644 release-build/scripts/versioning.ps1 diff --git a/doc/DataGrid.drawio b/doc/DataGrid.drawio new file mode 100644 index 00000000..e69de29b diff --git a/release-build/.gitignore b/release-build/.gitignore new file mode 100644 index 00000000..aececacd --- /dev/null +++ b/release-build/.gitignore @@ -0,0 +1 @@ +~* \ No newline at end of file diff --git a/release-build/config.ps1 b/release-build/config.ps1 new file mode 100644 index 00000000..73b9432c --- /dev/null +++ b/release-build/config.ps1 @@ -0,0 +1,41 @@ +# ============================================================================== +# This file works like a project file. It contains configurations based on which +# the scripts will do the build. +# ------------------------------------------------------------------------------ +# Relative paths: +# If relative paths are used, use the $PSScriptRoot variable to specify a location relative to this config file, +# instead of using paths relative to the current directory. +# The script may be called from any other directory than the script's root directory. +# ============================================================================== + +$global:config = @{ + + # The url of the origin repository. + RepoUrl = "https://github.com/lastunicorn/ConsoleTools.git" + + # The path to the nuget executable + NugetPath = "$PSScriptRoot\tools\NuGet.exe" + + # The path to the msbuild executable + #$msbuild = "c:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" + MsbuildPath = "c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" + + # The path where to download the sources + SourcesPath = "$PSScriptRoot\~sources" + + # The path where to copy the resulted installer package + # Ex: + # $outputPath = ".\releases" + OutputPath = "\\fscj\Projects\Fresenius FMT\Releases for Test" + + # If a value is specified, it represents the version component to be incremented. + # To skip the version incrementation, initialize this value with $null or skip it altogether + # If the Version property is specified, this property is ignored. + # Possible Values = null, 1, 2, 3, 4 + IncrementVersionComponent = 3 + + # If this property is specified, its value is used as the version of the release. + # If this property is specified, IncrementVersionComponent is ignored. + # Values pattern: "major.minor.patch.build" + #Version = "4.2.1.0" +} \ No newline at end of file diff --git a/release-build/run.ps1 b/release-build/run.ps1 new file mode 100644 index 00000000..aee72d88 --- /dev/null +++ b/release-build/run.ps1 @@ -0,0 +1,22 @@ +param([String] $configName = "config") + + +# ============================================================================== +# Ensure logs directory +# ============================================================================== + +# The path where to store the log files. +$logsPath = "$PSScriptRoot\~logs" + +if (!(Test-Path $logsPath)) +{ + New-Item -ItemType "directory" -Path $logsPath +} + + +# ============================================================================== +# Run the build +# ============================================================================== + +$timestamp = Get-Date -f "yyyy MM dd HHmmss" +. $PSScriptRoot\scripts\run.ps1 -configName $configName > "$logsPath\$timestamp.log" \ No newline at end of file diff --git a/release-build/scripts/build.ps1 b/release-build/scripts/build.ps1 new file mode 100644 index 00000000..d1bf01a8 --- /dev/null +++ b/release-build/scripts/build.ps1 @@ -0,0 +1,18 @@ +# ============================================================================== +# Build the ConsoleTools Library +# ============================================================================== + +function BuildApplication { + Param ([string] $sourcesPath, [string] $nugetPath, [string] $msbuildPath) + + WriteLabel "Build App - Building the ConsoleTools library." + + $slnPathApp = [System.IO.Path]::Combine($sourcesPath, "sources\ConsoleTools\ConsoleTools.sln") + + # Restore nuget packages + & $nugetPath restore $slnPathApp + + # Build solution + & $msbuildPath $slnPathApp /t:ConsoleTools /p:Configuration=Release-Net461 /p:Platform="Any CPU" + +} \ No newline at end of file diff --git a/release-build/scripts/configuration.ps1 b/release-build/scripts/configuration.ps1 new file mode 100644 index 00000000..9010c054 --- /dev/null +++ b/release-build/scripts/configuration.ps1 @@ -0,0 +1,74 @@ +# ============================================================================== +# Load the configuration +# ============================================================================== + +function LoadConfig { + Param ([string] $configName) + + if ($configName -eq $null) + { + throw "No configuration was provided. A configuration is the name of the configuration file without the '.ps1' extension." + } + else + { + try + { + # 1) Search in the current directory for the config file. + # Works also if the path is absolute. + + $configFilePath = Resolve-Path -Path $configName -ErrorAction Stop + } + catch + { + $configNameIsPs1File = $configName.EndsWith(".ps1"); + + if ($configNameIsPs1File) + { + throw "The specified configuration was not found. Configuration: $configName" + } + + try + { + # 2) Search in the current directory for the config file with added ps1 extension. + + $configNameWithPs1 = $configName + ".ps1" + $configFilePath = Resolve-Path -Path $configNameWithPs1 -ErrorAction Stop + } + catch + { + throw "The specified configuration was not found. Configuration: $configName" + } + } + + # Load the configuration + . $configFilePath + } + +} + +# ============================================================================== +# Validate Config values +# ------------------------------------------------------------------------------ +# Checks if the files specified in the config file exists. +# ============================================================================== + +function ValidateConfig { + + WriteLabel "Validate Config - Validating the existence of the third party tools needed for build." + + if (!(Test-Path $global:config.NugetPath)) + { + Write-Error -Message ("The nuget file does not exist at the specified location. Location: " + $global:config.NugetPath) -ErrorAction Stop + } + + if (!(Test-Path $global:config.MsbuildPath)) + { + Write-Error -Message ("The msbuild file does not exist at the specified location. Location: " + $global:config.MsbuildPath) -ErrorAction Stop + } + + if(($global:config.IncrementVersion -ne $null) -and (($global:config.IncrementVersion -lt 1) -or ($global:config.IncrementVersion -gt 4))) + { + Write-Error -Message ("Invalid value for IncrementVersion . Value: " + $global:config.IncrementVersion) -ErrorAction Stop + } + +} \ No newline at end of file diff --git a/release-build/scripts/git.ps1 b/release-build/scripts/git.ps1 new file mode 100644 index 00000000..eaa38419 --- /dev/null +++ b/release-build/scripts/git.ps1 @@ -0,0 +1,53 @@ +# ============================================================================== +# Clone +# ============================================================================== + +function Clone { +Param ([string] $repoUrl, [string] $destinationDirectory) + + WriteLabel "Clone - Cloning the git repository." + + git clone $repoUrl $destinationDirectory + +} + + +# ============================================================================== +# Commit version increment +# ============================================================================== + +function CommitChanges { + Param ([string] $sourcesPath) + + WriteLabel "Commit Changes - Committing in git the changes: version increment." + + $oldLocation = Get-Location + Set-Location $sourcesPath + + git add ".\src\AssemblyInfo.Shared.cs" + git add ".\src\Fresenius.FMT.Installer\Product.wxs" + git commit -m "incremented version for test release" + git push + + Set-Location $oldLocation + +} + +# ============================================================================== +# Add git tag +# ============================================================================== + +function AddGitTag { + Param ([string] $sourcesPath, [string] $newVersion) + + WriteLabel "Add git tag - Adding in git a tag with the new version." + + $oldLocation = Get-Location + Set-Location $sourcesPath + + git tag -a "test-$newVersion" -m "release for test for version $newVersion" + git push --tags + + Set-Location $oldLocation + +} \ No newline at end of file diff --git a/release-build/scripts/logging.ps1 b/release-build/scripts/logging.ps1 new file mode 100644 index 00000000..c45e23b6 --- /dev/null +++ b/release-build/scripts/logging.ps1 @@ -0,0 +1,12 @@ + + +function WriteLabel { +Param ([string] $text) + + Write-Output --------------------------------------------------------------------------- + Write-Output $text + Write-Output --------------------------------------------------------------------------- + + Write-Host "-> $text" + +} \ No newline at end of file diff --git a/release-build/scripts/release-directory.ps1 b/release-build/scripts/release-directory.ps1 new file mode 100644 index 00000000..e629e4ac --- /dev/null +++ b/release-build/scripts/release-directory.ps1 @@ -0,0 +1,17 @@ +# ============================================================================== +# Get the release output +# ============================================================================== + +function PublishOutput { + Param ([string] $sourcesPath, [string] $outputPath, [string] $newVersion) + + WriteLabel "Publish Output - Publishing the resulted installation package." + + $sourcePath = Join-Path -Path $sourcesPath -ChildPath "\src\output-installer" + + $destinationDirectory = (Get-Date -f "yyyy MM dd HHmm") + " - FMT " + $newVersion + $destinationPath = Join-Path -Path $outputPath -ChildPath $destinationDirectory + + Copy-Item -Path "$sourcePath" -Destination "$destinationPath" -Recurse -Container + +} \ No newline at end of file diff --git a/release-build/scripts/run.ps1 b/release-build/scripts/run.ps1 new file mode 100644 index 00000000..d356f50a --- /dev/null +++ b/release-build/scripts/run.ps1 @@ -0,0 +1,52 @@ +# ============================================================================== +# +# ============================================================================== + +param([String] $configName = "config") + + +# ------------------------------------------------------------------------------ +# Include additional scripts +# ------------------------------------------------------------------------------ + +. $PSScriptRoot\logging.ps1 +. $PSScriptRoot\configuration.ps1 +. $PSScriptRoot\sources-directory.ps1 +. $PSScriptRoot\git.ps1 +. $PSScriptRoot\versioning.ps1 +. $PSScriptRoot\build.ps1 +. $PSScriptRoot\release-directory.ps1 + + +# ------------------------------------------------------------------------------ +# Run the steps of the script. +# ------------------------------------------------------------------------------ + +LoadConfig -configName $configName +ValidateConfig -ErrorAction Stop +#Cleanup -path $global:config.SourcesPath +#Clone -repoUrl $global:config.RepoUrl -destinationDirectory $global:config.SourcesPath + +#if ($global:config.Version -eq $null) +#{ +# $incrementVersion = ($global:config.IncrementVersionComponent -ne $null) -and ($global:config.IncrementVersionComponent -ne 0) +# +# if ($incrementVersion -eq $true) +# { +# IncrementVersion -sourcesPath $global:config.SourcesPath -versionComponent $global:config.IncrementVersionComponent +# } +# else +# { +# $version = RetrieveVersion -sourcesPath $global:config.SourcesPath +# $global:newVersion = $version.ToString() +# } +#} +#else +#{ +# SetVersion -sourcesPath $global:config.SourcesPath -version $global:config.Version +#} + +BuildApplication -sourcesPath $global:config.SourcesPath -nugetPath $global:config.NugetPath -msbuildPath $global:config.MsbuildPath +#PublishOutput -sourcesPath $global:config.SourcesPath -outputPath $global:config.OutputPath -newVersion $global:newVersion +#CommitChanges -sourcesPath $global:config.SourcesPath +#AddGitTag -sourcesPath $global:config.SourcesPath -newVersion $global:newVersion \ No newline at end of file diff --git a/release-build/scripts/sources-directory.ps1 b/release-build/scripts/sources-directory.ps1 new file mode 100644 index 00000000..8ee2856b --- /dev/null +++ b/release-build/scripts/sources-directory.ps1 @@ -0,0 +1,18 @@ +# ============================================================================== +# Cleanup +# ------------------------------------------------------------------------------ +# Delete directories from old builds +# ============================================================================== + + +function Cleanup { +Param ([string] $path) + + WriteLabel "Clenup - Removing old build" + + if (Test-Path $global:config.SourcesPath) + { + Remove-Item $global:config.SourcesPath -Recurse -Force; + } + +} \ No newline at end of file diff --git a/release-build/scripts/versioning.ps1 b/release-build/scripts/versioning.ps1 new file mode 100644 index 00000000..58e2b246 --- /dev/null +++ b/release-build/scripts/versioning.ps1 @@ -0,0 +1,144 @@ +# ============================================================================== +# Version Management +# ============================================================================== + +function IncrementVersion { + Param ([string] $sourcesPath, [int32] $versionComponent) + + WriteLabel "Increment Version - Incrementing the version of the application." + + # Read current version + # ------------------------------------------------------------------------------ + + $newVersion = RetrieveVersion -sourcesPath $sourcesPath + $newVersion.IncrementComponent($versionComponent) + $newVersionAsString = $newVersion.ToString() + + + # Update Version + # ------------------------------------------------------------------------------ + + UpdateAssemblyVersion -sourcesPath $sourcesPath -version $newVersionAsString + UpdateInstallerVersion -sourcesPath $sourcesPath -version $newVersionAsString + + + # save the new version for later (in global) + # ------------------------------------------------------------------------------ + + $global:newVersion = $newVersionAsString + +} + +function SetVersion { + Param ([string] $sourcesPath, [string] $version) + + WriteLabel "Set Version - Sets the version of the application to '$version'." + + + # Update Version + # ------------------------------------------------------------------------------ + + UpdateAssemblyVersion -sourcesPath $sourcesPath -version $version + UpdateInstallerVersion -sourcesPath $sourcesPath -version $version + + + # save the new version for later (in global) + # ------------------------------------------------------------------------------ + + $global:newVersion = $version + +} + +function RetrieveVersion { + Param ([string] $sourcesPath) + + $versionFilePath = $sourcesPath + "\sources\ConsoleTools\AssemblyInfo.Shared.cs" + $versionFileContent = Get-Content -Path "$versionFilePath" -Raw + + $newVersion = [Version]::new("$versionFileContent") + + return $newVersion +} + +function UpdateAssemblyVersion { + Param ([string] $sourcesPath, [string] $version) + + $assemblyInfoPath = $sourcesPath + "\src\AssemblyInfo.Shared.cs" + $assemblyInfoContent = Get-Content -Path "$assemblyInfoPath" -Raw + + $newAssemblyInfoContent = $assemblyInfoContent ` + -replace 'AssemblyVersion\("\d*\.\d*\.\d*\.\d*"\)', "AssemblyVersion(""$version"")" ` + -replace 'AssemblyFileVersion\("\d*\.\d*\.\d*\.\d*"\)', "AssemblyFileVersion(""$version"")" + + Set-Content -Path "$assemblyInfoPath" -Value $newAssemblyInfoContent + +} + +function UpdateInstallerVersion { + Param ([string] $sourcesPath, [string] $version) + + $installerProductPath = $sourcesPath + "\src\Fresenius.FMT.Installer\Product.wxs" + $installerProductContent = Get-Content -Path "$installerProductPath" -Raw + + $newInstallerProductContent = $installerProductContent ` + -replace 'Version="\d*\.\d*\.\d*\.\d*"', "Version=""$version""" + + Set-Content -Path "$installerProductPath" -Value $newInstallerProductContent + +} + + +class Version +{ + [int32] $Major + [int32] $Minor + [int32] $Patch + [int32] $Build + + Version ([String] $value) + { + $match = [regex]::Match($value,'AssemblyVersion\("(\d*)\.(\d*)\.(\d*)\.(\d*)"\)') + + $this.Major = [int]::Parse($match.Groups[1].Value) + $this.Minor = [int]::Parse($match.Groups[2].Value) + $this.Patch = [int]::Parse($match.Groups[3].Value) + $this.Build = [int]::Parse($match.Groups[4].Value) + } + + IncrementComponent([int32] $component) + { + switch ($component) + { + 1 + { + $this.Major = $this.Major + 1 + $this.Minor = 0 + $this.Patch = 0 + $this.Build = 0 + } + + 2 + { + $this.Minor = $this.Minor + 1 + $this.Patch = 0 + $this.Build = 0 + } + + 3 + { + $this.Patch = $this.Patch + 1 + $this.Build = 0 + } + + 4 + { + $this.Build = $this.Build + 1 + } + } + } + + [String] ToString() + { + return $this.Major.ToString() + "." + $this.Minor.ToString() + "." + $this.Patch.ToString() + "." + $this.Build.ToString() + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs index ad0f34b3..789c8920 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs @@ -22,7 +22,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables { @@ -33,7 +32,6 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables public class ColumnList : IEnumerable { private readonly DataGrid parentDataGrid; - private readonly List columns = new List(); /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index 3fb688f5..e435c257 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.Data; +using System.Linq; using DustInTheWind.ConsoleTools.Controls.Tables.Printers; using DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel; @@ -374,7 +375,23 @@ public static DataGrid BuildFrom(T data) { if (data == null) throw new ArgumentNullException(nameof(data)); - DataGridBuilderFromObject builder = new DataGridBuilderFromObject(typeof(T)); + DataGridBuilderFromObject builder; + + Type enumerableType = typeof(T).GetInterfaces() + .FirstOrDefault(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(IEnumerable<>)); + + if (enumerableType != null) + { + Type[] genericArguments = enumerableType.GetGenericArguments(); + + Type genericArgument = genericArguments[0]; + builder = new DataGridBuilderFromObject(genericArgument); + } + else + { + builder = new DataGridBuilderFromObject(typeof(T)); + } + builder.Add(data); return builder.DataGrid; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs index 5955b0bb..18d11a95 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RowBase.cs @@ -25,6 +25,9 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables { + /// + /// The base class for a data grid row. + /// public abstract class RowBase : IEnumerable { /// diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs index 5c01b0f5..86fbb339 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs @@ -26,20 +26,20 @@ namespace DustInTheWind.ConsoleTools.Tests.Tables.CellXTests [TestFixture] public class RenderTextTests { - private List renderOutput; + private List renderingOutput; private Mock tablePrinter; [SetUp] public void SetUp() { - renderOutput = new List(); + renderingOutput = new List(); tablePrinter = new Mock(); tablePrinter .Setup(x => x.Write(It.IsAny(), It.IsAny(), It.IsAny())) .Callback((line, fg, bg) => { - renderOutput.Add(line); + renderingOutput.Add(line); }); } @@ -53,7 +53,7 @@ public void HavingContentShorterThanCellWidth_WhenRendered_LineIsFilledWithSpace RenderAllLines(cell, new Size(10, 1)); - Assert.That(renderOutput, Is.EqualTo(new[] { "text " })); + Assert.That(renderingOutput, Is.EqualTo(new[] { "text " })); } [Test] @@ -66,7 +66,7 @@ public void HavingContentLongerThanCellWidth_WhenRendered_ThenLineIsNotTrimmed() RenderAllLines(cell, new Size(10, 1)); - Assert.That(renderOutput, Is.EqualTo(new List { "some long text" })); + Assert.That(renderingOutput, Is.EqualTo(new List { "some long text" })); } [Test] @@ -79,7 +79,7 @@ public void HavingContentWithLessLinesThanCellHeight_WhenRendered_ThenEmptyLines RenderAllLines(cell, new Size(10, 2)); - Assert.That(renderOutput, Is.EqualTo(new List + Assert.That(renderingOutput, Is.EqualTo(new List { "text ", " " @@ -96,7 +96,7 @@ public void HavingContentWithMoreLinesThanCellHeight_WhenRendered_ThenOnlyTheReq RenderAllLines(cell, new Size(10, 2)); - Assert.That(renderOutput, Is.EqualTo(new List + Assert.That(renderingOutput, Is.EqualTo(new List { "line1 ", "line2 " @@ -114,7 +114,7 @@ public void HavingPaddingLeftAndContentShorterThanCellWidth_WhenRendered_LineCon RenderAllLines(cell, new Size(10, 1)); - Assert.That(renderOutput, Is.EqualTo(new[] { " text " })); + Assert.That(renderingOutput, Is.EqualTo(new[] { " text " })); } [Test] @@ -129,12 +129,12 @@ public void HavingPaddingRightAndContentShorterThanCellWidth_WhenRendered_LineCo RenderAllLines(cell, new Size(10, 1)); - Assert.That(renderOutput, Is.EqualTo(new[] { " text " })); + Assert.That(renderingOutput, Is.EqualTo(new[] { " text " })); } private void RenderAllLines(CellX cellX, Size size) { - for (int i = 0; i < cellX.Size.Height; i++) + for (int i = 0; i < size.Height; i++) cellX.RenderNextLine(tablePrinter.Object, size); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs index c0a25439..ba7be79a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs @@ -23,43 +23,43 @@ namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests public class ConstructorTests { [Test] - public void TestConstructor1() + public void WhenInstantiatingDataGridWithoutParameters_ThenPropertiesAreCorrectlyInitialized() { DataGrid dataGrid = new DataGrid(); Assert.That(dataGrid.Title, Is.EqualTo(MultilineText.Empty)); Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); - Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); + Assert.That(dataGrid.CellPaddingLeft, Is.Null); + Assert.That(dataGrid.CellPaddingRight, Is.Null); + Assert.That(dataGrid.Border.DisplayBorderBetweenRows, Is.False); Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); } [Test] - public void TestConstructor2() + public void WhenInstantiatingDataGridWithStringTitle_ThenPropertiesAreCorrectlyInitialized() { DataGrid dataGrid = new DataGrid("My Title"); Assert.That(dataGrid.Title, Is.EqualTo(new MultilineText("My Title"))); Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); - Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); + Assert.That(dataGrid.CellPaddingLeft, Is.Null); + Assert.That(dataGrid.CellPaddingRight, Is.Null); + Assert.That(dataGrid.Border.DisplayBorderBetweenRows, Is.False); Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); } [Test] - public void TestConstructor3() + public void WhenInstantiatingDataGridWithMultilineTextTitle_ThenPropertiesAreCorrectlyInitialized() { DataGrid dataGrid = new DataGrid(new MultilineText("My Title")); Assert.That(dataGrid.Title, Is.EqualTo(new MultilineText("My Title"))); Assert.That(dataGrid.CellHorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); - Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); - Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); - Assert.That(dataGrid.DisplayBorderBetweenRows, Is.False); + Assert.That(dataGrid.CellPaddingLeft, Is.Null); + Assert.That(dataGrid.CellPaddingRight, Is.Null); + Assert.That(dataGrid.Border.DisplayBorderBetweenRows, Is.False); Assert.That(dataGrid.Columns.Count, Is.EqualTo(0)); Assert.That(dataGrid.Rows.Count, Is.EqualTo(0)); } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs index f1e8e268..bb358d02 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs @@ -26,7 +26,7 @@ public class CustomBorderTests public void render_simple_table_with_custom_border() { DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Border.Template = BorderTemplate.DoubleLineBorderTemplate; dataGrid.Rows.Add("one", "ichi", "eins"); dataGrid.Rows.Add("two", "ni", "zwei"); dataGrid.Rows.Add("three", "san", "drei"); @@ -47,7 +47,7 @@ public void render_table_with_custom_border_and_title() { DataGrid dataGrid = new DataGrid(); dataGrid.Title = "My Title"; - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Border.Template = BorderTemplate.DoubleLineBorderTemplate; dataGrid.Rows.Add("one", "ichi", "eins"); dataGrid.Rows.Add("two", "ni", "zwei"); dataGrid.Rows.Add("three", "san", "drei"); @@ -69,7 +69,7 @@ public void render_table_with_custom_border_and_title() public void render_table_with_custom_border_and_headers() { DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Border.Template = BorderTemplate.DoubleLineBorderTemplate; dataGrid.HeaderRow.IsVisible = true; dataGrid.Columns.Add(new Column("One")); dataGrid.Columns.Add(new Column("Two")); @@ -95,7 +95,7 @@ public void render_table_with_custom_border_and_headers() public void render_table_with_custom_border_title_and_headers() { DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = BorderTemplate.DoubleLineBorderTemplate; + dataGrid.Border.Template = BorderTemplate.DoubleLineBorderTemplate; dataGrid.Title = "My Title"; dataGrid.HeaderRow.IsVisible = true; dataGrid.Columns.Add(new Column("One")); @@ -124,7 +124,7 @@ public void render_table_with_custom_border_title_and_headers() public void render_table_with_digit_and_letter_border() { DataGrid dataGrid = new DataGrid(); - dataGrid.BorderTemplate = new BorderTemplate("1234567890abcde"); + dataGrid.Border.Template = new BorderTemplate("1234567890abcde"); dataGrid.Title = "My Title"; dataGrid.HeaderRow.IsVisible = true; dataGrid.CellPaddingLeft = 3; @@ -138,7 +138,7 @@ public void render_table_with_digit_and_letter_border() string expected = @"122222222222222222222222222222222223 -8 My Title 4 +8 My Title 4 beeeeeeeeeee9eeeeeeeeee9eeeeeeeeeee0 8 One d Two d Three 4 beeeeeeeeeeeceeeeeeeeeeceeeeeeeeeee0 diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs index fed570df..67328f85 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs @@ -41,7 +41,7 @@ public void added_a_padding_left_of_2() const string expected = @"+-------------------------------+ -| My Title | +| My Title | +----------+---------+----------+ | 1234567 | 123456 | one two | | 1 | asd | asas | @@ -50,7 +50,7 @@ public void added_a_padding_left_of_2() "; Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(2)); - Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingRight, Is.Null); CustomAssert.TableRender(dataGrid, expected); } @@ -69,7 +69,7 @@ public void added_a_padding_right_of_2() +----------+---------+----------+ "; - Assert.That(dataGrid.CellPaddingLeft, Is.EqualTo(1)); + Assert.That(dataGrid.CellPaddingLeft, Is.Null); Assert.That(dataGrid.CellPaddingRight, Is.EqualTo(2)); CustomAssert.TableRender(dataGrid, expected); } From d9d73ec5404add7c4f2cf9ea59638c2ba95023ef Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Mon, 14 Dec 2020 17:46:56 +0200 Subject: [PATCH 44/57] renamed datarow into normalrow. bug fix: normalrow and headerrow were always displaying borders, even when borders were disabled. --- .../ConsoleTools.Controls.Tables/DataGrid.cs | 27 +++-- .../DataGridBorder.cs | 21 ++++ .../DataGridBuilderFromDataTable.cs | 25 ++++- .../DataGridBuilderFromObject.cs | 29 +++++- .../{DataCell.cs => NormalCell.cs} | 44 ++++----- .../{DataRow.cs => NormalRow.cs} | 70 ++++++------- .../{DataRowList.cs => NormalRowList.cs} | 60 ++++++------ .../RenderingModel/DataDataSeparator.cs | 4 +- .../RenderingModel/DataGridX.cs | 14 +-- .../RenderingModel/DataGridXBuilder.cs | 24 ++--- .../RenderingModel/HeaderDataSeparator.cs | 4 +- .../RenderingModel/HeaderRowX.cs | 16 +-- .../{DataRowX.cs => NormalRowX.cs} | 24 ++--- .../ConsoleTools.Tests/ConsoleOutput.cs | 2 +- .../CalculatePaddingLeftTests.cs | 36 +++---- .../CalculatePaddingRightTests.cs | 36 +++---- ...nstructorMultilineTextAndAlignmentTests.cs | 10 +- .../ConstructorMultilineTextTests.cs | 10 +- .../DataCellTests/ConstructorNoParamsTests.cs | 10 +- .../ConstructorObjectAndAlignmentTests.cs | 10 +- .../DataCellTests/ConstructorObjectTests.cs | 10 +- .../ConstructorStringAndAlignmentTests.cs | 10 +- .../DataCellTests/ConstructorStringTests.cs | 10 +- .../Tables/DataRowListTests/AddCellsTests.cs | 74 -------------- .../Tables/DataRowListTests/ClearTests.cs | 48 --------- .../Tables/DataRowListTests/RemoveAtTests.cs | 82 ---------------- .../Tables/DataRowListTests/RemoveTests.cs | 82 ---------------- .../AddCellEnumerationTests.cs | 38 +++---- .../NormalRowListTests/AddCellsTests.cs | 74 ++++++++++++++ .../AddNormalRowTests.cs} | 36 +++---- .../AddStringEnumerationTests.cs | 22 ++--- .../AddStringsTests.cs | 24 ++--- .../Tables/NormalRowListTests/ClearTests.cs | 64 ++++++++++++ .../ConstructorTests.cs | 10 +- .../NormalRowListTests/RemoveAtTests.cs | 98 +++++++++++++++++++ .../Tables/NormalRowListTests/RemoveTests.cs | 98 +++++++++++++++++++ .../ConsoleTools.Tests/Tables/RowTests.cs | 24 ++--- .../TableTests/CellAlignmentPerColumnTests.cs | 2 +- .../Tables/TableTests/CellAlignmentTests.cs | 10 +- .../Tables/TableTests/NoBorderTests.cs | 28 +++++- .../TextBlockTests/TextBlockTests.cs | 4 +- 41 files changed, 730 insertions(+), 594 deletions(-) rename sources/ConsoleTools/ConsoleTools.Controls.Tables/{DataCell.cs => NormalCell.cs} (84%) rename sources/ConsoleTools/ConsoleTools.Controls.Tables/{DataRow.cs => NormalRow.cs} (77%) rename sources/ConsoleTools/ConsoleTools.Controls.Tables/{DataRowList.cs => NormalRowList.cs} (80%) rename sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/{DataRowX.cs => NormalRowX.cs} (82%) delete mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellsTests.cs delete mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ClearTests.cs delete mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveAtTests.cs delete mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveTests.cs rename sources/ConsoleTools/ConsoleTools.Tests/Tables/{DataRowListTests => NormalRowListTests}/AddCellEnumerationTests.cs (55%) create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellsTests.cs rename sources/ConsoleTools/ConsoleTools.Tests/Tables/{DataRowListTests/AddDataRowTests.cs => NormalRowListTests/AddNormalRowTests.cs} (52%) rename sources/ConsoleTools/ConsoleTools.Tests/Tables/{DataRowListTests => NormalRowListTests}/AddStringEnumerationTests.cs (69%) rename sources/ConsoleTools/ConsoleTools.Tests/Tables/{DataRowListTests => NormalRowListTests}/AddStringsTests.cs (62%) create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ClearTests.cs rename sources/ConsoleTools/ConsoleTools.Tests/Tables/{DataRowListTests => NormalRowListTests}/ConstructorTests.cs (73%) create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveAtTests.cs create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveTests.cs diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index e435c257..cb2598f5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -20,6 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; +using System.Collections; using System.Collections.Generic; using System.Data; using System.Linq; @@ -95,14 +96,14 @@ private set /// /// Gets the list of rows contained by the current data grid. /// - public DataRowList Rows { get; } + public NormalRowList Rows { get; } /// /// Gets the row at the specified index. /// /// The zero-based index of the row to get. /// The row at the specified index. - public DataRow this[int rowIndex] => Rows[rowIndex]; + public NormalRow this[int rowIndex] => Rows[rowIndex]; /// /// Gets the cell at the specified location. @@ -110,7 +111,7 @@ private set /// The zero-based row index of the cell to get. /// The zero-based column index of the cell to get. /// The cell at the specified location. - public DataCell this[int rowIndex, int columnIndex] => Rows[rowIndex][columnIndex]; + public NormalCell this[int rowIndex, int columnIndex] => Rows[rowIndex][columnIndex]; /// /// Gets an object representing the border of the data grid. @@ -197,7 +198,11 @@ public ConsoleColor? HeaderBackgroundColor /// Default value: true /// [Obsolete("Use Border.IsVisible property instead.")] - public bool DisplayBorder { get; set; } = true; + public bool DisplayBorder + { + get => Border.IsVisible; + set => Border.IsVisible = value; + } /// /// Gets or sets the data grid borders. @@ -249,7 +254,7 @@ public bool DisplayBorderBetweenRows /// public DataGrid() { - Rows = new DataRowList(this); + Rows = new NormalRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(); @@ -262,7 +267,7 @@ public DataGrid() /// public DataGrid(string title) { - Rows = new DataRowList(this); + Rows = new NormalRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); @@ -275,7 +280,7 @@ public DataGrid(string title) /// public DataGrid(MultilineText title) { - Rows = new DataRowList(this); + Rows = new NormalRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); @@ -288,7 +293,7 @@ public DataGrid(MultilineText title) /// public DataGrid(object title) { - Rows = new DataRowList(this); + Rows = new NormalRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); @@ -386,13 +391,15 @@ public static DataGrid BuildFrom(T data) Type genericArgument = genericArguments[0]; builder = new DataGridBuilderFromObject(genericArgument); + + builder.Add((IEnumerable)data); } else { builder = new DataGridBuilderFromObject(typeof(T)); - } - builder.Add(data); + builder.Add(data); + } return builder.DataGrid; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs index 7b5444a6..c6fe3415 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs @@ -1,3 +1,24 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + using System; namespace DustInTheWind.ConsoleTools.Controls.Tables diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs index e142d93b..0919d0ad 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs @@ -1,3 +1,24 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + using System.Data; namespace DustInTheWind.ConsoleTools.Controls.Tables @@ -19,9 +40,9 @@ public DataGridBuilderFromDataTable(DataTable dataTable) DataGrid.Columns.Add(columnHeader); } - foreach (System.Data.DataRow dataRow in dataTable.Rows) + foreach (DataRow dataRow in dataTable.Rows) { - DataRow row = new DataRow(dataRow.ItemArray); + NormalRow row = new NormalRow(dataRow.ItemArray); DataGrid.Rows.Add(row); } } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs index 19a9166c..89e61152 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs @@ -1,3 +1,24 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + using System; using System.Collections; using System.Collections.Generic; @@ -47,7 +68,7 @@ public void Add(object item) if (item == null) return; - DataRow dataRow = new DataRow(); + NormalRow normalRow = new NormalRow(); foreach (MemberInfo memberInfo in members) { @@ -56,19 +77,19 @@ public void Add(object item) case FieldInfo fieldInfo: { object value = fieldInfo.GetValue(item); - dataRow.AddCell(value); + normalRow.AddCell(value); break; } case PropertyInfo propertyInfo: { object value = propertyInfo.GetValue(item); - dataRow.AddCell(value); + normalRow.AddCell(value); break; } } } - DataGrid.Rows.Add(dataRow); + DataGrid.Rows.Add(normalRow); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalCell.cs similarity index 84% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalCell.cs index 0ad5ce02..04a490a4 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalCell.cs @@ -26,77 +26,77 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// /// Represents a cell that contains data. /// - public class DataCell : CellBase + public class NormalCell : CellBase { /// /// Gets or sets the row that contains the current cell. /// - public DataRow ParentRow { get; internal set; } + public NormalRow ParentRow { get; internal set; } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// empty content. /// - public DataCell() + public NormalCell() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it. /// /// The text displayed in the cell. - public DataCell(string text) + public NormalCell(string text) : base(text) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it and its horizontal alignment. /// /// The text displayed in the cell. /// The horizontal alignment of the content of the new cell. - public DataCell(string text, HorizontalAlignment horizontalAlignment) + public NormalCell(string text, HorizontalAlignment horizontalAlignment) : base(text, horizontalAlignment) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it. /// /// - public DataCell(MultilineText text) + public NormalCell(MultilineText text) : base(text) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it and its horizontal alignment. /// /// /// The horizontal alignment of the content of the new cell. - public DataCell(MultilineText text, HorizontalAlignment horizontalAlignment) + public NormalCell(MultilineText text, HorizontalAlignment horizontalAlignment) : base(text, horizontalAlignment) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// an object representing the content. /// - public DataCell(object content) + public NormalCell(object content) : base(content) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// an object representing the content and its horizontal alignment. /// - public DataCell(object content, HorizontalAlignment horizontalAlignment) + public NormalCell(object content, HorizontalAlignment horizontalAlignment) : base(content, horizontalAlignment) { } @@ -258,20 +258,20 @@ private HorizontalAlignment CalculateHorizontalAlignmentAtTableLevel() } /// - /// Converts a into a instance. + /// Converts a into a instance. /// /// The text to be converted. - public static implicit operator DataCell(string text) + public static implicit operator NormalCell(string text) { MultilineText multilineText = new MultilineText(text); - return new DataCell(multilineText); + return new NormalCell(multilineText); } /// - /// Converts a into its representation. + /// Converts a into its representation. /// - /// The to be converted. - public static implicit operator string(DataCell cell) + /// The to be converted. + public static implicit operator string(NormalCell cell) { return cell.Content?.ToString() ?? string.Empty; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRow.cs similarity index 77% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRow.cs index 0cbc3622..09aad2bd 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRow.cs @@ -28,12 +28,12 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// /// Represents a row in the class. /// - public class DataRow : RowBase + public class NormalRow : RowBase { /// /// Gets the list of cells contained by the row. /// - private readonly List cells = new List(); + private readonly List cells = new List(); /// /// Gets the number of cells contained by the current instance. @@ -46,53 +46,53 @@ public class DataRow : RowBase /// The zero-based index of the cell to get or set. /// The cell at the specified index. /// - public DataCell this[int index] + public NormalCell this[int index] { get => cells[index]; set => cells[index] = value; } /// - /// Initializes a new instance of the class with default values. + /// Initializes a new instance of the class with default values. /// - public DataRow() + public NormalRow() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of cells. /// /// The list of cells that will be contained by the new row. - public DataRow(IEnumerable cells) + public NormalRow(IEnumerable cells) { if (cells == null) return; - foreach (DataCell cell in cells) + foreach (NormalCell cell in cells) AddCell(cell); } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of cells. /// /// The list of cells that will be contained by the new row. - public DataRow(params DataCell[] cells) + public NormalRow(params NormalCell[] cells) { if (cells == null) return; - foreach (DataCell cell in cells) + foreach (NormalCell cell in cells) AddCell(cell); } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of texts representing the cells content. /// /// The list of texts that will be placed in cells. - public DataRow(IEnumerable cellContents) + public NormalRow(IEnumerable cellContents) { if (cellContents == null) return; @@ -102,11 +102,11 @@ public DataRow(IEnumerable cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of texts representing the cells content. /// /// The list of texts that will be placed in cells. - public DataRow(params string[] cellContents) + public NormalRow(params string[] cellContents) { if (cellContents == null) return; @@ -116,11 +116,11 @@ public DataRow(params string[] cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public DataRow(IEnumerable cellContents) + public NormalRow(IEnumerable cellContents) { if (cellContents == null) return; @@ -130,11 +130,11 @@ public DataRow(IEnumerable cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public DataRow(params MultilineText[] cellContents) + public NormalRow(params MultilineText[] cellContents) { if (cellContents == null) return; @@ -144,11 +144,11 @@ public DataRow(params MultilineText[] cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public DataRow(IEnumerable cellContents) + public NormalRow(IEnumerable cellContents) { if (cellContents == null) return; @@ -158,11 +158,11 @@ public DataRow(IEnumerable cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public DataRow(params object[] cellContents) + public NormalRow(params object[] cellContents) { if (cellContents == null) return; @@ -172,13 +172,13 @@ public DataRow(params object[] cellContents) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// - public void AddCell(DataCell cell) + public void AddCell(NormalCell cell) { if (cell == null) { - DataCell newCell = new DataCell + NormalCell newCell = new NormalCell { ParentRow = this }; @@ -192,11 +192,11 @@ public void AddCell(DataCell cell) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// public void AddCell(string cellContent) { - DataCell newCell = new DataCell + NormalCell newCell = new NormalCell { ParentRow = this }; @@ -208,11 +208,11 @@ public void AddCell(string cellContent) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// public void AddCell(MultilineText cellContent) { - DataCell newCell = new DataCell + NormalCell newCell = new NormalCell { ParentRow = this }; @@ -224,11 +224,11 @@ public void AddCell(MultilineText cellContent) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// public void AddCell(object cellContent) { - DataCell newCell = new DataCell + NormalCell newCell = new NormalCell { ParentRow = this }; @@ -240,10 +240,10 @@ public void AddCell(object cellContent) } /// - /// Returns the index of the specified cell or null if the instance - /// is not found in the current instance. + /// Returns the index of the specified cell or null if the instance + /// is not found in the current instance. /// - public int? IndexOfCell(DataCell cell) + public int? IndexOfCell(NormalCell cell) { int indexOfCell = cells.IndexOf(cell); return indexOfCell == -1 ? (int?)null : indexOfCell; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRowList.cs similarity index 80% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRowList.cs index 54239c25..3676be2f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRowList.cs @@ -27,13 +27,13 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables { /// - /// Contains the list of s displayed by the table. + /// Contains the list of s displayed by the table. /// - public class DataRowList : IEnumerable + public class NormalRowList : IEnumerable { private readonly DataGrid parentDataGrid; - private readonly List rows = new List(); + private readonly List rows = new List(); /// /// Gets the number of rows contained in the current instance. @@ -41,21 +41,21 @@ public class DataRowList : IEnumerable public int Count => rows.Count; /// - /// Gets the at the specified index. + /// Gets the at the specified index. /// If the index is outside of the bounds of the list, null is returned. /// - /// The index of the to return. - /// The at the specified index. - public DataRow this[int rowIndex] => rowIndex >= 0 && rowIndex < rows.Count + /// The index of the to return. + /// The at the specified index. + public NormalRow this[int rowIndex] => rowIndex >= 0 && rowIndex < rows.Count ? rows[rowIndex] : null; /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the that owns it. /// /// The that owns the new instance. - public DataRowList(DataGrid parentDataGrid) + public NormalRowList(DataGrid parentDataGrid) { this.parentDataGrid = parentDataGrid ?? throw new ArgumentNullException(nameof(parentDataGrid)); } @@ -65,7 +65,7 @@ public DataRowList(DataGrid parentDataGrid) /// /// The row to be added. /// - public void Add(DataRow row) + public void Add(NormalRow row) { if (row == null) throw new ArgumentNullException(nameof(row)); @@ -77,11 +77,11 @@ public void Add(DataRow row) /// Adds a new row to the current table. /// /// The list of cells of the new row. - public void Add(IEnumerable cells) + public void Add(IEnumerable cells) { if (cells == null) throw new ArgumentNullException(nameof(cells)); - DataRow row = new DataRow(cells) + NormalRow row = new NormalRow(cells) { ParentDataGrid = parentDataGrid }; @@ -92,11 +92,11 @@ public void Add(IEnumerable cells) /// Adds a new row to the current table. /// /// The list of cells of the new row. - public void Add(params DataCell[] cells) + public void Add(params NormalCell[] cells) { if (cells == null) throw new ArgumentNullException(nameof(cells)); - DataRow row = new DataRow(cells) + NormalRow row = new NormalRow(cells) { ParentDataGrid = parentDataGrid }; @@ -111,13 +111,13 @@ public void Add(IEnumerable cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + NormalRow row = new NormalRow { ParentDataGrid = parentDataGrid }; foreach (string text in cellContents) - row.AddCell(new DataCell(text)); + row.AddCell(new NormalCell(text)); rows.Add(row); } @@ -130,13 +130,13 @@ public void Add(params string[] cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + NormalRow row = new NormalRow { ParentDataGrid = parentDataGrid }; foreach (string text in cellContents) - row.AddCell(new DataCell(text)); + row.AddCell(new NormalCell(text)); rows.Add(row); } @@ -149,13 +149,13 @@ public void Add(IEnumerable cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + NormalRow row = new NormalRow { ParentDataGrid = parentDataGrid }; foreach (MultilineText text in cellContents) - row.AddCell(new DataCell(text)); + row.AddCell(new NormalCell(text)); rows.Add(row); } @@ -168,13 +168,13 @@ public void Add(params MultilineText[] cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + NormalRow row = new NormalRow { ParentDataGrid = parentDataGrid }; foreach (MultilineText text in cellContents) - row.AddCell(new DataCell(text)); + row.AddCell(new NormalCell(text)); rows.Add(row); } @@ -187,13 +187,13 @@ public void Add(IEnumerable cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + NormalRow row = new NormalRow { ParentDataGrid = parentDataGrid }; foreach (object cellContent in cellContents) - row.AddCell(new DataCell(cellContent)); + row.AddCell(new NormalCell(cellContent)); rows.Add(row); } @@ -206,13 +206,13 @@ public void Add(params object[] cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + NormalRow row = new NormalRow { ParentDataGrid = parentDataGrid }; foreach (object cellContent in cellContents) - row.AddCell(new DataCell(cellContent)); + row.AddCell(new NormalCell(cellContent)); rows.Add(row); } @@ -227,11 +227,11 @@ public void RemoveAt(int index) } /// - /// Removes the first occurrence of the instance from the list. + /// Removes the first occurrence of the instance from the list. /// /// true if item is successfully removed; otherwise, false. /// This method also returns false if item was not found in the list. - public bool Remove(DataRow row) + public bool Remove(NormalRow row) { return rows.Remove(row); } @@ -245,9 +245,9 @@ public void Clear() } /// - /// Returns an enumerator that iterates through the s contained by the current instance. + /// Returns an enumerator that iterates through the s contained by the current instance. /// - public IEnumerator GetEnumerator() + public IEnumerator GetEnumerator() { return rows.GetEnumerator(); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs index 0cb728ae..4150d2b3 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataDataSeparator.cs @@ -38,12 +38,12 @@ internal class DataDataSeparator public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = GenerateDataRowSeparatorBorder(columns); + borderText = GenerateNormalRowSeparatorBorder(columns); tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } - private string GenerateDataRowSeparatorBorder(List columns) + private string GenerateNormalRowSeparatorBorder(List columns) { StringBuilder sb = new StringBuilder(); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs index 40c4ab3e..717869cf 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs @@ -30,7 +30,7 @@ internal class DataGridX private TitleRowX titleRowX; private HeaderRowX headerRowX; - private readonly List dataRows = new List(); + private readonly List dataRows = new List(); private readonly List columns = new List(); private int actualWidth; @@ -64,10 +64,10 @@ public void AddHeaderRow(HeaderRowX headerRowX) headerRowX.UpdateColumnsWidths(columns); } - public void AddDataRow(DataRowX dataRowX) + public void AddNormalRow(NormalRowX normalRowX) { - dataRowX.UpdateColumnsWidths(columns); - dataRows.Add(dataRowX); + normalRowX.UpdateColumnsWidths(columns); + dataRows.Add(normalRowX); } public void CalculateLayout(int minWidth) @@ -144,16 +144,16 @@ private void RenderData(ITablePrinter tablePrinter) { DataTopBorder?.Render(tablePrinter, columns); - RenderDataRows(tablePrinter); + RenderNormalRows(tablePrinter); DataBottomBorder?.Render(tablePrinter, columns); } - private void RenderDataRows(ITablePrinter tablePrinter) + private void RenderNormalRows(ITablePrinter tablePrinter) { for (int rowIndex = 0; rowIndex < dataRows.Count; rowIndex++) { - DataRowX row = dataRows[rowIndex]; + NormalRowX row = dataRows[rowIndex]; row.Render(tablePrinter, columns); bool isLastRow = rowIndex == dataRows.Count - 1; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index 10e6e25d..064a9d89 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -29,13 +29,13 @@ internal class DataGridXBuilder private DataGridX dataGridX; private bool isTitleVisible; private bool isColumnHeaderRowVisible; - private bool areDataRowsVisible; + private bool areNormalRowsVisible; public TitleRow TitleRow { get; set; } public HeaderRow HeaderRow { get; set; } - public DataRowList Rows { get; set; } + public NormalRowList Rows { get; set; } public DataGridBorder DataGridBorder { get; set; } @@ -47,7 +47,7 @@ public DataGridX Build() isTitleVisible = TitleRow != null && TitleRow.IsVisible && TitleRow.HasContent; isColumnHeaderRowVisible = HeaderRow != null && HeaderRow.IsVisible && HeaderRow.CellCount > 0; - areDataRowsVisible = Rows.Count > 0; + areNormalRowsVisible = Rows.Count > 0; if (isTitleVisible) AddTitle(); @@ -55,7 +55,7 @@ public DataGridX Build() if (isColumnHeaderRowVisible) AddHeader(); - if (areDataRowsVisible) + if (areNormalRowsVisible) AddRows(); if (DataGridBorder?.IsVisible == true) @@ -80,12 +80,12 @@ private void AddHeader() private void AddRows() { - IEnumerable rows = Rows + IEnumerable rows = Rows .Where(x => x.IsVisible) - .Select(DataRowX.CreateFrom); + .Select(NormalRowX.CreateFrom); - foreach (DataRowX row in rows) - dataGridX.AddDataRow(row); + foreach (NormalRowX row in rows) + dataGridX.AddNormalRow(row); } private void AddHorizontalBorders() @@ -94,14 +94,14 @@ private void AddHorizontalBorders() dataGridX.TitleTopBorder = TitleTopBorder.CreateFrom(DataGridBorder); else if (isColumnHeaderRowVisible) dataGridX.HeaderTopBorder = HeaderTopBorder.CreateFrom(DataGridBorder); - else if (areDataRowsVisible) + else if (areNormalRowsVisible) dataGridX.DataTopBorder = DataTopBorder.CreateFrom(DataGridBorder); if (isTitleVisible) { if (isColumnHeaderRowVisible) dataGridX.TitleHeaderSeparator = TitleHeaderSeparator.CreateFrom(DataGridBorder); - else if (areDataRowsVisible) + else if (areNormalRowsVisible) dataGridX.TitleDataSeparator = TitleDataSeparator.CreateFrom(DataGridBorder); else dataGridX.TitleBottomBorder = TitleBottomBorder.CreateFrom(DataGridBorder); @@ -109,13 +109,13 @@ private void AddHorizontalBorders() if (isColumnHeaderRowVisible) { - if (areDataRowsVisible) + if (areNormalRowsVisible) dataGridX.HeaderDataSeparator = HeaderDataSeparator.CreateFrom(DataGridBorder); else dataGridX.HeaderBottomBorder = HeaderBottomBorder.CreateFrom(DataGridBorder); } - if (areDataRowsVisible) + if (areNormalRowsVisible) { if (DataGridBorder?.DisplayBorderBetweenRows == true) dataGridX.DataDataSeparator = DataDataSeparator.CreateFrom(DataGridBorder); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs index 9791eede..2b7cf57e 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderDataSeparator.cs @@ -38,12 +38,12 @@ internal class HeaderDataSeparator public void Render(ITablePrinter tablePrinter, List columns) { if (borderText == null) - borderText = GenerateDataRowSeparatorBorder(columns); + borderText = GenerateNormalRowSeparatorBorder(columns); tablePrinter.WriteLine(borderText, ForegroundColor, BackgroundColor); } - private string GenerateDataRowSeparatorBorder(List columns) + private string GenerateNormalRowSeparatorBorder(List columns) { StringBuilder sb = new StringBuilder(); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs index b7970c37..7e9c5306 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs @@ -57,18 +57,12 @@ private Size CalculatePreferredSize() return new Size(width, height); } - + public void Render(ITablePrinter tablePrinter, List cellWidths) { - //for (int i = 0; i < Cells.Count; i++) - //{ - // CellX cellX = Cells[i]; - // cellX.Size = new Size(cellWidths[i].Width, Size.Height); - //} - for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) { - DataGridBorderX.RenderRowLeftBorder(tablePrinter); + DataGridBorderX?.RenderRowLeftBorder(tablePrinter); for (int columnIndex = 0; columnIndex < Cells.Count; columnIndex++) { @@ -79,9 +73,9 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) bool isLastCell = columnIndex >= Cells.Count - 1; if (isLastCell) - DataGridBorderX.RenderRowRightBorder(tablePrinter); + DataGridBorderX?.RenderRowRightBorder(tablePrinter); else - DataGridBorderX.RenderRowInsideBorder(tablePrinter); + DataGridBorderX?.RenderRowInsideBorder(tablePrinter); } tablePrinter.WriteLine(); @@ -108,7 +102,7 @@ public static HeaderRowX CreateFrom(HeaderRow headerRow) HeaderRowX headerRowX = new HeaderRowX { - DataGridBorderX = headerRow.ParentDataGrid?.Border != null + DataGridBorderX = headerRow.ParentDataGrid?.Border?.IsVisible == true ? DataGridBorderX.CreateFrom(headerRow.ParentDataGrid.Border) : null, Cells = headerRow diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/NormalRowX.cs similarity index 82% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/NormalRowX.cs index f05bab1e..7f4a5bae 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/NormalRowX.cs @@ -25,7 +25,7 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { - internal class DataRowX + internal class NormalRowX { public Size Size { get; private set; } @@ -68,7 +68,7 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) { - DataGridBorderX.RenderRowLeftBorder(tablePrinter); + DataGridBorderX?.RenderRowLeftBorder(tablePrinter); for (int columnIndex = 0; columnIndex < Cells.Count; columnIndex++) { @@ -79,9 +79,9 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) bool isLastCell = columnIndex >= Cells.Count - 1; if (isLastCell) - DataGridBorderX.RenderRowRightBorder(tablePrinter); + DataGridBorderX?.RenderRowRightBorder(tablePrinter); else - DataGridBorderX.RenderRowInsideBorder(tablePrinter); + DataGridBorderX?.RenderRowInsideBorder(tablePrinter); } tablePrinter.WriteLine(); @@ -102,23 +102,23 @@ public void UpdateColumnsWidths(List columnsWidths) } } - public static DataRowX CreateFrom(DataRow dataRow) + public static NormalRowX CreateFrom(NormalRow normalRow) { - if (dataRow == null) throw new ArgumentNullException(nameof(dataRow)); + if (normalRow == null) throw new ArgumentNullException(nameof(normalRow)); - DataRowX dataRowX = new DataRowX + NormalRowX normalRowX = new NormalRowX { - DataGridBorderX = dataRow.ParentDataGrid?.Border != null - ? DataGridBorderX.CreateFrom(dataRow.ParentDataGrid.Border) + DataGridBorderX = normalRow.ParentDataGrid?.Border?.IsVisible == true + ? DataGridBorderX.CreateFrom(normalRow.ParentDataGrid.Border) : null, - Cells = dataRow + Cells = normalRow .Select(CellX.CreateFrom) .ToList() }; - dataRowX.CalculateLayout(); + normalRowX.CalculateLayout(); - return dataRowX; + return normalRowX; } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleOutput.cs b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleOutput.cs index 1c10d72c..5d01232b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleOutput.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleOutput.cs @@ -31,7 +31,7 @@ public ConsoleOutput() Console.SetOut(stringWriter); } - public string GetOuput() + public string GetOutput() { return stringWriter.ToString(); } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs index 65946a4a..15d2242b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs @@ -9,9 +9,9 @@ public class CalculatePaddingLeftTests [Test] public void HavingCellWithNoPadding_WhenCalculatingPaddingLeft_ThenPaddingLeftIs1() { - DataCell dataCell = new DataCell(); + NormalCell normalCell = new NormalCell(); - int actual = dataCell.CalculatePaddingLeft(); + int actual = normalCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(1)); } @@ -19,12 +19,12 @@ public void HavingCellWithNoPadding_WhenCalculatingPaddingLeft_ThenPaddingLeftIs [Test] public void HavingCellWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() { - DataCell dataCell = new DataCell + NormalCell normalCell = new NormalCell { PaddingLeft = 5 }; - int actual = dataCell.CalculatePaddingLeft(); + int actual = normalCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(5)); } @@ -32,14 +32,14 @@ public void HavingCellWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLef [Test] public void HavingRowWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() { - DataCell dataCell = new DataCell(); - DataRow dataRow = new DataRow + NormalCell normalCell = new NormalCell(); + NormalRow normalRow = new NormalRow { CellPaddingLeft = 5 }; - dataRow.AddCell(dataCell); + normalRow.AddCell(normalCell); - int actual = dataCell.CalculatePaddingLeft(); + int actual = normalCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(5)); } @@ -47,18 +47,18 @@ public void HavingRowWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeft [Test] public void HavingDataGridWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() { - DataCell dataCell = new DataCell(); + NormalCell normalCell = new NormalCell(); - DataRow dataRow = new DataRow(); - dataRow.AddCell(dataCell); + NormalRow normalRow = new NormalRow(); + normalRow.AddCell(normalCell); DataGrid dataGrid = new DataGrid { CellPaddingLeft = 5 }; - dataGrid.Rows.Add(dataRow); + dataGrid.Rows.Add(normalRow); - int actual = dataCell.CalculatePaddingLeft(); + int actual = normalCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(5)); } @@ -66,13 +66,13 @@ public void HavingDataGridWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddin [Test] public void HavingColumnWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() { - DataCell dataCell = new DataCell(); + NormalCell normalCell = new NormalCell(); - DataRow dataRow = new DataRow(); - dataRow.AddCell(dataCell); + NormalRow normalRow = new NormalRow(); + normalRow.AddCell(normalCell); DataGrid dataGrid = new DataGrid(); - dataGrid.Rows.Add(dataRow); + dataGrid.Rows.Add(normalRow); Column column = new Column { @@ -80,7 +80,7 @@ public void HavingColumnWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingL }; dataGrid.Columns.Add(column); - int actual = dataCell.CalculatePaddingLeft(); + int actual = normalCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(5)); } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs index fd41d7ee..d66cc6a6 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs @@ -9,9 +9,9 @@ public class CalculatePaddingRightRight [Test] public void HavingCellWithNoPadding_WhenCalculatingPaddingRight_ThenPaddingRightIs1() { - DataCell dataCell = new DataCell(); + NormalCell normalCell = new NormalCell(); - int actual = dataCell.CalculatePaddingRight(); + int actual = normalCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(1)); } @@ -19,12 +19,12 @@ public void HavingCellWithNoPadding_WhenCalculatingPaddingRight_ThenPaddingRight [Test] public void HavingCellWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() { - DataCell dataCell = new DataCell + NormalCell normalCell = new NormalCell { PaddingRight = 5 }; - int actual = dataCell.CalculatePaddingRight(); + int actual = normalCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(5)); } @@ -32,14 +32,14 @@ public void HavingCellWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingR [Test] public void HavingRowWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() { - DataCell dataCell = new DataCell(); - DataRow dataRow = new DataRow + NormalCell normalCell = new NormalCell(); + NormalRow normalRow = new NormalRow { CellPaddingRight = 5 }; - dataRow.AddCell(dataCell); + normalRow.AddCell(normalCell); - int actual = dataCell.CalculatePaddingRight(); + int actual = normalCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(5)); } @@ -47,18 +47,18 @@ public void HavingRowWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRi [Test] public void HavingDataGridWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() { - DataCell dataCell = new DataCell(); + NormalCell normalCell = new NormalCell(); - DataRow dataRow = new DataRow(); - dataRow.AddCell(dataCell); + NormalRow normalRow = new NormalRow(); + normalRow.AddCell(normalCell); DataGrid dataGrid = new DataGrid { CellPaddingRight = 5 }; - dataGrid.Rows.Add(dataRow); + dataGrid.Rows.Add(normalRow); - int actual = dataCell.CalculatePaddingRight(); + int actual = normalCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(5)); } @@ -66,13 +66,13 @@ public void HavingDataGridWithPaddingRight5_WhenCalculatingPaddingRight_ThenPadd [Test] public void HavingColumnWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() { - DataCell dataCell = new DataCell(); + NormalCell normalCell = new NormalCell(); - DataRow dataRow = new DataRow(); - dataRow.AddCell(dataCell); + NormalRow normalRow = new NormalRow(); + normalRow.AddCell(normalCell); DataGrid dataGrid = new DataGrid(); - dataGrid.Rows.Add(dataRow); + dataGrid.Rows.Add(normalRow); Column column = new Column { @@ -80,7 +80,7 @@ public void HavingColumnWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddin }; dataGrid.Columns.Add(column); - int actual = dataCell.CalculatePaddingRight(); + int actual = normalCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(5)); } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs index c9a7525c..d8004a54 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs @@ -22,31 +22,31 @@ namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests [TestFixture] public class ConstructorMultilineTextAndAlignmentTests { - private DataCell dataCell; + private NormalCell normalCell; [SetUp] public void SetUp() { MultilineText multilineText = new MultilineText("some content"); - dataCell = new DataCell(multilineText, HorizontalAlignment.Center); + normalCell = new NormalCell(multilineText, HorizontalAlignment.Center); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); + Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("some content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(dataCell.IsEmpty, Is.False); + Assert.That(normalCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Center() { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); + Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs index 63ae82ff..39db3b0b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs @@ -22,31 +22,31 @@ namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests [TestFixture] public class ConstructorMultilineTextTests { - private DataCell dataCell; + private NormalCell normalCell; [SetUp] public void SetUp() { MultilineText multilineText = new MultilineText("some content"); - dataCell = new DataCell(multilineText); + normalCell = new NormalCell(multilineText); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); + Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("some content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(dataCell.IsEmpty, Is.False); + Assert.That(normalCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Default() { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs index 5b64d918..2dea9e76 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs @@ -22,30 +22,30 @@ namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests [TestFixture] public class ConstructorNoParamsTests { - private DataCell dataCell; + private NormalCell normalCell; [SetUp] public void SetUp() { - dataCell = new DataCell(); + normalCell = new NormalCell(); } [Test] public void Content_is_empty() { - Assert.That(dataCell.Content, Is.SameAs(MultilineText.Empty)); + Assert.That(normalCell.Content, Is.SameAs(MultilineText.Empty)); } [Test] public void IsEmpty_is_true() { - Assert.That(dataCell.IsEmpty, Is.True); + Assert.That(normalCell.IsEmpty, Is.True); } [Test] public void HorizontalAlignment_is_Default() { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs index 8e33e7fb..8a614f35 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs @@ -22,7 +22,7 @@ namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests [TestFixture] public class ConstructorObjectAndAlignmentTests { - private DataCell dataCell; + private NormalCell normalCell; private class Content { @@ -36,25 +36,25 @@ public override string ToString() public void SetUp() { Content content = new Content(); - dataCell = new DataCell(content, HorizontalAlignment.Center); + normalCell = new NormalCell(content, HorizontalAlignment.Center); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("content"))); + Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(dataCell.IsEmpty, Is.False); + Assert.That(normalCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Center() { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); + Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs index 20abd18b..4eab9082 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs @@ -22,7 +22,7 @@ namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests [TestFixture] public class ConstructorObjectTests { - private DataCell dataCell; + private NormalCell normalCell; private class Content { @@ -36,25 +36,25 @@ public override string ToString() public void SetUp() { Content content = new Content(); - dataCell = new DataCell(content); + normalCell = new NormalCell(content); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("content"))); + Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(dataCell.IsEmpty, Is.False); + Assert.That(normalCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Default() { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs index a85c9b52..07444517 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs @@ -22,30 +22,30 @@ namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests [TestFixture] public class ConstructorStringAndAlignmentTests { - private DataCell dataCell; + private NormalCell normalCell; [SetUp] public void SetUp() { - dataCell = new DataCell("some content", HorizontalAlignment.Center); + normalCell = new NormalCell("some content", HorizontalAlignment.Center); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); + Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("some content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(dataCell.IsEmpty, Is.False); + Assert.That(normalCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Center() { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); + Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs index 53e43332..b59224fd 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs @@ -22,30 +22,30 @@ namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests [TestFixture] public class ConstructorStringTests { - private DataCell dataCell; + private NormalCell normalCell; [SetUp] public void SetUp() { - dataCell = new DataCell("some content"); + normalCell = new NormalCell("some content"); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); + Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("some content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(dataCell.IsEmpty, Is.False); + Assert.That(normalCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Default() { - Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellsTests.cs deleted file mode 100644 index 6a746778..00000000 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellsTests.cs +++ /dev/null @@ -1,74 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using System.Collections.Generic; -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests -{ - [TestFixture] - public class AddCellsTests - { - private DataGrid dataGrid; - private DataRowList dataRowList; - - [SetUp] - public void SetUp() - { - dataGrid = new DataGrid(); - dataRowList = new DataRowList(dataGrid); - } - - [Test] - public void HavingAnEmptyDataRowList_WhenThreeCellsAreAdded_ThenRowCountIs1() - { - DataCell dataCell1 = new DataCell(); - DataCell dataCell2 = new DataCell(); - DataCell dataCell3 = new DataCell(); - - dataRowList.Add(dataCell1, dataCell2, dataCell3); - - Assert.That(dataRowList.Count, Is.EqualTo(1)); - } - - [Test] - public void HavingAnEmptyDataRowList_WhenThreeCellsAreAdded_ThenRowContainsTheThreeCells() - { - DataCell dataCell1 = new DataCell(); - DataCell dataCell2 = new DataCell(); - DataCell dataCell3 = new DataCell(); - - dataRowList.Add(dataCell1, dataCell2, dataCell3); - - List expected = new List - { - dataCell1, - dataCell2, - dataCell3 - }; - Assert.That(dataRowList[0], Is.EqualTo(expected)); - } - - [Test] - public void HavingAnEmptyDataRowList_WhenNullDataCellIsAdded_ThenRowContainsEmptyCell() - { - dataRowList.Add((DataCell)null); - - Assert.That(dataRowList[0][0].IsEmpty, Is.True); - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ClearTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ClearTests.cs deleted file mode 100644 index 8b38f14e..00000000 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ClearTests.cs +++ /dev/null @@ -1,48 +0,0 @@ -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests -{ - [TestFixture] - public class ClearTests - { - private DataGrid dataGrid; - private DataRowList dataRowList; - - [SetUp] - public void SetUp() - { - dataGrid = new DataGrid(); - dataRowList = new DataRowList(dataGrid); - } - - [Test] - public void HavingAnEmptyDataRowList_WhenClear_ThenCountIs0() - { - dataRowList.Clear(); - - Assert.That(dataRowList.Count, Is.EqualTo(0)); - } - - [Test] - public void HavingADataRowListWithOneRow_WhenClear_ThenCountIs0() - { - dataRowList.Add(new DataRow()); - - dataRowList.Clear(); - - Assert.That(dataRowList.Count, Is.EqualTo(0)); - } - - [Test] - public void HavingADataRowListWithTwoRows_WhenClear_ThenCountIs0() - { - dataRowList.Add(new DataRow()); - dataRowList.Add(new DataRow()); - - dataRowList.Clear(); - - Assert.That(dataRowList.Count, Is.EqualTo(0)); - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveAtTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveAtTests.cs deleted file mode 100644 index 1984793f..00000000 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveAtTests.cs +++ /dev/null @@ -1,82 +0,0 @@ -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests -{ - [TestFixture] - public class RemoveAtTests - { - private DataGrid dataGrid; - private DataRowList dataRowList; - - [SetUp] - public void SetUp() - { - dataGrid = new DataGrid(); - dataRowList = new DataRowList(dataGrid); - } - - [Test] - public void HavingADataRowListWithOneRow_WhenRemoveTheRow_ThenCountIs0() - { - DataRow dataRow = new DataRow("value 1"); - dataRowList.Add(dataRow); - - dataRowList.RemoveAt(0); - - Assert.That(dataRowList.Count, Is.EqualTo(0)); - } - - [Test] - public void HavingADataRowListWithTwoRows_WhenRemoveFirstRow_ThenCountIs1() - { - DataRow dataRow1 = new DataRow("value 1"); - DataRow dataRow2 = new DataRow("value 2"); - dataRowList.Add(dataRow1); - dataRowList.Add(dataRow2); - - dataRowList.RemoveAt(0); - - Assert.That(dataRowList.Count, Is.EqualTo(1)); - } - - [Test] - public void HavingADataRowListWithTwoRows_WhenRemoveFirstRow_ThenSecondRowIsStillInList() - { - DataRow dataRow1 = new DataRow("value 1"); - DataRow dataRow2 = new DataRow("value 2"); - dataRowList.Add(dataRow1); - dataRowList.Add(dataRow2); - - dataRowList.RemoveAt(0); - - Assert.That(dataRowList[0], Is.EqualTo(dataRow2)); - } - - [Test] - public void HavingADataRowListWithTwoRows_WhenRemoveSecondRow_ThenCountIs1() - { - DataRow dataRow1 = new DataRow("value 1"); - DataRow dataRow2 = new DataRow("value 2"); - dataRowList.Add(dataRow1); - dataRowList.Add(dataRow2); - - dataRowList.RemoveAt(1); - - Assert.That(dataRowList.Count, Is.EqualTo(1)); - } - - [Test] - public void HavingADataRowListWithTwoRows_WhenRemoveSecondRow_ThenFirstRowIsStillInList() - { - DataRow dataRow1 = new DataRow("value 1"); - DataRow dataRow2 = new DataRow("value 2"); - dataRowList.Add(dataRow1); - dataRowList.Add(dataRow2); - - dataRowList.RemoveAt(1); - - Assert.That(dataRowList[0], Is.EqualTo(dataRow1)); - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveTests.cs deleted file mode 100644 index fac72bc8..00000000 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/RemoveTests.cs +++ /dev/null @@ -1,82 +0,0 @@ -using DustInTheWind.ConsoleTools.Controls.Tables; -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests -{ - [TestFixture] - public class RemoveTests - { - private DataGrid dataGrid; - private DataRowList dataRowList; - - [SetUp] - public void SetUp() - { - dataGrid = new DataGrid(); - dataRowList = new DataRowList(dataGrid); - } - - [Test] - public void HavingADataRowListWithOneRow_WhenRemoveTheRow_ThenCountIs0() - { - DataRow dataRow = new DataRow("value 1"); - dataRowList.Add(dataRow); - - dataRowList.Remove(dataRow); - - Assert.That(dataRowList.Count, Is.EqualTo(0)); - } - - [Test] - public void HavingADataRowListWithTwoRows_WhenRemoveFirstRow_ThenCountIs1() - { - DataRow dataRow1 = new DataRow("value 1"); - DataRow dataRow2 = new DataRow("value 2"); - dataRowList.Add(dataRow1); - dataRowList.Add(dataRow2); - - dataRowList.Remove(dataRow1); - - Assert.That(dataRowList.Count, Is.EqualTo(1)); - } - - [Test] - public void HavingADataRowListWithTwoRows_WhenRemoveFirstRow_ThenSecondRowIsStillInList() - { - DataRow dataRow1 = new DataRow("value 1"); - DataRow dataRow2 = new DataRow("value 2"); - dataRowList.Add(dataRow1); - dataRowList.Add(dataRow2); - - dataRowList.Remove(dataRow1); - - Assert.That(dataRowList[0], Is.EqualTo(dataRow2)); - } - - [Test] - public void HavingADataRowListWithTwoRows_WhenRemoveSecondRow_ThenCountIs1() - { - DataRow dataRow1 = new DataRow("value 1"); - DataRow dataRow2 = new DataRow("value 2"); - dataRowList.Add(dataRow1); - dataRowList.Add(dataRow2); - - dataRowList.Remove(dataRow2); - - Assert.That(dataRowList.Count, Is.EqualTo(1)); - } - - [Test] - public void HavingADataRowListWithTwoRows_WhenRemoveSecondRow_ThenFirstRowIsStillInList() - { - DataRow dataRow1 = new DataRow("value 1"); - DataRow dataRow2 = new DataRow("value 2"); - dataRowList.Add(dataRow1); - dataRowList.Add(dataRow2); - - dataRowList.Remove(dataRow2); - - Assert.That(dataRowList[0], Is.EqualTo(dataRow1)); - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellEnumerationTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellEnumerationTests.cs similarity index 55% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellEnumerationTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellEnumerationTests.cs index db6c6eca..efb2302b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddCellEnumerationTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellEnumerationTests.cs @@ -19,57 +19,57 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests { [TestFixture] public class AddCellEnumerationTests { private DataGrid dataGrid; - private DataRowList dataRowList; + private NormalRowList normalRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - dataRowList = new DataRowList(dataGrid); + normalRowList = new NormalRowList(dataGrid); } [Test] - public void HavingAnEmptyDataRowList_WhenThreeCellsAreAdded_ThenRowCountIs1() + public void HavingAnEmptyNormalRowList_WhenThreeCellsAreAdded_ThenRowCountIs1() { - IEnumerable cells = new List + IEnumerable cells = new List { - new DataCell(), - new DataCell(), - new DataCell() + new NormalCell(), + new NormalCell(), + new NormalCell() }; - dataRowList.Add(cells); + normalRowList.Add(cells); - Assert.That(dataRowList.Count, Is.EqualTo(1)); + Assert.That(normalRowList.Count, Is.EqualTo(1)); } [Test] - public void HavingAnEmptyDataRowList_WhenThreeCellsAreAdded_ThenRowContainsTheThreeCells() + public void HavingAnEmptyNormalRowList_WhenThreeCellsAreAdded_ThenRowContainsTheThreeCells() { - IEnumerable cells = new List + IEnumerable cells = new List { - new DataCell(), - new DataCell(), - new DataCell() + new NormalCell(), + new NormalCell(), + new NormalCell() }; - dataRowList.Add(cells); + normalRowList.Add(cells); - Assert.That(dataRowList[0], Is.EqualTo(cells)); + Assert.That(normalRowList[0], Is.EqualTo(cells)); } [Test] - public void HavingAnEmptyDataRowList_WhenNullDataCellEnumerationIsAdded_ThenThrows() + public void HavingAnEmptyNormalRowList_WhenNullDataCellEnumerationIsAdded_ThenThrows() { Assert.Throws(() => { - dataRowList.Add((List)null); + normalRowList.Add((List)null); }); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellsTests.cs new file mode 100644 index 00000000..ebaca461 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellsTests.cs @@ -0,0 +1,74 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +{ + [TestFixture] + public class AddCellsTests + { + private DataGrid dataGrid; + private NormalRowList normalRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + normalRowList = new NormalRowList(dataGrid); + } + + [Test] + public void HavingAnEmptyNormalRowList_WhenThreeCellsAreAdded_ThenRowCountIs1() + { + NormalCell normalCell1 = new NormalCell(); + NormalCell normalCell2 = new NormalCell(); + NormalCell normalCell3 = new NormalCell(); + + normalRowList.Add(normalCell1, normalCell2, normalCell3); + + Assert.That(normalRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingAnEmptyNormalRowList_WhenThreeCellsAreAdded_ThenRowContainsTheThreeCells() + { + NormalCell normalCell1 = new NormalCell(); + NormalCell normalCell2 = new NormalCell(); + NormalCell normalCell3 = new NormalCell(); + + normalRowList.Add(normalCell1, normalCell2, normalCell3); + + List expected = new List + { + normalCell1, + normalCell2, + normalCell3 + }; + Assert.That(normalRowList[0], Is.EqualTo(expected)); + } + + [Test] + public void HavingAnEmptyNormalRowList_WhenNullDataCellIsAdded_ThenRowContainsEmptyCell() + { + normalRowList.Add((NormalCell)null); + + Assert.That(normalRowList[0][0].IsEmpty, Is.True); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddDataRowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddNormalRowTests.cs similarity index 52% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddDataRowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddNormalRowTests.cs index a38def55..6c8c1d43 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddDataRowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddNormalRowTests.cs @@ -18,57 +18,57 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests { [TestFixture] - public class AddDataRowTests + public class AddNormalRowTests { private DataGrid dataGrid; - private DataRowList dataRowList; + private NormalRowList normalRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - dataRowList = new DataRowList(dataGrid); + normalRowList = new NormalRowList(dataGrid); } [Test] - public void HavingAnEmptyDataRowList_WhenOneDataRowIsAdded_ThenRowCountIs1() + public void HavingAnEmptyNormalRowList_WhenOneNormalRowIsAdded_ThenRowCountIs1() { - DataRow dataRow = new DataRow(); + NormalRow normalRow = new NormalRow(); - dataRowList.Add(dataRow); + normalRowList.Add(normalRow); - Assert.That(dataRowList.Count, Is.EqualTo(1)); + Assert.That(normalRowList.Count, Is.EqualTo(1)); } [Test] - public void HavingAnEmptyDataRowList_WhenOneDataRowIsAdded_ThenListContainsTheDataRow() + public void HavingAnEmptyNormalRowList_WhenOneNormalRowIsAdded_ThenListContainsTheNormalRow() { - DataRow dataRow = new DataRow(); + NormalRow normalRow = new NormalRow(); - dataRowList.Add(dataRow); + normalRowList.Add(normalRow); - Assert.That(dataRowList[0], Is.SameAs(dataRow)); + Assert.That(normalRowList[0], Is.SameAs(normalRow)); } [Test] - public void HavingAnEmptyDataRowList_WhenOneDataRowIsAdded_ThenDataGridIsSetToDataRow() + public void HavingAnEmptyNormalRowList_WhenOneNormalRowIsAdded_ThenDataGridIsSetToNormalRow() { - DataRow dataRow = new DataRow(); + NormalRow normalRow = new NormalRow(); - dataRowList.Add(dataRow); + normalRowList.Add(normalRow); - Assert.That(dataRow.ParentDataGrid, Is.SameAs(dataGrid)); + Assert.That(normalRow.ParentDataGrid, Is.SameAs(dataGrid)); } [Test] - public void HavingAnEmptyDataRowList_WhenNullDataRowIsAdded_ThenThrows() + public void HavingAnEmptyNormalRowList_WhenNullNormalRowIsAdded_ThenThrows() { Assert.Throws(() => { - dataRowList.Add((DataRow)null); + normalRowList.Add((NormalRow)null); }); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringEnumerationTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringEnumerationTests.cs similarity index 69% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringEnumerationTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringEnumerationTests.cs index 154a88dc..24fcba59 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringEnumerationTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringEnumerationTests.cs @@ -20,55 +20,55 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests { [TestFixture] public class AddStringEnumerationTests { private DataGrid dataGrid; - private DataRowList dataRowList; + private NormalRowList normalRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - dataRowList = new DataRowList(dataGrid); + normalRowList = new NormalRowList(dataGrid); } [Test] - public void HavingAnEmptyDataRowList_WhenThreeStringsAreAdded_ThenRowCountIs1() + public void HavingAnEmptyNormalRowList_WhenThreeStringsAreAdded_ThenRowCountIs1() { IEnumerable values = new List { "value 1", "value 2", "value 3" }; - dataRowList.Add(values); + normalRowList.Add(values); - Assert.That(dataRowList.Count, Is.EqualTo(1)); + Assert.That(normalRowList.Count, Is.EqualTo(1)); } [Test] - public void HavingAnEmptyDataRowList_WhenThreeStringsAreAdded_ThenRowContainsThreeCellsWithCorrectValues() + public void HavingAnEmptyNormalRowList_WhenThreeStringsAreAdded_ThenRowContainsThreeCellsWithCorrectValues() { IEnumerable values = new List { "value 1", "value 2", "value 3" }; - dataRowList.Add(values); + normalRowList.Add(values); - IEnumerable actual = dataRowList[0] + IEnumerable actual = normalRowList[0] .Select(x => x.Content.ToString()); Assert.That(actual, Is.EqualTo(values)); } [Test] - public void HavingAnEmptyDataRowList_WhenNullStringEnumerationIsAdded_ThenThrows() + public void HavingAnEmptyNormalRowList_WhenNullStringEnumerationIsAdded_ThenThrows() { Assert.Throws(() => { - dataRowList.Add((IEnumerable)null); + normalRowList.Add((IEnumerable)null); }); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringsTests.cs similarity index 62% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringsTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringsTests.cs index 2144e19a..eb0f5431 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/AddStringsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringsTests.cs @@ -19,35 +19,35 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests { [TestFixture] public class AddStringsTests { private DataGrid dataGrid; - private DataRowList dataRowList; + private NormalRowList normalRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - dataRowList = new DataRowList(dataGrid); + normalRowList = new NormalRowList(dataGrid); } [Test] - public void HavingAnEmptyDataRowList_WhenThreeStringsAreAdded_ThenRowCountIs1() + public void HavingAnEmptyNormalRowList_WhenThreeStringsAreAdded_ThenRowCountIs1() { - dataRowList.Add("value 1", "value 2", "value 3"); + normalRowList.Add("value 1", "value 2", "value 3"); - Assert.That(dataRowList.Count, Is.EqualTo(1)); + Assert.That(normalRowList.Count, Is.EqualTo(1)); } [Test] - public void HavingAnEmptyDataRowList_WhenThreeStringsAreAdded_ThenRowContainsThreeCellsWithCorrectValues() + public void HavingAnEmptyNormalRowList_WhenThreeStringsAreAdded_ThenRowContainsThreeCellsWithCorrectValues() { - dataRowList.Add("value 1", "value 2", "value 3"); + normalRowList.Add("value 1", "value 2", "value 3"); - IEnumerable actual = dataRowList[0] + IEnumerable actual = normalRowList[0] .Select(x => x.Content.ToString()); IEnumerable expected = new List { @@ -58,11 +58,11 @@ public void HavingAnEmptyDataRowList_WhenThreeStringsAreAdded_ThenRowContainsThr } [Test] - public void HavingAnEmptyDataRowList_WhenNullStringIsAdded_ThenRowContainsEmptyCell() + public void HavingAnEmptyNormalRowList_WhenNullStringIsAdded_ThenRowContainsEmptyCell() { - dataRowList.Add((string)null); + normalRowList.Add((string)null); - Assert.That(dataRowList[0][0].IsEmpty, Is.True); + Assert.That(normalRowList[0][0].IsEmpty, Is.True); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ClearTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ClearTests.cs new file mode 100644 index 00000000..5a17da22 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ClearTests.cs @@ -0,0 +1,64 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +{ + [TestFixture] + public class ClearTests + { + private DataGrid dataGrid; + private NormalRowList normalRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + normalRowList = new NormalRowList(dataGrid); + } + + [Test] + public void HavingAnEmptyNormalRowList_WhenClear_ThenCountIs0() + { + normalRowList.Clear(); + + Assert.That(normalRowList.Count, Is.EqualTo(0)); + } + + [Test] + public void HavingANormalRowListWithOneRow_WhenClear_ThenCountIs0() + { + normalRowList.Add(new NormalRow()); + + normalRowList.Clear(); + + Assert.That(normalRowList.Count, Is.EqualTo(0)); + } + + [Test] + public void HavingANormalRowListWithTwoRows_WhenClear_ThenCountIs0() + { + normalRowList.Add(new NormalRow()); + normalRowList.Add(new NormalRow()); + + normalRowList.Clear(); + + Assert.That(normalRowList.Count, Is.EqualTo(0)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ConstructorTests.cs similarity index 73% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ConstructorTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ConstructorTests.cs index 6032188e..b7c3faf7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataRowListTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ConstructorTests.cs @@ -18,26 +18,26 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests { [TestFixture] public class ConstructorTests { [Test] - public void HavingNullDataGrid_WhenDataRowListIsInstantiated_ThenThrows() + public void HavingNullDataGrid_WhenNormalRowListIsInstantiated_ThenThrows() { Assert.Throws(() => { - DataRowList dataRowList = new DataRowList(null); + NormalRowList normalRowList = new NormalRowList(null); }); } [Test] - public void HavingValidDataGrid_WhenDataRowListIsInstantiated_ThenSuccess() + public void HavingValidDataGrid_WhenNormalRowListIsInstantiated_ThenSuccess() { DataGrid dataGrid = new DataGrid(); - DataRowList dataRowList = new DataRowList(dataGrid); + NormalRowList normalRowList = new NormalRowList(dataGrid); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveAtTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveAtTests.cs new file mode 100644 index 00000000..942af9a5 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveAtTests.cs @@ -0,0 +1,98 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +{ + [TestFixture] + public class RemoveAtTests + { + private DataGrid dataGrid; + private NormalRowList normalRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + normalRowList = new NormalRowList(dataGrid); + } + + [Test] + public void HavingANormalRowListWithOneRow_WhenRemoveTheRow_ThenCountIs0() + { + NormalRow normalRow = new NormalRow("value 1"); + normalRowList.Add(normalRow); + + normalRowList.RemoveAt(0); + + Assert.That(normalRowList.Count, Is.EqualTo(0)); + } + + [Test] + public void HavingANormalRowListWithTwoRows_WhenRemoveFirstRow_ThenCountIs1() + { + NormalRow normalRow1 = new NormalRow("value 1"); + NormalRow normalRow2 = new NormalRow("value 2"); + normalRowList.Add(normalRow1); + normalRowList.Add(normalRow2); + + normalRowList.RemoveAt(0); + + Assert.That(normalRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingANormalRowListWithTwoRows_WhenRemoveFirstRow_ThenSecondRowIsStillInList() + { + NormalRow normalRow1 = new NormalRow("value 1"); + NormalRow normalRow2 = new NormalRow("value 2"); + normalRowList.Add(normalRow1); + normalRowList.Add(normalRow2); + + normalRowList.RemoveAt(0); + + Assert.That(normalRowList[0], Is.EqualTo(normalRow2)); + } + + [Test] + public void HavingANormalRowListWithTwoRows_WhenRemoveSecondRow_ThenCountIs1() + { + NormalRow normalRow1 = new NormalRow("value 1"); + NormalRow normalRow2 = new NormalRow("value 2"); + normalRowList.Add(normalRow1); + normalRowList.Add(normalRow2); + + normalRowList.RemoveAt(1); + + Assert.That(normalRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingANormalRowListWithTwoRows_WhenRemoveSecondRow_ThenFirstRowIsStillInList() + { + NormalRow normalRow1 = new NormalRow("value 1"); + NormalRow normalRow2 = new NormalRow("value 2"); + normalRowList.Add(normalRow1); + normalRowList.Add(normalRow2); + + normalRowList.RemoveAt(1); + + Assert.That(normalRowList[0], Is.EqualTo(normalRow1)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveTests.cs new file mode 100644 index 00000000..bdf685c8 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveTests.cs @@ -0,0 +1,98 @@ +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using DustInTheWind.ConsoleTools.Controls.Tables; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +{ + [TestFixture] + public class RemoveTests + { + private DataGrid dataGrid; + private NormalRowList normalRowList; + + [SetUp] + public void SetUp() + { + dataGrid = new DataGrid(); + normalRowList = new NormalRowList(dataGrid); + } + + [Test] + public void HavingANormalRowListWithOneRow_WhenRemoveTheRow_ThenCountIs0() + { + NormalRow normalRow = new NormalRow("value 1"); + normalRowList.Add(normalRow); + + normalRowList.Remove(normalRow); + + Assert.That(normalRowList.Count, Is.EqualTo(0)); + } + + [Test] + public void HavingANormalRowListWithTwoRows_WhenRemoveFirstRow_ThenCountIs1() + { + NormalRow normalRow1 = new NormalRow("value 1"); + NormalRow normalRow2 = new NormalRow("value 2"); + normalRowList.Add(normalRow1); + normalRowList.Add(normalRow2); + + normalRowList.Remove(normalRow1); + + Assert.That(normalRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingANormalRowListWithTwoRows_WhenRemoveFirstRow_ThenSecondRowIsStillInList() + { + NormalRow normalRow1 = new NormalRow("value 1"); + NormalRow normalRow2 = new NormalRow("value 2"); + normalRowList.Add(normalRow1); + normalRowList.Add(normalRow2); + + normalRowList.Remove(normalRow1); + + Assert.That(normalRowList[0], Is.EqualTo(normalRow2)); + } + + [Test] + public void HavingANormalRowListWithTwoRows_WhenRemoveSecondRow_ThenCountIs1() + { + NormalRow normalRow1 = new NormalRow("value 1"); + NormalRow normalRow2 = new NormalRow("value 2"); + normalRowList.Add(normalRow1); + normalRowList.Add(normalRow2); + + normalRowList.Remove(normalRow2); + + Assert.That(normalRowList.Count, Is.EqualTo(1)); + } + + [Test] + public void HavingANormalRowListWithTwoRows_WhenRemoveSecondRow_ThenFirstRowIsStillInList() + { + NormalRow normalRow1 = new NormalRow("value 1"); + NormalRow normalRow2 = new NormalRow("value 2"); + normalRowList.Add(normalRow1); + normalRowList.Add(normalRow2); + + normalRowList.Remove(normalRow2); + + Assert.That(normalRowList[0], Is.EqualTo(normalRow1)); + } + } +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs index 6907cce8..d3a1df39 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs @@ -25,11 +25,11 @@ public class RowTests [Test] public void Constructor_sets_ParentRow_for_each_cell() { - DataCell cell0 = new DataCell("cell content"); - DataCell cell1 = new DataCell("cell content"); - DataCell cell2 = new DataCell("cell content"); + NormalCell cell0 = new NormalCell("cell content"); + NormalCell cell1 = new NormalCell("cell content"); + NormalCell cell2 = new NormalCell("cell content"); - DataRow row = new DataRow(cell0, cell1, cell2); + NormalRow row = new NormalRow(cell0, cell1, cell2); Assert.That(cell0.ParentRow, Is.SameAs(row)); Assert.That(cell1.ParentRow, Is.SameAs(row)); @@ -39,11 +39,11 @@ public void Constructor_sets_ParentRow_for_each_cell() [Test] public void Constructor_keeps_the_received_Cell_instances() { - DataCell cell0 = new DataCell("cell content"); - DataCell cell1 = new DataCell("cell content"); - DataCell cell2 = new DataCell("cell content"); + NormalCell cell0 = new NormalCell("cell content"); + NormalCell cell1 = new NormalCell("cell content"); + NormalCell cell2 = new NormalCell("cell content"); - DataRow row = new DataRow(cell0, cell1, cell2); + NormalRow row = new NormalRow(cell0, cell1, cell2); Assert.That(row[0], Is.SameAs(cell0)); Assert.That(row[1], Is.SameAs(cell1)); @@ -53,12 +53,12 @@ public void Constructor_keeps_the_received_Cell_instances() [Test] public void Constructor_created_empty_Cell_if_one_item_is_null() { - DataCell cell0 = new DataCell("cell content"); - DataCell cell2 = new DataCell("cell content"); + NormalCell cell0 = new NormalCell("cell content"); + NormalCell cell2 = new NormalCell("cell content"); - DataRow row = new DataRow(cell0, null, cell2); + NormalRow row = new NormalRow(cell0, null, cell2); - Assert.That(row[1], Is.InstanceOf()); + Assert.That(row[1], Is.InstanceOf()); Assert.That(row[1].IsEmpty, Is.True); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs index cc48bd0b..291f3fd3 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs @@ -72,7 +72,7 @@ public void column_0_is_aligned_to_Right_and_cell_1_0_is_aligned_to_Left() dataGrid.Columns.Add(column2); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); + dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs index 4284629f..ac3048eb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs @@ -111,7 +111,7 @@ public void cell_1_1_is_alignment_Default_at_cell_creation() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Default), "1,1", "1,2" }); + dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Default), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = @@ -132,7 +132,7 @@ public void cell_1_1_is_alignment_Left_at_cell_creation() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); + dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = @@ -153,7 +153,7 @@ public void cell_1_1_is_alignment_Center_at_cell_creation() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Center), "1,1", "1,2" }); + dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Center), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = @@ -174,7 +174,7 @@ public void cell_1_1_is_alignment_Right_at_cell_creation() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Right), "1,1", "1,2" }); + dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Right), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = @@ -197,7 +197,7 @@ public void TestCellHorizontalAlign2() dataGrid.Title = "My Title"; dataGrid.Rows.Add("1234567", "123456", "one two"); - dataGrid.Rows.Add(new DataCell("1", HorizontalAlignment.Center), new DataCell("asd", HorizontalAlignment.Center), new DataCell("asas")); + dataGrid.Rows.Add(new NormalCell("1", HorizontalAlignment.Center), new NormalCell("asd", HorizontalAlignment.Center), new NormalCell("asas")); dataGrid.Rows.Add("12", "a", "errr"); string expected = diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs index e4d7eb88..e1432856 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs @@ -26,7 +26,7 @@ public class NoBorderTests public void render_simple_table_without_border() { DataGrid dataGrid = new DataGrid(); - dataGrid.DisplayBorder = false; + dataGrid.Border.IsVisible = false; dataGrid.Rows.Add("one", "ichi", "eins"); dataGrid.Rows.Add("two", "ni", "zwei"); dataGrid.Rows.Add("three", "san", "drei"); @@ -44,7 +44,7 @@ three san drei public void render_table_with_title_and_no_border() { DataGrid dataGrid = new DataGrid(); - dataGrid.DisplayBorder = false; + dataGrid.Border.IsVisible = false; dataGrid.Title = "My Title"; dataGrid.Rows.Add("one", "ichi", "eins"); dataGrid.Rows.Add("two", "ni", "zwei"); @@ -59,5 +59,29 @@ three san drei CustomAssert.TableRender(dataGrid, expected); } + + [Test] + public void render_table_with_title_and_headers_and_no_border() + { + DataGrid dataGrid = new DataGrid(); + dataGrid.Border.IsVisible = false; + dataGrid.Title = "My Title"; + dataGrid.Columns.Add("1"); + dataGrid.Columns.Add("2"); + dataGrid.Columns.Add("3"); + dataGrid.Rows.Add("one", "ichi", "eins"); + dataGrid.Rows.Add("two", "ni", "zwei"); + dataGrid.Rows.Add("three", "san", "drei"); + + string expected = + @" My Title + 1 2 3 + one ichi eins + two ni zwei + three san drei +"; + + CustomAssert.TableRender(dataGrid, expected); + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs index 710b7596..705a0557 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs @@ -37,7 +37,7 @@ public void Test1() textBlock.Display(); - string actual = consoleOutput.GetOuput(); + string actual = consoleOutput.GetOutput(); string expected = expectedOutput.GeExpectedtOut(); Assert.AreEqual(expected, actual); @@ -57,7 +57,7 @@ public void Test2() textBlock.Display(); - string actual = consoleOutput.GetOuput(); + string actual = consoleOutput.GetOutput(); string expected = expectedOutput.GeExpectedtOut(); Assert.AreEqual(expected, actual); From f8d349568dff023562221f8b5954889c6cfdc4bd Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Mon, 14 Dec 2020 19:11:23 +0200 Subject: [PATCH 45/57] rearranged the unit tests in directories. --- sources/.gitignore | 11 +- .../ConsoleTools.Tests.csproj | 4 + .../ProgressBarTests/MaxValueTests.cs | 2 +- .../ProgressBarTests/MinValueTests.cs | 2 +- .../GenerateBottomBorderTests.cs | 2 +- .../GenerateHorizontalSeparator1Tests.cs | 2 +- .../GenerateHorizontalSeparator2Tests.cs | 2 +- .../GenerateTopBorderTests.cs | 2 +- .../BuildFromDataTable/ColumnTests.cs | 2 +- .../BuildFromDataTable/RowTests.cs | 2 +- .../BuildFromDataTable/TitleTests.cs | 2 +- .../BuildFromList/ColumnTests.cs | 2 +- .../DataGridTests/BuildFromList/RowTests.cs | 2 +- .../DataGridTests/BuildFromList/TitleTests.cs | 2 +- .../Tables/HorizontalBorderXTests.cs | 0 .../CalculatePaddingLeftTests.cs | 2 +- .../CalculatePaddingRightTests.cs | 2 +- ...nstructorMultilineTextAndAlignmentTests.cs | 2 +- .../ConstructorMultilineTextTests.cs | 2 +- .../ConstructorNoParamsTests.cs | 2 +- .../ConstructorObjectAndAlignmentTests.cs | 2 +- .../ConstructorObjectTests.cs | 2 +- .../ConstructorStringAndAlignmentTests.cs | 2 +- .../ConstructorStringTests.cs | 2 +- .../AddCellEnumerationTests.cs | 2 +- .../NormalRowListTests/AddCellsTests.cs | 2 +- .../NormalRowListTests/AddNormalRowTests.cs | 2 +- .../AddStringEnumerationTests.cs | 2 +- .../NormalRowListTests/AddStringsTests.cs | 2 +- .../Tables/NormalRowListTests/ClearTests.cs | 2 +- .../NormalRowListTests/ConstructorTests.cs | 2 +- .../NormalRowListTests/RemoveAtTests.cs | 2 +- .../Tables/NormalRowListTests/RemoveTests.cs | 2 +- .../NormalRowTests/ConstructorTests.cs} | 4 +- .../CellXTests/RenderTextTests.cs | 2 +- .../TableTests/CellAlignmentPerColumnTests.cs | 2 +- .../TableTests/CellAlignmentPerTableTests.cs | 2 +- .../Tables/TableTests/CellAlignmentTests.cs | 2 +- .../Tables/TableTests/CellMultilineTests.cs | 2 +- .../Tables/TableTests/ConstructorTests.cs | 2 +- .../Tables/TableTests/CustomBorderTests.cs | 2 +- .../Tables/TableTests/HeaderAlignmentTests.cs | 2 +- .../TableTests/LinesBetweenRowsTests.cs | 2 +- .../Tables/TableTests/NoBorderTests.cs | 2 +- .../SpecialCaseBorder.LongTitle.Tests.cs | 2 +- .../SpecialCaseBorder.ShortTitle.Tests.cs | 2 +- .../Tables/TableTests/TablePaddingTests.cs | 2 +- .../Tables/TableTests/TitleAlignmentTests.cs | 2 +- .../Tables/TableTests/TitleTests.cs | 2 +- .../TextBlockTests/TextBlockTests.cs | 6 +- .../TextBlockTests.out/test1.out | 0 .../TextBlockTests.out/test2.out | 0 .../AlignedTextTests/SpaceLeftTests.cs | 200 ++++++++-------- .../AlignedTextTests/ToStringTests.cs | 224 +++++++++--------- ...tualClientWidthTests_NoWidthConstraints.cs | 2 +- ...ualContentWidthTests_NoWidthConstraints.cs | 2 +- ...ActualFullWidthTests_NoWidthConstraints.cs | 2 +- .../ActualWidthTests_NoWidthConstraints.cs | 2 +- .../ControlLayoutTests/MarginTests.cs | 2 +- .../ControlLayoutTests/PaddingTests.cs | 2 +- .../Constructor_EmptyTests.cs | 2 +- .../Constructor_InitializeLinesTests.cs | 2 +- .../Constructor_InitializeSizeTests.cs | 2 +- .../Constructor_RawTextTests.cs | 2 +- .../MultilineTextTests/GetLinesTest.cs | 2 +- ...mplicitConversionFromMultilineTextTests.cs | 2 +- .../ImplicitConversionToMultilineTextTests.cs | 2 +- .../Controls}/SizeTests/ConstructorTests.cs | 2 +- .../SizeTests/InflateWithNumberTests.cs | 2 +- .../Controls}/SizeTests/IsEmptyTests.cs | 2 +- .../ConsoleTools.Tests/ExpectedOutput.cs | 2 +- .../ConsoleTools.Tests/run-tests.ps1 | 15 ++ 72 files changed, 306 insertions(+), 282 deletions(-) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Spinners/ProgressBarTests/MaxValueTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Spinners/ProgressBarTests/MinValueTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs (98%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/BorderTemplateTests/GenerateTopBorderTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/DataGridTests/BuildFromDataTable/RowTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/DataGridTests/BuildFromList/ColumnTests.cs (98%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/DataGridTests/BuildFromList/RowTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/DataGridTests/BuildFromList/TitleTests.cs (94%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/HorizontalBorderXTests.cs (100%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/DataCellTests => Controls/Tables/NormalCellTests}/CalculatePaddingLeftTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/DataCellTests => Controls/Tables/NormalCellTests}/CalculatePaddingRightTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/DataCellTests => Controls/Tables/NormalCellTests}/ConstructorMultilineTextAndAlignmentTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/DataCellTests => Controls/Tables/NormalCellTests}/ConstructorMultilineTextTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/DataCellTests => Controls/Tables/NormalCellTests}/ConstructorNoParamsTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/DataCellTests => Controls/Tables/NormalCellTests}/ConstructorObjectAndAlignmentTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/DataCellTests => Controls/Tables/NormalCellTests}/ConstructorObjectTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/DataCellTests => Controls/Tables/NormalCellTests}/ConstructorStringAndAlignmentTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/DataCellTests => Controls/Tables/NormalCellTests}/ConstructorStringTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/NormalRowListTests/AddCellEnumerationTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/NormalRowListTests/AddCellsTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/NormalRowListTests/AddNormalRowTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/NormalRowListTests/AddStringEnumerationTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/NormalRowListTests/AddStringsTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/NormalRowListTests/ClearTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/NormalRowListTests/ConstructorTests.cs (94%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/NormalRowListTests/RemoveAtTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/NormalRowListTests/RemoveTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables/RowTests.cs => Controls/Tables/NormalRowTests/ConstructorTests.cs} (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{Tables => Controls/Tables/RenderingModel}/CellXTests/RenderTextTests.cs (98%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/CellAlignmentPerColumnTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/CellAlignmentPerTableTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/CellAlignmentTests.cs (99%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/CellMultilineTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/ConstructorTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/CustomBorderTests.cs (98%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/HeaderAlignmentTests.cs (99%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/LinesBetweenRowsTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/NoBorderTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs (99%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs (99%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/TablePaddingTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/TitleAlignmentTests.cs (98%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/Tables/TableTests/TitleTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/TextBlockTests/TextBlockTests.cs (90%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/TextBlockTests/TextBlockTests.out/test1.out (100%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Controls}/TextBlockTests/TextBlockTests.out/test2.out (100%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/AlignedTextTests/SpaceLeftTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/AlignedTextTests/ToStringTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/ControlLayoutTests/MarginTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/ControlLayoutTests/PaddingTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/MultilineTextTests/Constructor_EmptyTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/MultilineTextTests/Constructor_InitializeLinesTests.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/MultilineTextTests/Constructor_InitializeSizeTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/MultilineTextTests/Constructor_RawTextTests.cs (93%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/MultilineTextTests/GetLinesTest.cs (97%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs (96%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/SizeTests/ConstructorTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/SizeTests/InflateWithNumberTests.cs (95%) rename sources/ConsoleTools/ConsoleTools.Tests/{ => Core/Controls}/SizeTests/IsEmptyTests.cs (95%) create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/run-tests.ps1 diff --git a/sources/.gitignore b/sources/.gitignore index f16a7ca6..e89d977a 100644 --- a/sources/.gitignore +++ b/sources/.gitignore @@ -1,9 +1,14 @@ .vs/ -*.suo bin/ obj/ + *.user -packages/ +*.suo *.TMP + +packages/ *.nupkg -ExternalLibraries/ \ No newline at end of file +ExternalLibraries/ + +CoverageReport/ +TestResults/ \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj index e8fcf2cc..f06519a4 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj @@ -13,6 +13,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Spinners/ProgressBarTests/MaxValueTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Spinners/ProgressBarTests/MaxValueTests.cs index 04827ed2..6341961c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MaxValueTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Spinners/ProgressBarTests/MaxValueTests.cs @@ -18,7 +18,7 @@ using DustInTheWind.ConsoleTools.Controls.Spinners; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Spinners.ProgressBarTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Spinners.ProgressBarTests { [TestFixture] public class MaxValueTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Spinners/ProgressBarTests/MinValueTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Spinners/ProgressBarTests/MinValueTests.cs index b3de3217..099d8a05 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Spinners/ProgressBarTests/MinValueTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Spinners/ProgressBarTests/MinValueTests.cs @@ -18,7 +18,7 @@ using DustInTheWind.ConsoleTools.Controls.Spinners; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Spinners.ProgressBarTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Spinners.ProgressBarTests { [TestFixture] public class MinValueTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs index 21ee540f..882e45b2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateBottomBorderTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.BorderTemplateTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.BorderTemplateTests { [TestFixture] public class GenerateBottomBorderTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs index fb0b3bc0..d7b7c2e5 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateHorizontalSeparator1Tests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.BorderTemplateTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.BorderTemplateTests { [TestFixture] public class GenerateHorizontalSeparator1Tests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs index b85846fb..e32ecd53 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateHorizontalSeparator2Tests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.BorderTemplateTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.BorderTemplateTests { [TestFixture] public class GenerateHorizontalSeparator2Tests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateTopBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateTopBorderTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateTopBorderTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateTopBorderTests.cs index 4e659613..9f789882 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/BorderTemplateTests/GenerateTopBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/BorderTemplateTests/GenerateTopBorderTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.BorderTemplateTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.BorderTemplateTests { [TestFixture] public class GenerateTopBorderTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs index c5f68604..847985f1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromDataTable +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromDataTable { [TestFixture] public class ColumnTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/RowTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/RowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/RowTests.cs index c1ba77bd..ddb470e1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/RowTests.cs @@ -24,7 +24,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromDataTable +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromDataTable { [TestFixture] public class RowTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs index 1d9befb7..5a9796fc 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromDataTable +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromDataTable { [TestFixture] public class TitleTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/ColumnTests.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/ColumnTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/ColumnTests.cs index 14917b75..0c258fd6 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/ColumnTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromList +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromList { [TestFixture] public class ColumnTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/RowTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/RowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/RowTests.cs index e7cb7f94..60448e6e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/RowTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromList +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromList { [TestFixture] public class RowTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/TitleTests.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/TitleTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/TitleTests.cs index 11ae56f7..ea0e8030 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataGridTests/BuildFromList/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/TitleTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataGridTests.BuildFromList +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromList { [TestFixture] public class TitleTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/HorizontalBorderXTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/HorizontalBorderXTests.cs similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/HorizontalBorderXTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/HorizontalBorderXTests.cs diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingLeftTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingLeftTests.cs index 15d2242b..73a4054e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingLeftTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingLeftTests.cs @@ -1,7 +1,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests { [TestFixture] public class CalculatePaddingLeftTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingRightTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingRightTests.cs index d66cc6a6..146f1759 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/CalculatePaddingRightTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingRightTests.cs @@ -1,7 +1,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests { [TestFixture] public class CalculatePaddingRightRight diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextAndAlignmentTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextAndAlignmentTests.cs index d8004a54..937afbfd 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextAndAlignmentTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests { [TestFixture] public class ConstructorMultilineTextAndAlignmentTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextTests.cs index 39db3b0b..b98a4724 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests { [TestFixture] public class ConstructorMultilineTextTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorNoParamsTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorNoParamsTests.cs index 2dea9e76..70e1f032 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorNoParamsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorNoParamsTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests { [TestFixture] public class ConstructorNoParamsTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectAndAlignmentTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectAndAlignmentTests.cs index 8a614f35..39cf231d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectAndAlignmentTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests { [TestFixture] public class ConstructorObjectAndAlignmentTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectTests.cs index 4eab9082..e5e0c592 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorObjectTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests { [TestFixture] public class ConstructorObjectTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringAndAlignmentTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringAndAlignmentTests.cs index 07444517..61ac4742 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringAndAlignmentTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests { [TestFixture] public class ConstructorStringAndAlignmentTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringTests.cs index b59224fd..34938972 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/DataCellTests/ConstructorStringTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.DataCellTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests { [TestFixture] public class ConstructorStringTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellEnumerationTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellEnumerationTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellEnumerationTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellEnumerationTests.cs index efb2302b..8ec76151 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellEnumerationTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellEnumerationTests.cs @@ -19,7 +19,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests { [TestFixture] public class AddCellEnumerationTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellsTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellsTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellsTests.cs index ebaca461..54b15129 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddCellsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellsTests.cs @@ -18,7 +18,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests { [TestFixture] public class AddCellsTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddNormalRowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddNormalRowTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddNormalRowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddNormalRowTests.cs index 6c8c1d43..dbd93f8f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddNormalRowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddNormalRowTests.cs @@ -18,7 +18,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests { [TestFixture] public class AddNormalRowTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringEnumerationTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringEnumerationTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringEnumerationTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringEnumerationTests.cs index 24fcba59..2743ba85 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringEnumerationTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringEnumerationTests.cs @@ -20,7 +20,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests { [TestFixture] public class AddStringEnumerationTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringsTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringsTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringsTests.cs index eb0f5431..17a8e88f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/AddStringsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringsTests.cs @@ -19,7 +19,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests { [TestFixture] public class AddStringsTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ClearTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ClearTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ClearTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ClearTests.cs index 5a17da22..7ae1fdb1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ClearTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ClearTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests { [TestFixture] public class ClearTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ConstructorTests.cs similarity index 94% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ConstructorTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ConstructorTests.cs index b7c3faf7..c8f5a860 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ConstructorTests.cs @@ -18,7 +18,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests { [TestFixture] public class ConstructorTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveAtTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveAtTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveAtTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveAtTests.cs index 942af9a5..a9d6d766 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveAtTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveAtTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests { [TestFixture] public class RemoveAtTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveTests.cs index bdf685c8..7740dfb3 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/NormalRowListTests/RemoveTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.NormalRowListTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests { [TestFixture] public class RemoveTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowTests/ConstructorTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowTests/ConstructorTests.cs index d3a1df39..41c3b1a1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowTests/ConstructorTests.cs @@ -17,10 +17,10 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowTests { [TestFixture] - public class RowTests + public class ConstructorTests { [Test] public void Constructor_sets_ParentRow_for_each_cell() diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/RenderingModel/CellXTests/RenderTextTests.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/RenderingModel/CellXTests/RenderTextTests.cs index 86fbb339..fb96663b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/CellXTests/RenderTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/RenderingModel/CellXTests/RenderTextTests.cs @@ -21,7 +21,7 @@ using Moq; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.CellXTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.RenderingModel.CellXTests { [TestFixture] public class RenderTextTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerColumnTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerColumnTests.cs index 291f3fd3..fdb00518 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerColumnTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class CellAlignmentPerColumnTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerTableTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerTableTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerTableTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerTableTests.cs index bff71f62..0f030aed 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentPerTableTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerTableTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class CellAlignmentPerTableTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentTests.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentTests.cs index ac3048eb..275a0a71 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class CellAlignmentTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellMultilineTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellMultilineTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellMultilineTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellMultilineTests.cs index 0a283af2..d3dbcf35 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CellMultilineTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellMultilineTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class CellMultilineTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/ConstructorTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/ConstructorTests.cs index ba7be79a..f03f22a4 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/ConstructorTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class ConstructorTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CustomBorderTests.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CustomBorderTests.cs index bb358d02..ba5d82d0 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/CustomBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CustomBorderTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class CustomBorderTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/HeaderAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/HeaderAlignmentTests.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/HeaderAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/HeaderAlignmentTests.cs index 710aee75..567f1615 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/HeaderAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/HeaderAlignmentTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class HeaderAlignmentTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/LinesBetweenRowsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/LinesBetweenRowsTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/LinesBetweenRowsTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/LinesBetweenRowsTests.cs index 70d0541e..c967fbd7 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/LinesBetweenRowsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/LinesBetweenRowsTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class LinesBetweenRowsTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/NoBorderTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/NoBorderTests.cs index e1432856..0d0cf202 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/NoBorderTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/NoBorderTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class NoBorderTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs index 3d776db7..417e4a0b 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/SpecialCaseBorder.LongTitle.Tests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class SpecialCaseBorderTests_LongTitle diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs index dd06d628..5eea904a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/SpecialCaseBorder.ShortTitle.Tests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class SpecialCaseBorderTests_ShortTitle diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/TablePaddingTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/TablePaddingTests.cs index 67328f85..ce305460 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TablePaddingTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/TablePaddingTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class TablePaddingTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/TitleAlignmentTests.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleAlignmentTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/TitleAlignmentTests.cs index 5208ae2f..cc93931e 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/TitleAlignmentTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class TitleAlignmentTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/TitleTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/TitleTests.cs index 13327ba7..df8a261c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Tables/TableTests/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/TitleTests.cs @@ -18,7 +18,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Tables.TableTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.TableTests { [TestFixture] public class TitleTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/TextBlockTests/TextBlockTests.cs similarity index 90% rename from sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/TextBlockTests/TextBlockTests.cs index 705a0557..b5081719 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/TextBlockTests/TextBlockTests.cs @@ -17,7 +17,7 @@ using DustInTheWind.ConsoleTools.Controls; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.TextBlockTests +namespace DustInTheWind.ConsoleTools.Tests.Controls.TextBlockTests { [TestFixture] [Explicit("Some Console calls crash in the Resharper's test runner.")] @@ -39,7 +39,7 @@ public void Test1() string actual = consoleOutput.GetOutput(); - string expected = expectedOutput.GeExpectedtOut(); + string expected = expectedOutput.GeExpectedOut(); Assert.AreEqual(expected, actual); } } @@ -59,7 +59,7 @@ public void Test2() string actual = consoleOutput.GetOutput(); - string expected = expectedOutput.GeExpectedtOut(); + string expected = expectedOutput.GeExpectedOut(); Assert.AreEqual(expected, actual); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.out/test1.out b/sources/ConsoleTools/ConsoleTools.Tests/Controls/TextBlockTests/TextBlockTests.out/test1.out similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.out/test1.out rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/TextBlockTests/TextBlockTests.out/test1.out diff --git a/sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.out/test2.out b/sources/ConsoleTools/ConsoleTools.Tests/Controls/TextBlockTests/TextBlockTests.out/test2.out similarity index 100% rename from sources/ConsoleTools/ConsoleTools.Tests/TextBlockTests/TextBlockTests.out/test2.out rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/TextBlockTests/TextBlockTests.out/test2.out diff --git a/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/SpaceLeftTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/AlignedTextTests/SpaceLeftTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/SpaceLeftTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/AlignedTextTests/SpaceLeftTests.cs index 08bb7cec..0ec997d8 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/SpaceLeftTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/AlignedTextTests/SpaceLeftTests.cs @@ -1,101 +1,101 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.AlignedTextTests -{ - [TestFixture] - public class SpaceLeftTests - { - [Test] - public void if_alignment_is_not_specified_return_0() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - Width = 15 - }; - - Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(0)); - } - - [Test] - public void text_aligend_to_left_returns_0() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Left, - Width = 15 - }; - - Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(0)); - } - - [Test] - public void text_with_length_9_aligend_to_center_in_width_15_returns_3() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Center, - Width = 15 - }; - - Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(3)); - } - - [Test] - public void text_with_length_9_aligend_to_center_in_width_16_returns_3() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Center, - Width = 16 - }; - - Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(3)); - } - - [Test] - public void text_with_length_9_aligend_to_right_in_width_15_returns_6() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Right, - Width = 15 - }; - - Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(6)); - } - - [Test] - public void text_with_length_9_aligend_to_default_in_width_15_returns_0() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Default, - Width = 15 - }; - - Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(0)); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.AlignedTextTests +{ + [TestFixture] + public class SpaceLeftTests + { + [Test] + public void if_alignment_is_not_specified_return_0() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + Width = 15 + }; + + Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(0)); + } + + [Test] + public void text_aligend_to_left_returns_0() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Left, + Width = 15 + }; + + Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(0)); + } + + [Test] + public void text_with_length_9_aligend_to_center_in_width_15_returns_3() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Center, + Width = 15 + }; + + Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(3)); + } + + [Test] + public void text_with_length_9_aligend_to_center_in_width_16_returns_3() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Center, + Width = 16 + }; + + Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(3)); + } + + [Test] + public void text_with_length_9_aligend_to_right_in_width_15_returns_6() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Right, + Width = 15 + }; + + Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(6)); + } + + [Test] + public void text_with_length_9_aligend_to_default_in_width_15_returns_0() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Default, + Width = 15 + }; + + Assert.That(alignedText.SpaceLeftCount, Is.EqualTo(0)); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/ToStringTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/AlignedTextTests/ToStringTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/ToStringTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/AlignedTextTests/ToStringTests.cs index 38ebebfb..77384a56 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/AlignedTextTests/ToStringTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/AlignedTextTests/ToStringTests.cs @@ -1,113 +1,113 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using NUnit.Framework; - -namespace DustInTheWind.ConsoleTools.Tests.AlignedTextTests -{ - [TestFixture] - public class ToStringTests - { - [Test] - public void if_alignment_is_not_specified_then_text_is_aligend_to_left() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - Width = 15 - }; - - string actual = alignedText.ToString(); - - Assert.That(actual, Is.EqualTo("some text ")); - } - - [Test] - public void text_aligend_to_left() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Left, - Width = 15 - }; - - string actual = alignedText.ToString(); - - Assert.That(actual, Is.EqualTo("some text ")); - } - - [Test] - public void text_aligend_to_center_even_empty_space() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Center, - Width = 15 - }; - - string actual = alignedText.ToString(); - - Assert.That(actual, Is.EqualTo(" some text ")); - } - - [Test] - public void text_aligend_to_center_odd_empty_space() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Center, - Width = 16 - }; - - string actual = alignedText.ToString(); - - Assert.That(actual, Is.EqualTo(" some text ")); - } - - [Test] - public void text_aligend_to_right() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Right, - Width = 15 - }; - - string actual = alignedText.ToString(); - - Assert.That(actual, Is.EqualTo(" some text")); - } - - [Test] - public void text_aligend_to_default() - { - AlignedText alignedText = new AlignedText - { - Text = "some text", - HorizontalAlignment = HorizontalAlignment.Default, - Width = 15 - }; - - string actual = alignedText.ToString(); - - Assert.That(actual, Is.EqualTo("some text ")); - } - } +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.AlignedTextTests +{ + [TestFixture] + public class ToStringTests + { + [Test] + public void if_alignment_is_not_specified_then_text_is_aligend_to_left() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + Width = 15 + }; + + string actual = alignedText.ToString(); + + Assert.That(actual, Is.EqualTo("some text ")); + } + + [Test] + public void text_aligend_to_left() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Left, + Width = 15 + }; + + string actual = alignedText.ToString(); + + Assert.That(actual, Is.EqualTo("some text ")); + } + + [Test] + public void text_aligend_to_center_even_empty_space() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Center, + Width = 15 + }; + + string actual = alignedText.ToString(); + + Assert.That(actual, Is.EqualTo(" some text ")); + } + + [Test] + public void text_aligend_to_center_odd_empty_space() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Center, + Width = 16 + }; + + string actual = alignedText.ToString(); + + Assert.That(actual, Is.EqualTo(" some text ")); + } + + [Test] + public void text_aligend_to_right() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Right, + Width = 15 + }; + + string actual = alignedText.ToString(); + + Assert.That(actual, Is.EqualTo(" some text")); + } + + [Test] + public void text_aligend_to_default() + { + AlignedText alignedText = new AlignedText + { + Text = "some text", + HorizontalAlignment = HorizontalAlignment.Default, + Width = 15 + }; + + string actual = alignedText.ToString(); + + Assert.That(actual, Is.EqualTo("some text ")); + } + } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs index 19a3a119..c51580d3 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualClientWidthTests_NoWidthConstraints.cs @@ -17,7 +17,7 @@ using Moq; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.ControlLayoutTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.ControlLayoutTests { [TestFixture] public class ActualClientWidthTests_NoWidthConstraints diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs index c5b81b1d..12b864da 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualContentWidthTests_NoWidthConstraints.cs @@ -17,7 +17,7 @@ using Moq; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.ControlLayoutTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.ControlLayoutTests { [TestFixture] public class ActualContentWidthTests_NoWidthConstraints diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs index 9697bbff..1f72130a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualFullWidthTests_NoWidthConstraints.cs @@ -17,7 +17,7 @@ using Moq; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.ControlLayoutTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.ControlLayoutTests { [TestFixture] public class ActualFullWidthTests_NoWidthConstraints diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs index 357bf930..7888ad89 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/ActualWidthTests_NoWidthConstraints.cs @@ -17,7 +17,7 @@ using Moq; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.ControlLayoutTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.ControlLayoutTests { [TestFixture] public class ActualWidthTests_NoWidthConstraints diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/MarginTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/MarginTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/MarginTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/MarginTests.cs index d7b44959..20c64ae8 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/MarginTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/MarginTests.cs @@ -17,7 +17,7 @@ using Moq; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.ControlLayoutTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.ControlLayoutTests { [TestFixture] public class MarginTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/PaddingTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/PaddingTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/PaddingTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/PaddingTests.cs index 48a26711..ab869a38 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ControlLayoutTests/PaddingTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/ControlLayoutTests/PaddingTests.cs @@ -17,7 +17,7 @@ using Moq; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.ControlLayoutTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.ControlLayoutTests { [TestFixture] public class PaddingTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_EmptyTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_EmptyTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_EmptyTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_EmptyTests.cs index ba2ddc79..b90a4e85 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_EmptyTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_EmptyTests.cs @@ -17,7 +17,7 @@ using System.Collections.Generic; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.MultilineTextTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.MultilineTextTests { [TestFixture] public class Constructor_EmptyTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeLinesTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_InitializeLinesTests.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeLinesTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_InitializeLinesTests.cs index 61dd62ec..8e1c69c1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeLinesTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_InitializeLinesTests.cs @@ -16,7 +16,7 @@ using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.MultilineTextTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.MultilineTextTests { [TestFixture] public class Constructor_InitializeLinesTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeSizeTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_InitializeSizeTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeSizeTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_InitializeSizeTests.cs index 28317a59..1290b8a0 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_InitializeSizeTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_InitializeSizeTests.cs @@ -16,7 +16,7 @@ using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.MultilineTextTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.MultilineTextTests { [TestFixture] public class Constructor_InitializeSizeTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_RawTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_RawTextTests.cs similarity index 93% rename from sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_RawTextTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_RawTextTests.cs index 7925daec..24660c51 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/Constructor_RawTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/Constructor_RawTextTests.cs @@ -16,7 +16,7 @@ using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.MultilineTextTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.MultilineTextTests { [TestFixture] public class Constructor_RawTextTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/GetLinesTest.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/GetLinesTest.cs similarity index 97% rename from sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/GetLinesTest.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/GetLinesTest.cs index d0b73ef9..2c56a04d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/GetLinesTest.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/GetLinesTest.cs @@ -17,7 +17,7 @@ using System.Linq; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.MultilineTextTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.MultilineTextTests { [TestFixture] public class GetLinesTest diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs index 08335b4a..64b7872f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/ImplicitConversionFromMultilineTextTests.cs @@ -17,7 +17,7 @@ using System.Collections.Generic; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.MultilineTextTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.MultilineTextTests { [TestFixture] public class ImplicitConversionFromMultilineTextTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs similarity index 96% rename from sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs index e74e39c5..6ec6b030 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/MultilineTextTests/ImplicitConversionToMultilineTextTests.cs @@ -17,7 +17,7 @@ using System.Collections.Generic; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.MultilineTextTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.MultilineTextTests { [TestFixture] public class ImplicitConversionToMultilineTextTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/SizeTests/ConstructorTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/SizeTests/ConstructorTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/SizeTests/ConstructorTests.cs index c9c5577c..10c428b0 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/SizeTests/ConstructorTests.cs @@ -16,7 +16,7 @@ using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.SizeTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.SizeTests { [TestFixture] public class ConstructorTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/InflateWithNumberTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/SizeTests/InflateWithNumberTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/SizeTests/InflateWithNumberTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/SizeTests/InflateWithNumberTests.cs index f74e230e..631f9eae 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/InflateWithNumberTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/SizeTests/InflateWithNumberTests.cs @@ -16,7 +16,7 @@ using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.SizeTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.SizeTests { [TestFixture] public class InflateWithNumberTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/IsEmptyTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/SizeTests/IsEmptyTests.cs similarity index 95% rename from sources/ConsoleTools/ConsoleTools.Tests/SizeTests/IsEmptyTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/SizeTests/IsEmptyTests.cs index ab9e3344..386359ee 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/SizeTests/IsEmptyTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Core/Controls/SizeTests/IsEmptyTests.cs @@ -16,7 +16,7 @@ using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.SizeTests +namespace DustInTheWind.ConsoleTools.Tests.Core.Controls.SizeTests { [TestFixture] public class IsEmptyTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ExpectedOutput.cs b/sources/ConsoleTools/ConsoleTools.Tests/ExpectedOutput.cs index 5405e458..53b24d11 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ExpectedOutput.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/ExpectedOutput.cs @@ -31,7 +31,7 @@ public ExpectedOutput(Type testClassType, string basePath) this.basePath = basePath ?? throw new ArgumentNullException(nameof(basePath)); } - public string GeExpectedtOut([CallerMemberName] string testName = "") + public string GeExpectedOut([CallerMemberName] string testName = "") { string directoryName = testClassType.Name + ".out"; string outFileName = testName + ".out"; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/run-tests.ps1 b/sources/ConsoleTools/ConsoleTools.Tests/run-tests.ps1 new file mode 100644 index 00000000..85363650 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/run-tests.ps1 @@ -0,0 +1,15 @@ +# ============================================================================== +# This PowerShell script runs the tests and displays in the browser the coverage information. +# ============================================================================== + +# In Visual Studio, add in the tests project reference to the "coverlet.msbuild" nuget package. (one time only) + +# Run tests and save the code coverage results +dotnet test .\ConsoleTools.Tests.csproj /p:CollectCoverage=true /p:CoverletOutput="./TestResults/coverage.cobertura.xml" /p:CoverletOutputFormat="opencover" + +# Install the report generator (one time only): +# dotnet tool install -g dotnet-reportgenerator-globaltool + +# Generate the report and display it in browser +reportgenerator -reports:.\TestResults\coverage.cobertura.netcoreapp2.2.xml -reporttypes:"HTML" -targetDir:.\CoverageReport\ +start .\CoverageReport\index.html \ No newline at end of file From f0555cd116bc23a65f441163bf63664ff0ba3915 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Wed, 16 Dec 2020 05:22:51 +0200 Subject: [PATCH 46/57] replaced HeaderRowX and NormalRowX with RowX. --- .../RenderingModel/CellX.cs | 2 + .../RenderingModel/DataGridX.cs | 51 +++++-- .../RenderingModel/DataGridXBuilder.cs | 8 +- .../RenderingModel/NormalRowX.cs | 124 ------------------ .../RenderingModel/{HeaderRowX.cs => RowX.cs} | 48 ++++--- .../RenderingModel/TitleRowX.cs | 20 +-- .../RowXTests/CalculateLayoutTests.cs | 97 ++++++++++++++ 7 files changed, 184 insertions(+), 166 deletions(-) delete mode 100644 sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/NormalRowX.cs rename sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/{HeaderRowX.cs => RowX.cs} (71%) create mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/RenderingModel/RowXTests/CalculateLayoutTests.cs diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs index d7dfcad3..14982797 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/CellX.cs @@ -42,6 +42,8 @@ internal class CellX public HorizontalAlignment HorizontalAlignment { get; set; } + public int HorizontalMerge { get; set; } + public void CalculateLayout() { Size = CalculatePreferredSize(); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs index 717869cf..1054a127 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs @@ -19,6 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose +using System; using System.Collections.Generic; using System.Linq; @@ -29,8 +30,8 @@ internal class DataGridX private readonly bool displayBorder; private TitleRowX titleRowX; - private HeaderRowX headerRowX; - private readonly List dataRows = new List(); + private RowX headerRowX; + private readonly List normalRows = new List(); private readonly List columns = new List(); private int actualWidth; @@ -58,16 +59,46 @@ public void AddTitleRow(TitleRowX titleRowX) this.titleRowX = titleRowX; } - public void AddHeaderRow(HeaderRowX headerRowX) + public void AddHeaderRow(RowX headerRowX) { this.headerRowX = headerRowX; - headerRowX.UpdateColumnsWidths(columns); + UpdateColumnsWidths(headerRowX); } - public void AddNormalRow(NormalRowX normalRowX) + public void AddNormalRow(RowX rowX) { - normalRowX.UpdateColumnsWidths(columns); - dataRows.Add(normalRowX); + normalRows.Add(rowX); + UpdateColumnsWidths(rowX); + } + + private void UpdateColumnsWidths(RowX row) + { + //bool isFullRow = row.Cells.Count == 0 && row.Cells[0].HorizontalMerge < 0; + + //if (isFullRow) + //{ + // int columnsTotalWidth = columns + // .Select(x => x.Width) + // .Sum(); + + // CellX cell = row.Cells[0]; + + // int diff = cell.Size.Width - columnsTotalWidth; + + // for (int i = 0; i < diff; i++) + // columns[i % columns.Count].Width++; + //} + + for (int i = 0; i < row.Cells.Count; i++) + { + while (columns.Count <= i) + columns.Add(new ColumnX()); + + Size cellSize = row.Cells[i].Size; + + if (cellSize.Width > columns[i].Width) + columns[i].Width = cellSize.Width; + } } public void CalculateLayout(int minWidth) @@ -151,12 +182,12 @@ private void RenderData(ITablePrinter tablePrinter) private void RenderNormalRows(ITablePrinter tablePrinter) { - for (int rowIndex = 0; rowIndex < dataRows.Count; rowIndex++) + for (int rowIndex = 0; rowIndex < normalRows.Count; rowIndex++) { - NormalRowX row = dataRows[rowIndex]; + RowX row = normalRows[rowIndex]; row.Render(tablePrinter, columns); - bool isLastRow = rowIndex == dataRows.Count - 1; + bool isLastRow = rowIndex == normalRows.Count - 1; if (!isLastRow) DataDataSeparator?.Render(tablePrinter, columns); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index 064a9d89..22011e55 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -74,17 +74,17 @@ private void AddTitle() private void AddHeader() { - HeaderRowX headerRowX = HeaderRowX.CreateFrom(HeaderRow); + RowX headerRowX = RowX.CreateFrom(HeaderRow); dataGridX.AddHeaderRow(headerRowX); } private void AddRows() { - IEnumerable rows = Rows + IEnumerable rows = Rows .Where(x => x.IsVisible) - .Select(NormalRowX.CreateFrom); + .Select(RowX.CreateFrom); - foreach (NormalRowX row in rows) + foreach (RowX row in rows) dataGridX.AddNormalRow(row); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/NormalRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/NormalRowX.cs deleted file mode 100644 index 7f4a5bae..00000000 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/NormalRowX.cs +++ /dev/null @@ -1,124 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel -{ - internal class NormalRowX - { - public Size Size { get; private set; } - - public DataGridBorderX DataGridBorderX { get; set; } - - public List Cells { get; set; } = new List(); - - public void CalculateLayout() - { - Size = CalculatePreferredSize(); - } - - private Size CalculatePreferredSize() - { - int width = 0; - int height = 0; - - if (Cells != null) - { - foreach (CellX cell in Cells) - { - width += cell.Size.Width; - height = Math.Max(height, cell.Size.Height); - } - } - - if (DataGridBorderX != null) - width += Cells?.Count ?? 0 + 1; - - return new Size(width, height); - } - - public void Render(ITablePrinter tablePrinter, List cellWidths) - { - for (int i = 0; i < Cells.Count; i++) - { - CellX cellX = Cells[i]; - cellX.Size = new Size(cellWidths[i].Width, Size.Height); - } - - for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) - { - DataGridBorderX?.RenderRowLeftBorder(tablePrinter); - - for (int columnIndex = 0; columnIndex < Cells.Count; columnIndex++) - { - CellX cellX = Cells[columnIndex]; - Size cellSize = new Size(cellWidths[columnIndex].Width, Size.Height); - cellX.RenderNextLine(tablePrinter, cellSize); - - bool isLastCell = columnIndex >= Cells.Count - 1; - - if (isLastCell) - DataGridBorderX?.RenderRowRightBorder(tablePrinter); - else - DataGridBorderX?.RenderRowInsideBorder(tablePrinter); - } - - tablePrinter.WriteLine(); - } - } - - public void UpdateColumnsWidths(List columnsWidths) - { - for (int i = 0; i < Cells.Count; i++) - { - while (columnsWidths.Count <= i) - columnsWidths.Add(new ColumnX()); - - Size cellSize = Cells[i].Size; - - if (cellSize.Width > columnsWidths[i].Width) - columnsWidths[i].Width = cellSize.Width; - } - } - - public static NormalRowX CreateFrom(NormalRow normalRow) - { - if (normalRow == null) throw new ArgumentNullException(nameof(normalRow)); - - NormalRowX normalRowX = new NormalRowX - { - DataGridBorderX = normalRow.ParentDataGrid?.Border?.IsVisible == true - ? DataGridBorderX.CreateFrom(normalRow.ParentDataGrid.Border) - : null, - Cells = normalRow - .Select(CellX.CreateFrom) - .ToList() - }; - - normalRowX.CalculateLayout(); - - return normalRowX; - } - } -} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs similarity index 71% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs index 7e9c5306..b22bd01b 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/HeaderRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs @@ -25,11 +25,11 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel { - internal class HeaderRowX + internal class RowX { public Size Size { get; private set; } - public DataGridBorderX DataGridBorderX { get; set; } + public DataGridBorderX Border { get; set; } public List Cells { get; set; } @@ -52,8 +52,15 @@ private Size CalculatePreferredSize() } } - if (DataGridBorderX != null) - width += Cells?.Count ?? 0 + 1; + if (Border != null) + { + int cellsCount = Cells?.Count ?? 0; + + if (cellsCount == 0) + cellsCount = 1; + + width += cellsCount + 1; + } return new Size(width, height); } @@ -62,7 +69,7 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) { for (int lineIndex = 0; lineIndex < Size.Height; lineIndex++) { - DataGridBorderX?.RenderRowLeftBorder(tablePrinter); + Border?.RenderRowLeftBorder(tablePrinter); for (int columnIndex = 0; columnIndex < Cells.Count; columnIndex++) { @@ -73,36 +80,41 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) bool isLastCell = columnIndex >= Cells.Count - 1; if (isLastCell) - DataGridBorderX?.RenderRowRightBorder(tablePrinter); + Border?.RenderRowRightBorder(tablePrinter); else - DataGridBorderX?.RenderRowInsideBorder(tablePrinter); + Border?.RenderRowInsideBorder(tablePrinter); } tablePrinter.WriteLine(); } } - public void UpdateColumnsWidths(List columnsWidths) + public static RowX CreateFrom(NormalRow normalRow) { - for (int i = 0; i < Cells.Count; i++) + if (normalRow == null) throw new ArgumentNullException(nameof(normalRow)); + + RowX rowX = new RowX { - while (columnsWidths.Count <= i) - columnsWidths.Add(new ColumnX()); + Border = normalRow.ParentDataGrid?.Border?.IsVisible == true + ? DataGridBorderX.CreateFrom(normalRow.ParentDataGrid.Border) + : null, + Cells = normalRow + .Select(CellX.CreateFrom) + .ToList() + }; - Size cellSize = Cells[i].Size; + rowX.CalculateLayout(); - if (cellSize.Width > columnsWidths[i].Width) - columnsWidths[i].Width = cellSize.Width; - } + return rowX; } - public static HeaderRowX CreateFrom(HeaderRow headerRow) + public static RowX CreateFrom(HeaderRow headerRow) { if (headerRow == null) throw new ArgumentNullException(nameof(headerRow)); - HeaderRowX headerRowX = new HeaderRowX + RowX headerRowX = new RowX { - DataGridBorderX = headerRow.ParentDataGrid?.Border?.IsVisible == true + Border = headerRow.ParentDataGrid?.Border?.IsVisible == true ? DataGridBorderX.CreateFrom(headerRow.ParentDataGrid.Border) : null, Cells = headerRow diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs index a6985efd..6a38b9b0 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/TitleRowX.cs @@ -25,9 +25,9 @@ internal class TitleRowX { public Size Size { get; set; } - public CellX CellX { get; set; } + public DataGridBorderX Border { get; set; } - public DataGridBorderX GridBorderX { get; set; } + public CellX Cell { get; set; } public void CalculateLayout() { @@ -36,12 +36,12 @@ public void CalculateLayout() private Size CalculatePreferredSize() { - Size cellSize = CellX.Size; + Size cellSize = Cell.Size; int rowWidth = cellSize.Width; int rowHeight = cellSize.Height; - if (GridBorderX != null) + if (Border != null) rowWidth += 2; return new Size(rowWidth, rowHeight); @@ -49,15 +49,15 @@ private Size CalculatePreferredSize() public void Render(ITablePrinter tablePrinter, Size actualSize) { - Size cellSize = GridBorderX != null + Size cellSize = Border != null ? actualSize.InflateWidth(-2) : actualSize; for (int lineIndex = 0; lineIndex < cellSize.Height; lineIndex++) { - GridBorderX?.RenderRowLeftBorder(tablePrinter); - CellX.RenderNextLine(tablePrinter, cellSize); - GridBorderX?.RenderRowRightBorder(tablePrinter); + Border?.RenderRowLeftBorder(tablePrinter); + Cell.RenderNextLine(tablePrinter, cellSize); + Border?.RenderRowRightBorder(tablePrinter); tablePrinter.WriteLine(); } @@ -67,8 +67,8 @@ public static TitleRowX CreateFrom(TitleRow titleRow) { TitleRowX titleRowX = new TitleRowX { - CellX = CellX.CreateFrom(titleRow.TitleCell), - GridBorderX = titleRow.ParentDataGrid.Border.IsVisible + Cell = CellX.CreateFrom(titleRow.TitleCell), + Border = titleRow.ParentDataGrid.Border.IsVisible ? DataGridBorderX.CreateFrom(titleRow.ParentDataGrid.Border) : null }; diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/RenderingModel/RowXTests/CalculateLayoutTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/RenderingModel/RowXTests/CalculateLayoutTests.cs new file mode 100644 index 00000000..79a0e447 --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/RenderingModel/RowXTests/CalculateLayoutTests.cs @@ -0,0 +1,97 @@ +using System.Collections.Generic; +using DustInTheWind.ConsoleTools.Controls.Tables; +using DustInTheWind.ConsoleTools.Controls.Tables.RenderingModel; +using NUnit.Framework; + +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.RenderingModel.RowXTests +{ + [TestFixture] + public class CalculateLayoutTests + { + [Test] + public void HavingARowContainingACellAndNoBorder_WhenCalculatingLayout_ThenRowSizeIsEqualToTheCellSize() + { + CellX cellX1 = new CellX + { + Content = "value 1" + }; + cellX1.CalculateLayout(); + RowX rowX = new RowX + { + Cells = new List + { + cellX1 + } + }; + + rowX.CalculateLayout(); + + Size expected = new Size(7, 1); + Assert.AreEqual(expected, rowX.Size); + } + + [Test] + public void HavingARowContainingACellAndBorder_WhenCalculatingLayout_ThenRowSizeIsEqualToTheCellSizePlusBorder() + { + CellX cellX1 = new CellX + { + Content = "value 1" + }; + cellX1.CalculateLayout(); + DataGridBorderX dataGridBorderX = new DataGridBorderX + { + Template = BorderTemplate.PlusMinusBorderTemplate + }; + RowX rowX = new RowX + { + Cells = new List + { + cellX1 + }, + Border = dataGridBorderX + }; + + rowX.CalculateLayout(); + + Size expected = new Size(9, 1); + Assert.AreEqual(expected, rowX.Size); + } + + [Test] + public void HavingARowContainingBorderAndNoCell_WhenCalculatingLayout_ThenRowSizeIsEqualToTwiceTheBorderWidth() + { + DataGridBorderX dataGridBorderX = new DataGridBorderX + { + Template = BorderTemplate.PlusMinusBorderTemplate + }; + RowX rowX = new RowX + { + Cells = new List(), + Border = dataGridBorderX + }; + + rowX.CalculateLayout(); + + Size expected = new Size(2, 0); + Assert.AreEqual(expected, rowX.Size); + } + + [Test] + public void HavingARowContainingBorderAndNoCellList_WhenCalculatingLayout_ThenRowSizeIsEqualToTwiceTheBorderWidth() + { + DataGridBorderX dataGridBorderX = new DataGridBorderX + { + Template = BorderTemplate.PlusMinusBorderTemplate + }; + RowX rowX = new RowX + { + Border = dataGridBorderX + }; + + rowX.CalculateLayout(); + + Size expected = new Size(2, 0); + Assert.AreEqual(expected, rowX.Size); + } + } +} \ No newline at end of file From 851ac45219cebf1158a405e956f71dc3f042f9fe Mon Sep 17 00:00:00 2001 From: Iuga Alexandru Date: Tue, 5 Jan 2021 17:57:43 +0200 Subject: [PATCH 47/57] Create FUNDING.yml --- .github/FUNDING.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..fc75988b --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: lastunicorn +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From a6f668aa32514f528403e8bf9e1f5e24a065071d Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 10 Oct 2021 19:06:33 +0300 Subject: [PATCH 48/57] renamed back to DataCell. moved the projects to netstandard2.0 --- doc/DataGrid.drawio | 0 doc/changelog.txt | 1 + nuget/ConsoleTools.nuspec | 4 +- nuget/build.ps1 | 19 +-- sources/ConsoleTools/AssemblyInfo.Shared.cs | 2 +- .../ConsoleTools.Controls.Menus.csproj | 2 +- .../ConsoleTools.Controls.Spinners.csproj | 2 +- .../ClassDiagram1.cd | 128 ++++++++++++++---- .../ConsoleTools.Controls.Tables/Column.cs | 2 +- .../ColumnList.cs | 10 +- .../ConsoleTools.Controls.Tables.csproj | 2 +- .../{NormalCell.cs => DataCell.cs} | 44 +++--- .../ConsoleTools.Controls.Tables/DataGrid.cs | 14 +- .../DataGridBorder.cs | 8 ++ .../DataGridBuilderFromDataTable.cs | 4 +- .../DataGridBuilderFromObject.cs | 8 +- .../{NormalRow.cs => DataRow.cs} | 70 +++++----- .../{NormalRowList.cs => DataRowList.cs} | 100 +++++++++----- .../RenderingModel/DataGridX.cs | 1 - .../RenderingModel/DataGridXBuilder.cs | 2 +- .../RenderingModel/RowX.cs | 10 +- .../ConsoleTools.Controls.csproj | 2 +- .../ConsoleTools.Core.csproj | 2 +- .../ConsoleTools.Mvc/ConsoleTools.Cli.csproj | 2 +- .../ConsoleTools.Tests.csproj | 2 +- .../CalculatePaddingLeftTests.cs | 36 ++--- .../CalculatePaddingRightTests.cs | 36 ++--- ...nstructorMultilineTextAndAlignmentTests.cs | 10 +- .../ConstructorMultilineTextTests.cs | 10 +- .../ConstructorNoParamsTests.cs | 10 +- .../ConstructorObjectAndAlignmentTests.cs | 10 +- .../NormalCellTests/ConstructorObjectTests.cs | 10 +- .../ConstructorStringAndAlignmentTests.cs | 10 +- .../NormalCellTests/ConstructorStringTests.cs | 10 +- .../AddCellEnumerationTests.cs | 30 ++-- .../NormalRowListTests/AddCellsTests.cs | 36 ++--- .../NormalRowListTests/AddNormalRowTests.cs | 24 ++-- .../AddStringEnumerationTests.cs | 14 +- .../NormalRowListTests/AddStringsTests.cs | 16 +-- .../Tables/NormalRowListTests/ClearTests.cs | 22 +-- .../NormalRowListTests/ConstructorTests.cs | 4 +- .../NormalRowListTests/RemoveAtTests.cs | 60 ++++---- .../Tables/NormalRowListTests/RemoveTests.cs | 60 ++++---- .../Tables/NormalRowTests/ConstructorTests.cs | 24 ++-- .../TableTests/CellAlignmentPerColumnTests.cs | 2 +- .../Tables/TableTests/CellAlignmentTests.cs | 10 +- 46 files changed, 500 insertions(+), 385 deletions(-) delete mode 100644 doc/DataGrid.drawio rename sources/ConsoleTools/ConsoleTools.Controls.Tables/{NormalCell.cs => DataCell.cs} (84%) rename sources/ConsoleTools/ConsoleTools.Controls.Tables/{NormalRow.cs => DataRow.cs} (77%) rename sources/ConsoleTools/ConsoleTools.Controls.Tables/{NormalRowList.cs => DataRowList.cs} (71%) diff --git a/doc/DataGrid.drawio b/doc/DataGrid.drawio deleted file mode 100644 index e69de29b..00000000 diff --git a/doc/changelog.txt b/doc/changelog.txt index f50e57a5..de1877e5 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -5,6 +5,7 @@ Note: For any bug or feature request please add a new issue on GitHub: https://g ver next --------- +- Compiled for netstandard2.0 - CustomConsole: removed the methods for building and writing a horizontal line. - ApplicationHeader: Added new control. - Splitted the library in multiple assemblies. diff --git a/nuget/ConsoleTools.nuspec b/nuget/ConsoleTools.nuspec index 56e73f07..7be7cc4b 100644 --- a/nuget/ConsoleTools.nuspec +++ b/nuget/ConsoleTools.nuspec @@ -2,7 +2,7 @@ ConsoleTools - 0.5.4 + 0.5.7 Dust in the Wind ConsoleTools Dust in the Wind @@ -11,7 +11,7 @@ false A set of tools and "controls" for the .net Console. It contains: List Input/Output Controls, Text Input/Output Controls, Progress Bar, Spinner, Data Table, Prompter, Menus, etc. A set of tools and "controls" for the .net Console. - Fixed the usage of ForegroundColor and BackgroundColor in the DataGrid. + Added ForegroundColor and BackgroundColor at cell level in the DataGrid. Copyright 2017-2020 Dust in the Wind console cli prompter menu progressbar spinner table read write textblock inlinetextblock blockcontrol, inlinecontrol diff --git a/nuget/build.ps1 b/nuget/build.ps1 index f85b2e2e..d2a0628b 100644 --- a/nuget/build.ps1 +++ b/nuget/build.ps1 @@ -31,8 +31,7 @@ Write-Output "------------------------------------------------------------------ Write-Output "Retrieve all files." Write-Output "----------------------------------------------------------------------------------------------------" -New-Item -ItemType Directory -Force -Path "lib\net45" -New-Item -ItemType Directory -Force -Path "lib\netcoreapp2.2" +New-Item -ItemType Directory -Force -Path "lib\netstandard2.0" $projectDirs = @( "$rootDirectory\sources\ConsoleTools\ConsoleTools.Core", @@ -48,12 +47,16 @@ for ($i = 0; $i -lt $projectDirs.length; $i++) Write-Output "---> Retrieve assemblies from project: $projectDir" - Copy-Item -Path "$projectDir\bin\Release\net45\*.dll" -Destination "lib\net45" -Recurse -Container - Copy-Item -Path "$projectDir\bin\Release\net45\*.xml" -Destination "lib\net45" -Recurse -Container - - Copy-Item -Path "$projectDir\bin\Release\netcoreapp2.2\*.dll" -Destination "lib\netcoreapp2.2" -Recurse -Container - Copy-Item -Path "$projectDir\bin\Release\netcoreapp2.2\*.xml" -Destination "lib\netcoreapp2.2" -Recurse -Container - Copy-Item -Path "$projectDir\bin\Release\netcoreapp2.2\*.json" -Destination "lib\netcoreapp2.2" -Recurse -Container + #Copy-Item -Path "$projectDir\bin\Release\net45\*.dll" -Destination "lib\net45" -Recurse -Container + #Copy-Item -Path "$projectDir\bin\Release\net45\*.xml" -Destination "lib\net45" -Recurse -Container + # + #Copy-Item -Path "$projectDir\bin\Release\netcoreapp2.2\*.dll" -Destination "lib\netcoreapp2.2" -Recurse -Container + #Copy-Item -Path "$projectDir\bin\Release\netcoreapp2.2\*.xml" -Destination "lib\netcoreapp2.2" -Recurse -Container + #Copy-Item -Path "$projectDir\bin\Release\netcoreapp2.2\*.json" -Destination "lib\netcoreapp2.2" -Recurse -Container + + Copy-Item -Path "$projectDir\bin\Release\netstandard2.0\*.dll" -Destination "lib\netstandard2.0" -Recurse -Container + Copy-Item -Path "$projectDir\bin\Release\netstandard2.0\*.xml" -Destination "lib\netstandard2.0" -Recurse -Container + Copy-Item -Path "$projectDir\bin\Release\netstandard2.0\*.json" -Destination "lib\netstandard2.0" -Recurse -Container } Write-Output "---> Retrieve changelog file" diff --git a/sources/ConsoleTools/AssemblyInfo.Shared.cs b/sources/ConsoleTools/AssemblyInfo.Shared.cs index 1e91fc10..aaf1099d 100644 --- a/sources/ConsoleTools/AssemblyInfo.Shared.cs +++ b/sources/ConsoleTools/AssemblyInfo.Shared.cs @@ -39,5 +39,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.5.4.*")] +[assembly: AssemblyVersion("0.5.7.*")] //[assembly: AssemblyFileVersion("1.0.0.*")] \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj index 8ad60aea..d1443f23 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj @@ -1,7 +1,7 @@ - netcoreapp2.2;net45 + netstandard2.0 DustInTheWind.ConsoleTools.Controls.Menus DustInTheWind.ConsoleTools.Controls.Menus true diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj index ee196543..3f477faf 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj @@ -1,7 +1,7 @@ - netcoreapp2.2;net45 + netstandard2.0 DustInTheWind.ConsoleTools.Controls.Spinners DustInTheWind.ConsoleTools.Controls.Spinners true diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd index 3f727d7f..0652fa77 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd @@ -1,32 +1,58 @@  - - + + + + + + + - + - + + + + + + - + + + + + + + + - AACAAwIAAASAAEAkCQAAAQgCFICEAAAAABAAAIgAAAQ= + AACIAwIAAAWAAEAkCUAAAQhCFICEAAAAABAAAIgACAQ= DataGrid.cs - - + + + - + + + + + TitleRow.cs + + + + - AAASAAAAAAAAAAAAgAAAEAAAAAAAAAAAABAAAAAAAAA= + AAACAAEAAAAAABAAAAAAAAAAAAAAAAAAABAAAAAAAAA= TitleRow.cs @@ -34,47 +60,93 @@ - + - AAAAAAAAAGAAAAAAAAAAAAAAABiAAAAEAAAABAAAAAA= + AAAAAAAAACAAABAAABAAABAAAAgAAAAEAAAABAAAAAA= TitleCell.cs - - + + AAIAAAAAAAAAABAACABABAQAAAAAAAAECAAAEABAAAA= - DataRowList.cs + NormalRowList.cs - - + + - AAIAAAAAAAAAABCACAAAAAQAAAAAAAAECAAAEAAAAAA= - DataColumnList.cs + AAIAAAAAAAAAABAACAAAAAQAAAAAAAAECAAAEAAAAAA= + ColumnList.cs - + gwAAAAAICBBAABAAACAQAAIAAAEYAAIgCACAgAAAAkA= BorderTemplate.cs - - + + + + AAAAAAEAAgAAABAACAAAgAACAAAAAAAAAAAAAAAAAAA= + NormalRow.cs + + + + + + AAAAAAIAAACgAAAAAAAAFAAADAAAAAAAAAAAAAAAAAA= + Column.cs + + + + + + AAAAAAAAAEAgEBAAAAAAERAACAAAAAAAAAAAAAAAAAA= + DataGridBorder.cs + + + + + + + + + + + HeaderRow.cs + + + + + + AAAAAAEAAAAAABAACAAAAAAAAAAAAAAACAAAAAAAAAA= + HeaderRow.cs + + + + + + AAQAIAAAACAAABAAAAAAABAAAAABAAQEAAIABAACAAA= + HeaderCell.cs + + + + - AAAAAAAAAAAAAAAAgAAAFAAAABCAAAAAAAAAAAAAAAA= - DataColumn.cs + AAQAYAAAACAAABAAABEAABAAAAgAAAAEAAAABAACAAA= + NormalCell.cs - - + + - AAAAAAMAAgCAAAAACAAAkAACBAAAAAAAABAAAAAAAAA= - DataRow.cs + AABQAAAAAmAgABAEgAAAABAACBGAAAAEAAAADAAAAAA= + CellBase.cs diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs index 654f9492..c58ef66f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/Column.cs @@ -36,7 +36,7 @@ public class Column /// /// Gets or sets the instance that contains the current instance. /// - public DataGrid ParentDataGrid { get; set; } + public DataGrid ParentDataGrid { get; internal set; } /// /// Gets or sets the foreground color applied to all the cells in the column. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs index 789c8920..ed666831 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ColumnList.cs @@ -63,25 +63,31 @@ public ColumnList(DataGrid parentDataGrid) /// Adds a new to the end of the list. /// /// The text to be displayed in the header of the column. - public void Add(string columnHeader) + /// The newly created column. + public Column Add(string columnHeader) { Column column = new Column(columnHeader) { ParentDataGrid = parentDataGrid }; columns.Add(column); + + return column; } /// /// Adds a new to the end of the list. /// /// The instance to be added. - public void Add(Column column) + /// The newly added column. + public Column Add(Column column) { if (column == null) throw new ArgumentNullException(nameof(column)); column.ParentDataGrid = parentDataGrid; columns.Add(column); + + return column; } /// diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj index 2bd6e066..5117927c 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2;net45 + netstandard2.0 DustInTheWind.ConsoleTools.Controls.Tables DustInTheWind.ConsoleTools.Controls.Tables true diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs similarity index 84% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalCell.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs index 04a490a4..0ad5ce02 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs @@ -26,77 +26,77 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// /// Represents a cell that contains data. /// - public class NormalCell : CellBase + public class DataCell : CellBase { /// /// Gets or sets the row that contains the current cell. /// - public NormalRow ParentRow { get; internal set; } + public DataRow ParentRow { get; internal set; } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// empty content. /// - public NormalCell() + public DataCell() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it. /// /// The text displayed in the cell. - public NormalCell(string text) + public DataCell(string text) : base(text) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it and its horizontal alignment. /// /// The text displayed in the cell. /// The horizontal alignment of the content of the new cell. - public NormalCell(string text, HorizontalAlignment horizontalAlignment) + public DataCell(string text, HorizontalAlignment horizontalAlignment) : base(text, horizontalAlignment) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it. /// /// - public NormalCell(MultilineText text) + public DataCell(MultilineText text) : base(text) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it and its horizontal alignment. /// /// /// The horizontal alignment of the content of the new cell. - public NormalCell(MultilineText text, HorizontalAlignment horizontalAlignment) + public DataCell(MultilineText text, HorizontalAlignment horizontalAlignment) : base(text, horizontalAlignment) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// an object representing the content. /// - public NormalCell(object content) + public DataCell(object content) : base(content) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// an object representing the content and its horizontal alignment. /// - public NormalCell(object content, HorizontalAlignment horizontalAlignment) + public DataCell(object content, HorizontalAlignment horizontalAlignment) : base(content, horizontalAlignment) { } @@ -258,20 +258,20 @@ private HorizontalAlignment CalculateHorizontalAlignmentAtTableLevel() } /// - /// Converts a into a instance. + /// Converts a into a instance. /// /// The text to be converted. - public static implicit operator NormalCell(string text) + public static implicit operator DataCell(string text) { MultilineText multilineText = new MultilineText(text); - return new NormalCell(multilineText); + return new DataCell(multilineText); } /// - /// Converts a into its representation. + /// Converts a into its representation. /// - /// The to be converted. - public static implicit operator string(NormalCell cell) + /// The to be converted. + public static implicit operator string(DataCell cell) { return cell.Content?.ToString() ?? string.Empty; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index cb2598f5..579dcfb9 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -96,14 +96,14 @@ private set /// /// Gets the list of rows contained by the current data grid. /// - public NormalRowList Rows { get; } + public DataRowList Rows { get; } /// /// Gets the row at the specified index. /// /// The zero-based index of the row to get. /// The row at the specified index. - public NormalRow this[int rowIndex] => Rows[rowIndex]; + public DataRow this[int rowIndex] => Rows[rowIndex]; /// /// Gets the cell at the specified location. @@ -111,7 +111,7 @@ private set /// The zero-based row index of the cell to get. /// The zero-based column index of the cell to get. /// The cell at the specified location. - public NormalCell this[int rowIndex, int columnIndex] => Rows[rowIndex][columnIndex]; + public DataCell this[int rowIndex, int columnIndex] => Rows[rowIndex][columnIndex]; /// /// Gets an object representing the border of the data grid. @@ -254,7 +254,7 @@ public bool DisplayBorderBetweenRows /// public DataGrid() { - Rows = new NormalRowList(this); + Rows = new DataRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(); @@ -267,7 +267,7 @@ public DataGrid() /// public DataGrid(string title) { - Rows = new NormalRowList(this); + Rows = new DataRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); @@ -280,7 +280,7 @@ public DataGrid(string title) /// public DataGrid(MultilineText title) { - Rows = new NormalRowList(this); + Rows = new DataRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); @@ -293,7 +293,7 @@ public DataGrid(MultilineText title) /// public DataGrid(object title) { - Rows = new NormalRowList(this); + Rows = new DataRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs index c6fe3415..d047a55f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBorder.cs @@ -59,12 +59,20 @@ public class DataGridBorder /// public bool DisplayBorderBetweenRows { get; set; } + /// + /// Decides what is the foreground color. + /// If the foreground color is not set explicitly it tries to calculated based on the parent . + /// public ConsoleColor? CalculateForegroundColor() { return ForegroundColor ?? ParentDataGrid?.ForegroundColor; } + /// + /// Decides what is the background color. + /// If the background color is not set explicitly it tries to calculated based on the parent . + /// public ConsoleColor? CalculateBackgroundColor() { return BackgroundColor ?? diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs index 0919d0ad..10c8dc9f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs @@ -40,9 +40,9 @@ public DataGridBuilderFromDataTable(DataTable dataTable) DataGrid.Columns.Add(columnHeader); } - foreach (DataRow dataRow in dataTable.Rows) + foreach (System.Data.DataRow dataRow in dataTable.Rows) { - NormalRow row = new NormalRow(dataRow.ItemArray); + DataRow row = new DataRow(dataRow.ItemArray); DataGrid.Rows.Add(row); } } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs index 89e61152..3cac3858 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs @@ -68,7 +68,7 @@ public void Add(object item) if (item == null) return; - NormalRow normalRow = new NormalRow(); + DataRow dataRow = new DataRow(); foreach (MemberInfo memberInfo in members) { @@ -77,19 +77,19 @@ public void Add(object item) case FieldInfo fieldInfo: { object value = fieldInfo.GetValue(item); - normalRow.AddCell(value); + dataRow.AddCell(value); break; } case PropertyInfo propertyInfo: { object value = propertyInfo.GetValue(item); - normalRow.AddCell(value); + dataRow.AddCell(value); break; } } } - DataGrid.Rows.Add(normalRow); + DataGrid.Rows.Add(dataRow); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs similarity index 77% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRow.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs index 09aad2bd..0cbc3622 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs @@ -28,12 +28,12 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// /// Represents a row in the class. /// - public class NormalRow : RowBase + public class DataRow : RowBase { /// /// Gets the list of cells contained by the row. /// - private readonly List cells = new List(); + private readonly List cells = new List(); /// /// Gets the number of cells contained by the current instance. @@ -46,53 +46,53 @@ public class NormalRow : RowBase /// The zero-based index of the cell to get or set. /// The cell at the specified index. /// - public NormalCell this[int index] + public DataCell this[int index] { get => cells[index]; set => cells[index] = value; } /// - /// Initializes a new instance of the class with default values. + /// Initializes a new instance of the class with default values. /// - public NormalRow() + public DataRow() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of cells. /// /// The list of cells that will be contained by the new row. - public NormalRow(IEnumerable cells) + public DataRow(IEnumerable cells) { if (cells == null) return; - foreach (NormalCell cell in cells) + foreach (DataCell cell in cells) AddCell(cell); } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of cells. /// /// The list of cells that will be contained by the new row. - public NormalRow(params NormalCell[] cells) + public DataRow(params DataCell[] cells) { if (cells == null) return; - foreach (NormalCell cell in cells) + foreach (DataCell cell in cells) AddCell(cell); } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of texts representing the cells content. /// /// The list of texts that will be placed in cells. - public NormalRow(IEnumerable cellContents) + public DataRow(IEnumerable cellContents) { if (cellContents == null) return; @@ -102,11 +102,11 @@ public NormalRow(IEnumerable cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of texts representing the cells content. /// /// The list of texts that will be placed in cells. - public NormalRow(params string[] cellContents) + public DataRow(params string[] cellContents) { if (cellContents == null) return; @@ -116,11 +116,11 @@ public NormalRow(params string[] cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public NormalRow(IEnumerable cellContents) + public DataRow(IEnumerable cellContents) { if (cellContents == null) return; @@ -130,11 +130,11 @@ public NormalRow(IEnumerable cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public NormalRow(params MultilineText[] cellContents) + public DataRow(params MultilineText[] cellContents) { if (cellContents == null) return; @@ -144,11 +144,11 @@ public NormalRow(params MultilineText[] cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public NormalRow(IEnumerable cellContents) + public DataRow(IEnumerable cellContents) { if (cellContents == null) return; @@ -158,11 +158,11 @@ public NormalRow(IEnumerable cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public NormalRow(params object[] cellContents) + public DataRow(params object[] cellContents) { if (cellContents == null) return; @@ -172,13 +172,13 @@ public NormalRow(params object[] cellContents) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// - public void AddCell(NormalCell cell) + public void AddCell(DataCell cell) { if (cell == null) { - NormalCell newCell = new NormalCell + DataCell newCell = new DataCell { ParentRow = this }; @@ -192,11 +192,11 @@ public void AddCell(NormalCell cell) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// public void AddCell(string cellContent) { - NormalCell newCell = new NormalCell + DataCell newCell = new DataCell { ParentRow = this }; @@ -208,11 +208,11 @@ public void AddCell(string cellContent) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// public void AddCell(MultilineText cellContent) { - NormalCell newCell = new NormalCell + DataCell newCell = new DataCell { ParentRow = this }; @@ -224,11 +224,11 @@ public void AddCell(MultilineText cellContent) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// public void AddCell(object cellContent) { - NormalCell newCell = new NormalCell + DataCell newCell = new DataCell { ParentRow = this }; @@ -240,10 +240,10 @@ public void AddCell(object cellContent) } /// - /// Returns the index of the specified cell or null if the instance - /// is not found in the current instance. + /// Returns the index of the specified cell or null if the instance + /// is not found in the current instance. /// - public int? IndexOfCell(NormalCell cell) + public int? IndexOfCell(DataCell cell) { int indexOfCell = cells.IndexOf(cell); return indexOfCell == -1 ? (int?)null : indexOfCell; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRowList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs similarity index 71% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRowList.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs index 3676be2f..cd4f50e6 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/NormalRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs @@ -22,18 +22,17 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; namespace DustInTheWind.ConsoleTools.Controls.Tables { /// - /// Contains the list of s displayed by the table. + /// Contains the list of s displayed by the table. /// - public class NormalRowList : IEnumerable + public class DataRowList : IEnumerable { private readonly DataGrid parentDataGrid; - private readonly List rows = new List(); + private readonly List rows = new List(); /// /// Gets the number of rows contained in the current instance. @@ -41,21 +40,21 @@ public class NormalRowList : IEnumerable public int Count => rows.Count; /// - /// Gets the at the specified index. + /// Gets the at the specified index. /// If the index is outside of the bounds of the list, null is returned. /// - /// The index of the to return. - /// The at the specified index. - public NormalRow this[int rowIndex] => rowIndex >= 0 && rowIndex < rows.Count + /// The index of the to return. + /// The at the specified index. + public DataRow this[int rowIndex] => rowIndex >= 0 && rowIndex < rows.Count ? rows[rowIndex] : null; /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the that owns it. /// /// The that owns the new instance. - public NormalRowList(DataGrid parentDataGrid) + public DataRowList(DataGrid parentDataGrid) { this.parentDataGrid = parentDataGrid ?? throw new ArgumentNullException(nameof(parentDataGrid)); } @@ -64,157 +63,184 @@ public NormalRowList(DataGrid parentDataGrid) /// Adds a new row to the current table. /// /// The row to be added. + /// The added row. /// - public void Add(NormalRow row) + public DataRow Add(DataRow row) { if (row == null) throw new ArgumentNullException(nameof(row)); row.ParentDataGrid = parentDataGrid; rows.Add(row); + + return row; } /// /// Adds a new row to the current table. /// /// The list of cells of the new row. - public void Add(IEnumerable cells) + /// The newly created row. + public DataRow Add(IEnumerable cells) { if (cells == null) throw new ArgumentNullException(nameof(cells)); - NormalRow row = new NormalRow(cells) + DataRow row = new DataRow(cells) { ParentDataGrid = parentDataGrid }; rows.Add(row); + + return row; } /// /// Adds a new row to the current table. /// /// The list of cells of the new row. - public void Add(params NormalCell[] cells) + /// The newly created row. + public DataRow Add(params DataCell[] cells) { if (cells == null) throw new ArgumentNullException(nameof(cells)); - NormalRow row = new NormalRow(cells) + DataRow row = new DataRow(cells) { ParentDataGrid = parentDataGrid }; rows.Add(row); + + return row; } /// /// Adds a new row to the current table. /// /// The list of cell contents of the new row. - public void Add(IEnumerable cellContents) + /// The newly created row. + public DataRow Add(IEnumerable cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - NormalRow row = new NormalRow + DataRow row = new DataRow { ParentDataGrid = parentDataGrid }; foreach (string text in cellContents) - row.AddCell(new NormalCell(text)); + row.AddCell(new DataCell(text)); rows.Add(row); + + return row; } /// /// Adds a new row to the current table. /// /// The list of cell contents of the new row. - public void Add(params string[] cellContents) + /// The newly created row. + public DataRow Add(params string[] cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - NormalRow row = new NormalRow + DataRow row = new DataRow { ParentDataGrid = parentDataGrid }; foreach (string text in cellContents) - row.AddCell(new NormalCell(text)); + row.AddCell(new DataCell(text)); rows.Add(row); + + return row; } /// /// Adds a new row to the current table. /// /// The list of cell contents of the new row. - public void Add(IEnumerable cellContents) + /// The newly created row. + public DataRow Add(IEnumerable cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - NormalRow row = new NormalRow + DataRow row = new DataRow { ParentDataGrid = parentDataGrid }; foreach (MultilineText text in cellContents) - row.AddCell(new NormalCell(text)); + row.AddCell(new DataCell(text)); rows.Add(row); + + return row; } /// /// Adds a new row to the current table. /// /// The list of cell contents of the new row. - public void Add(params MultilineText[] cellContents) + /// The newly created row. + public DataRow Add(params MultilineText[] cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - NormalRow row = new NormalRow + DataRow row = new DataRow { ParentDataGrid = parentDataGrid }; foreach (MultilineText text in cellContents) - row.AddCell(new NormalCell(text)); + row.AddCell(new DataCell(text)); rows.Add(row); + + return row; } /// /// Adds a new row to the current table. /// /// The list of cell contents of the new row. - public void Add(IEnumerable cellContents) + /// The newly created row. + public DataRow Add(IEnumerable cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - NormalRow row = new NormalRow + DataRow row = new DataRow { ParentDataGrid = parentDataGrid }; foreach (object cellContent in cellContents) - row.AddCell(new NormalCell(cellContent)); + row.AddCell(new DataCell(cellContent)); rows.Add(row); + + return row; } /// /// Adds a new row to the current table. /// /// The list of cell contents of the new row. - public void Add(params object[] cellContents) + /// The newly created row. + public DataRow Add(params object[] cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - NormalRow row = new NormalRow + DataRow row = new DataRow { ParentDataGrid = parentDataGrid }; foreach (object cellContent in cellContents) - row.AddCell(new NormalCell(cellContent)); + row.AddCell(new DataCell(cellContent)); rows.Add(row); + + return row; } /// @@ -227,11 +253,11 @@ public void RemoveAt(int index) } /// - /// Removes the first occurrence of the instance from the list. + /// Removes the first occurrence of the instance from the list. /// /// true if item is successfully removed; otherwise, false. /// This method also returns false if item was not found in the list. - public bool Remove(NormalRow row) + public bool Remove(DataRow row) { return rows.Remove(row); } @@ -245,9 +271,9 @@ public void Clear() } /// - /// Returns an enumerator that iterates through the s contained by the current instance. + /// Returns an enumerator that iterates through the s contained by the current instance. /// - public IEnumerator GetEnumerator() + public IEnumerator GetEnumerator() { return rows.GetEnumerator(); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs index 1054a127..6b01b3f0 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridX.cs @@ -19,7 +19,6 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose -using System; using System.Collections.Generic; using System.Linq; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index 22011e55..d7a3543f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -35,7 +35,7 @@ internal class DataGridXBuilder public HeaderRow HeaderRow { get; set; } - public NormalRowList Rows { get; set; } + public DataRowList Rows { get; set; } public DataGridBorder DataGridBorder { get; set; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs index b22bd01b..7fcda380 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs @@ -89,16 +89,16 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) } } - public static RowX CreateFrom(NormalRow normalRow) + public static RowX CreateFrom(DataRow dataRow) { - if (normalRow == null) throw new ArgumentNullException(nameof(normalRow)); + if (dataRow == null) throw new ArgumentNullException(nameof(dataRow)); RowX rowX = new RowX { - Border = normalRow.ParentDataGrid?.Border?.IsVisible == true - ? DataGridBorderX.CreateFrom(normalRow.ParentDataGrid.Border) + Border = dataRow.ParentDataGrid?.Border?.IsVisible == true + ? DataGridBorderX.CreateFrom(dataRow.ParentDataGrid.Border) : null, - Cells = normalRow + Cells = dataRow .Select(CellX.CreateFrom) .ToList() }; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj index 1c4e8c50..b31ee0be 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2;net45 + netstandard2.0 DustInTheWind.ConsoleTools.Controls DustInTheWind.ConsoleTools.Controls true diff --git a/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj b/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj index 41d017fb..6ad4674f 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj +++ b/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj @@ -1,7 +1,7 @@ - netcoreapp2.2;net45 + netstandard2.0 DustInTheWind.ConsoleTools DustInTheWind.ConsoleTools.Core true diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj index 73d7f529..538efc95 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2;net45 + netstandard2.0 DustInTheWind.ConsoleTools.Mvc DustInTheWind.ConsoleTools.Mvc false diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj index f06519a4..c19726c1 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2;net45 + netstandard2.0 DustInTheWind.ConsoleTools.Tests DustInTheWind.ConsoleTools.Tests false diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingLeftTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingLeftTests.cs index 73a4054e..7ee78c47 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingLeftTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingLeftTests.cs @@ -9,9 +9,9 @@ public class CalculatePaddingLeftTests [Test] public void HavingCellWithNoPadding_WhenCalculatingPaddingLeft_ThenPaddingLeftIs1() { - NormalCell normalCell = new NormalCell(); + DataCell dataCell = new DataCell(); - int actual = normalCell.CalculatePaddingLeft(); + int actual = dataCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(1)); } @@ -19,12 +19,12 @@ public void HavingCellWithNoPadding_WhenCalculatingPaddingLeft_ThenPaddingLeftIs [Test] public void HavingCellWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() { - NormalCell normalCell = new NormalCell + DataCell dataCell = new DataCell { PaddingLeft = 5 }; - int actual = normalCell.CalculatePaddingLeft(); + int actual = dataCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(5)); } @@ -32,14 +32,14 @@ public void HavingCellWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLef [Test] public void HavingRowWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() { - NormalCell normalCell = new NormalCell(); - NormalRow normalRow = new NormalRow + DataCell dataCell = new DataCell(); + DataRow dataRow = new DataRow { CellPaddingLeft = 5 }; - normalRow.AddCell(normalCell); + dataRow.AddCell(dataCell); - int actual = normalCell.CalculatePaddingLeft(); + int actual = dataCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(5)); } @@ -47,18 +47,18 @@ public void HavingRowWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeft [Test] public void HavingDataGridWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() { - NormalCell normalCell = new NormalCell(); + DataCell dataCell = new DataCell(); - NormalRow normalRow = new NormalRow(); - normalRow.AddCell(normalCell); + DataRow dataRow = new DataRow(); + dataRow.AddCell(dataCell); DataGrid dataGrid = new DataGrid { CellPaddingLeft = 5 }; - dataGrid.Rows.Add(normalRow); + dataGrid.Rows.Add(dataRow); - int actual = normalCell.CalculatePaddingLeft(); + int actual = dataCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(5)); } @@ -66,13 +66,13 @@ public void HavingDataGridWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddin [Test] public void HavingColumnWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingLeftIs5() { - NormalCell normalCell = new NormalCell(); + DataCell dataCell = new DataCell(); - NormalRow normalRow = new NormalRow(); - normalRow.AddCell(normalCell); + DataRow dataRow = new DataRow(); + dataRow.AddCell(dataCell); DataGrid dataGrid = new DataGrid(); - dataGrid.Rows.Add(normalRow); + dataGrid.Rows.Add(dataRow); Column column = new Column { @@ -80,7 +80,7 @@ public void HavingColumnWithPaddingLeft5_WhenCalculatingPaddingLeft_ThenPaddingL }; dataGrid.Columns.Add(column); - int actual = normalCell.CalculatePaddingLeft(); + int actual = dataCell.CalculatePaddingLeft(); Assert.That(actual, Is.EqualTo(5)); } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingRightTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingRightTests.cs index 146f1759..39d23c1f 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingRightTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/CalculatePaddingRightTests.cs @@ -9,9 +9,9 @@ public class CalculatePaddingRightRight [Test] public void HavingCellWithNoPadding_WhenCalculatingPaddingRight_ThenPaddingRightIs1() { - NormalCell normalCell = new NormalCell(); + DataCell dataCell = new DataCell(); - int actual = normalCell.CalculatePaddingRight(); + int actual = dataCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(1)); } @@ -19,12 +19,12 @@ public void HavingCellWithNoPadding_WhenCalculatingPaddingRight_ThenPaddingRight [Test] public void HavingCellWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() { - NormalCell normalCell = new NormalCell + DataCell dataCell = new DataCell { PaddingRight = 5 }; - int actual = normalCell.CalculatePaddingRight(); + int actual = dataCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(5)); } @@ -32,14 +32,14 @@ public void HavingCellWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingR [Test] public void HavingRowWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() { - NormalCell normalCell = new NormalCell(); - NormalRow normalRow = new NormalRow + DataCell dataCell = new DataCell(); + DataRow dataRow = new DataRow { CellPaddingRight = 5 }; - normalRow.AddCell(normalCell); + dataRow.AddCell(dataCell); - int actual = normalCell.CalculatePaddingRight(); + int actual = dataCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(5)); } @@ -47,18 +47,18 @@ public void HavingRowWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRi [Test] public void HavingDataGridWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() { - NormalCell normalCell = new NormalCell(); + DataCell dataCell = new DataCell(); - NormalRow normalRow = new NormalRow(); - normalRow.AddCell(normalCell); + DataRow dataRow = new DataRow(); + dataRow.AddCell(dataCell); DataGrid dataGrid = new DataGrid { CellPaddingRight = 5 }; - dataGrid.Rows.Add(normalRow); + dataGrid.Rows.Add(dataRow); - int actual = normalCell.CalculatePaddingRight(); + int actual = dataCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(5)); } @@ -66,13 +66,13 @@ public void HavingDataGridWithPaddingRight5_WhenCalculatingPaddingRight_ThenPadd [Test] public void HavingColumnWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddingRightIs5() { - NormalCell normalCell = new NormalCell(); + DataCell dataCell = new DataCell(); - NormalRow normalRow = new NormalRow(); - normalRow.AddCell(normalCell); + DataRow dataRow = new DataRow(); + dataRow.AddCell(dataCell); DataGrid dataGrid = new DataGrid(); - dataGrid.Rows.Add(normalRow); + dataGrid.Rows.Add(dataRow); Column column = new Column { @@ -80,7 +80,7 @@ public void HavingColumnWithPaddingRight5_WhenCalculatingPaddingRight_ThenPaddin }; dataGrid.Columns.Add(column); - int actual = normalCell.CalculatePaddingRight(); + int actual = dataCell.CalculatePaddingRight(); Assert.That(actual, Is.EqualTo(5)); } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextAndAlignmentTests.cs index 937afbfd..c6be85eb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextAndAlignmentTests.cs @@ -22,31 +22,31 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests [TestFixture] public class ConstructorMultilineTextAndAlignmentTests { - private NormalCell normalCell; + private DataCell dataCell; [SetUp] public void SetUp() { MultilineText multilineText = new MultilineText("some content"); - normalCell = new NormalCell(multilineText, HorizontalAlignment.Center); + dataCell = new DataCell(multilineText, HorizontalAlignment.Center); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("some content"))); + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(normalCell.IsEmpty, Is.False); + Assert.That(dataCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Center() { - Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextTests.cs index b98a4724..cbfdee21 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorMultilineTextTests.cs @@ -22,31 +22,31 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests [TestFixture] public class ConstructorMultilineTextTests { - private NormalCell normalCell; + private DataCell dataCell; [SetUp] public void SetUp() { MultilineText multilineText = new MultilineText("some content"); - normalCell = new NormalCell(multilineText); + dataCell = new DataCell(multilineText); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("some content"))); + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(normalCell.IsEmpty, Is.False); + Assert.That(dataCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Default() { - Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorNoParamsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorNoParamsTests.cs index 70e1f032..2a81f3b9 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorNoParamsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorNoParamsTests.cs @@ -22,30 +22,30 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests [TestFixture] public class ConstructorNoParamsTests { - private NormalCell normalCell; + private DataCell dataCell; [SetUp] public void SetUp() { - normalCell = new NormalCell(); + dataCell = new DataCell(); } [Test] public void Content_is_empty() { - Assert.That(normalCell.Content, Is.SameAs(MultilineText.Empty)); + Assert.That(dataCell.Content, Is.SameAs(MultilineText.Empty)); } [Test] public void IsEmpty_is_true() { - Assert.That(normalCell.IsEmpty, Is.True); + Assert.That(dataCell.IsEmpty, Is.True); } [Test] public void HorizontalAlignment_is_Default() { - Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectAndAlignmentTests.cs index 39cf231d..fcee5bba 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectAndAlignmentTests.cs @@ -22,7 +22,7 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests [TestFixture] public class ConstructorObjectAndAlignmentTests { - private NormalCell normalCell; + private DataCell dataCell; private class Content { @@ -36,25 +36,25 @@ public override string ToString() public void SetUp() { Content content = new Content(); - normalCell = new NormalCell(content, HorizontalAlignment.Center); + dataCell = new DataCell(content, HorizontalAlignment.Center); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("content"))); + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(normalCell.IsEmpty, Is.False); + Assert.That(dataCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Center() { - Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectTests.cs index e5e0c592..32e6a2ef 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorObjectTests.cs @@ -22,7 +22,7 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests [TestFixture] public class ConstructorObjectTests { - private NormalCell normalCell; + private DataCell dataCell; private class Content { @@ -36,25 +36,25 @@ public override string ToString() public void SetUp() { Content content = new Content(); - normalCell = new NormalCell(content); + dataCell = new DataCell(content); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("content"))); + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(normalCell.IsEmpty, Is.False); + Assert.That(dataCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Default() { - Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringAndAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringAndAlignmentTests.cs index 61ac4742..ae3ee7d4 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringAndAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringAndAlignmentTests.cs @@ -22,30 +22,30 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests [TestFixture] public class ConstructorStringAndAlignmentTests { - private NormalCell normalCell; + private DataCell dataCell; [SetUp] public void SetUp() { - normalCell = new NormalCell("some content", HorizontalAlignment.Center); + dataCell = new DataCell("some content", HorizontalAlignment.Center); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("some content"))); + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(normalCell.IsEmpty, Is.False); + Assert.That(dataCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Center() { - Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Center)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringTests.cs index 34938972..a3a3d871 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalCellTests/ConstructorStringTests.cs @@ -22,30 +22,30 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalCellTests [TestFixture] public class ConstructorStringTests { - private NormalCell normalCell; + private DataCell dataCell; [SetUp] public void SetUp() { - normalCell = new NormalCell("some content"); + dataCell = new DataCell("some content"); } [Test] public void Content_is_the_one_provided_on_constructor() { - Assert.That(normalCell.Content, Is.EqualTo(new MultilineText("some content"))); + Assert.That(dataCell.Content, Is.EqualTo(new MultilineText("some content"))); } [Test] public void IsEmpty_is_false() { - Assert.That(normalCell.IsEmpty, Is.False); + Assert.That(dataCell.IsEmpty, Is.False); } [Test] public void HorizontalAlignment_is_Default() { - Assert.That(normalCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); + Assert.That(dataCell.HorizontalAlignment, Is.EqualTo(HorizontalAlignment.Default)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellEnumerationTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellEnumerationTests.cs index 8ec76151..713dea5a 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellEnumerationTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellEnumerationTests.cs @@ -25,43 +25,43 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests public class AddCellEnumerationTests { private DataGrid dataGrid; - private NormalRowList normalRowList; + private DataRowList dataRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - normalRowList = new NormalRowList(dataGrid); + dataRowList = new DataRowList(dataGrid); } [Test] public void HavingAnEmptyNormalRowList_WhenThreeCellsAreAdded_ThenRowCountIs1() { - IEnumerable cells = new List + IEnumerable cells = new List { - new NormalCell(), - new NormalCell(), - new NormalCell() + new DataCell(), + new DataCell(), + new DataCell() }; - normalRowList.Add(cells); + dataRowList.Add(cells); - Assert.That(normalRowList.Count, Is.EqualTo(1)); + Assert.That(dataRowList.Count, Is.EqualTo(1)); } [Test] public void HavingAnEmptyNormalRowList_WhenThreeCellsAreAdded_ThenRowContainsTheThreeCells() { - IEnumerable cells = new List + IEnumerable cells = new List { - new NormalCell(), - new NormalCell(), - new NormalCell() + new DataCell(), + new DataCell(), + new DataCell() }; - normalRowList.Add(cells); + dataRowList.Add(cells); - Assert.That(normalRowList[0], Is.EqualTo(cells)); + Assert.That(dataRowList[0], Is.EqualTo(cells)); } [Test] @@ -69,7 +69,7 @@ public void HavingAnEmptyNormalRowList_WhenNullDataCellEnumerationIsAdded_ThenTh { Assert.Throws(() => { - normalRowList.Add((List)null); + dataRowList.Add((List)null); }); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellsTests.cs index 54b15129..f8cc16ee 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddCellsTests.cs @@ -24,51 +24,51 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests public class AddCellsTests { private DataGrid dataGrid; - private NormalRowList normalRowList; + private DataRowList dataRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - normalRowList = new NormalRowList(dataGrid); + dataRowList = new DataRowList(dataGrid); } [Test] public void HavingAnEmptyNormalRowList_WhenThreeCellsAreAdded_ThenRowCountIs1() { - NormalCell normalCell1 = new NormalCell(); - NormalCell normalCell2 = new NormalCell(); - NormalCell normalCell3 = new NormalCell(); + DataCell dataCell1 = new DataCell(); + DataCell dataCell2 = new DataCell(); + DataCell dataCell3 = new DataCell(); - normalRowList.Add(normalCell1, normalCell2, normalCell3); + dataRowList.Add(dataCell1, dataCell2, dataCell3); - Assert.That(normalRowList.Count, Is.EqualTo(1)); + Assert.That(dataRowList.Count, Is.EqualTo(1)); } [Test] public void HavingAnEmptyNormalRowList_WhenThreeCellsAreAdded_ThenRowContainsTheThreeCells() { - NormalCell normalCell1 = new NormalCell(); - NormalCell normalCell2 = new NormalCell(); - NormalCell normalCell3 = new NormalCell(); + DataCell dataCell1 = new DataCell(); + DataCell dataCell2 = new DataCell(); + DataCell dataCell3 = new DataCell(); - normalRowList.Add(normalCell1, normalCell2, normalCell3); + dataRowList.Add(dataCell1, dataCell2, dataCell3); - List expected = new List + List expected = new List { - normalCell1, - normalCell2, - normalCell3 + dataCell1, + dataCell2, + dataCell3 }; - Assert.That(normalRowList[0], Is.EqualTo(expected)); + Assert.That(dataRowList[0], Is.EqualTo(expected)); } [Test] public void HavingAnEmptyNormalRowList_WhenNullDataCellIsAdded_ThenRowContainsEmptyCell() { - normalRowList.Add((NormalCell)null); + dataRowList.Add((DataCell)null); - Assert.That(normalRowList[0][0].IsEmpty, Is.True); + Assert.That(dataRowList[0][0].IsEmpty, Is.True); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddNormalRowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddNormalRowTests.cs index dbd93f8f..c54c97c3 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddNormalRowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddNormalRowTests.cs @@ -24,43 +24,43 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests public class AddNormalRowTests { private DataGrid dataGrid; - private NormalRowList normalRowList; + private DataRowList dataRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - normalRowList = new NormalRowList(dataGrid); + dataRowList = new DataRowList(dataGrid); } [Test] public void HavingAnEmptyNormalRowList_WhenOneNormalRowIsAdded_ThenRowCountIs1() { - NormalRow normalRow = new NormalRow(); + DataRow dataRow = new DataRow(); - normalRowList.Add(normalRow); + dataRowList.Add(dataRow); - Assert.That(normalRowList.Count, Is.EqualTo(1)); + Assert.That(dataRowList.Count, Is.EqualTo(1)); } [Test] public void HavingAnEmptyNormalRowList_WhenOneNormalRowIsAdded_ThenListContainsTheNormalRow() { - NormalRow normalRow = new NormalRow(); + DataRow dataRow = new DataRow(); - normalRowList.Add(normalRow); + dataRowList.Add(dataRow); - Assert.That(normalRowList[0], Is.SameAs(normalRow)); + Assert.That(dataRowList[0], Is.SameAs(dataRow)); } [Test] public void HavingAnEmptyNormalRowList_WhenOneNormalRowIsAdded_ThenDataGridIsSetToNormalRow() { - NormalRow normalRow = new NormalRow(); + DataRow dataRow = new DataRow(); - normalRowList.Add(normalRow); + dataRowList.Add(dataRow); - Assert.That(normalRow.ParentDataGrid, Is.SameAs(dataGrid)); + Assert.That(dataRow.ParentDataGrid, Is.SameAs(dataGrid)); } [Test] @@ -68,7 +68,7 @@ public void HavingAnEmptyNormalRowList_WhenNullNormalRowIsAdded_ThenThrows() { Assert.Throws(() => { - normalRowList.Add((NormalRow)null); + dataRowList.Add((DataRow)null); }); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringEnumerationTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringEnumerationTests.cs index 2743ba85..f1fd5b76 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringEnumerationTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringEnumerationTests.cs @@ -26,13 +26,13 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests public class AddStringEnumerationTests { private DataGrid dataGrid; - private NormalRowList normalRowList; + private DataRowList dataRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - normalRowList = new NormalRowList(dataGrid); + dataRowList = new DataRowList(dataGrid); } [Test] @@ -43,9 +43,9 @@ public void HavingAnEmptyNormalRowList_WhenThreeStringsAreAdded_ThenRowCountIs1( "value 1", "value 2", "value 3" }; - normalRowList.Add(values); + dataRowList.Add(values); - Assert.That(normalRowList.Count, Is.EqualTo(1)); + Assert.That(dataRowList.Count, Is.EqualTo(1)); } [Test] @@ -56,9 +56,9 @@ public void HavingAnEmptyNormalRowList_WhenThreeStringsAreAdded_ThenRowContainsT "value 1", "value 2", "value 3" }; - normalRowList.Add(values); + dataRowList.Add(values); - IEnumerable actual = normalRowList[0] + IEnumerable actual = dataRowList[0] .Select(x => x.Content.ToString()); Assert.That(actual, Is.EqualTo(values)); } @@ -68,7 +68,7 @@ public void HavingAnEmptyNormalRowList_WhenNullStringEnumerationIsAdded_ThenThro { Assert.Throws(() => { - normalRowList.Add((IEnumerable)null); + dataRowList.Add((IEnumerable)null); }); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringsTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringsTests.cs index 17a8e88f..d22fb920 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringsTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/AddStringsTests.cs @@ -25,29 +25,29 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests public class AddStringsTests { private DataGrid dataGrid; - private NormalRowList normalRowList; + private DataRowList dataRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - normalRowList = new NormalRowList(dataGrid); + dataRowList = new DataRowList(dataGrid); } [Test] public void HavingAnEmptyNormalRowList_WhenThreeStringsAreAdded_ThenRowCountIs1() { - normalRowList.Add("value 1", "value 2", "value 3"); + dataRowList.Add("value 1", "value 2", "value 3"); - Assert.That(normalRowList.Count, Is.EqualTo(1)); + Assert.That(dataRowList.Count, Is.EqualTo(1)); } [Test] public void HavingAnEmptyNormalRowList_WhenThreeStringsAreAdded_ThenRowContainsThreeCellsWithCorrectValues() { - normalRowList.Add("value 1", "value 2", "value 3"); + dataRowList.Add("value 1", "value 2", "value 3"); - IEnumerable actual = normalRowList[0] + IEnumerable actual = dataRowList[0] .Select(x => x.Content.ToString()); IEnumerable expected = new List { @@ -60,9 +60,9 @@ public void HavingAnEmptyNormalRowList_WhenThreeStringsAreAdded_ThenRowContainsT [Test] public void HavingAnEmptyNormalRowList_WhenNullStringIsAdded_ThenRowContainsEmptyCell() { - normalRowList.Add((string)null); + dataRowList.Add((string)null); - Assert.That(normalRowList[0][0].IsEmpty, Is.True); + Assert.That(dataRowList[0][0].IsEmpty, Is.True); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ClearTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ClearTests.cs index 7ae1fdb1..b8b015e6 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ClearTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ClearTests.cs @@ -23,42 +23,42 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests public class ClearTests { private DataGrid dataGrid; - private NormalRowList normalRowList; + private DataRowList dataRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - normalRowList = new NormalRowList(dataGrid); + dataRowList = new DataRowList(dataGrid); } [Test] public void HavingAnEmptyNormalRowList_WhenClear_ThenCountIs0() { - normalRowList.Clear(); + dataRowList.Clear(); - Assert.That(normalRowList.Count, Is.EqualTo(0)); + Assert.That(dataRowList.Count, Is.EqualTo(0)); } [Test] public void HavingANormalRowListWithOneRow_WhenClear_ThenCountIs0() { - normalRowList.Add(new NormalRow()); + dataRowList.Add(new DataRow()); - normalRowList.Clear(); + dataRowList.Clear(); - Assert.That(normalRowList.Count, Is.EqualTo(0)); + Assert.That(dataRowList.Count, Is.EqualTo(0)); } [Test] public void HavingANormalRowListWithTwoRows_WhenClear_ThenCountIs0() { - normalRowList.Add(new NormalRow()); - normalRowList.Add(new NormalRow()); + dataRowList.Add(new DataRow()); + dataRowList.Add(new DataRow()); - normalRowList.Clear(); + dataRowList.Clear(); - Assert.That(normalRowList.Count, Is.EqualTo(0)); + Assert.That(dataRowList.Count, Is.EqualTo(0)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ConstructorTests.cs index c8f5a860..5991b390 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/ConstructorTests.cs @@ -28,7 +28,7 @@ public void HavingNullDataGrid_WhenNormalRowListIsInstantiated_ThenThrows() { Assert.Throws(() => { - NormalRowList normalRowList = new NormalRowList(null); + DataRowList dataRowList = new DataRowList(null); }); } @@ -37,7 +37,7 @@ public void HavingValidDataGrid_WhenNormalRowListIsInstantiated_ThenSuccess() { DataGrid dataGrid = new DataGrid(); - NormalRowList normalRowList = new NormalRowList(dataGrid); + DataRowList dataRowList = new DataRowList(dataGrid); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveAtTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveAtTests.cs index a9d6d766..e5269fe2 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveAtTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveAtTests.cs @@ -23,76 +23,76 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests public class RemoveAtTests { private DataGrid dataGrid; - private NormalRowList normalRowList; + private DataRowList dataRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - normalRowList = new NormalRowList(dataGrid); + dataRowList = new DataRowList(dataGrid); } [Test] public void HavingANormalRowListWithOneRow_WhenRemoveTheRow_ThenCountIs0() { - NormalRow normalRow = new NormalRow("value 1"); - normalRowList.Add(normalRow); + DataRow dataRow = new DataRow("value 1"); + dataRowList.Add(dataRow); - normalRowList.RemoveAt(0); + dataRowList.RemoveAt(0); - Assert.That(normalRowList.Count, Is.EqualTo(0)); + Assert.That(dataRowList.Count, Is.EqualTo(0)); } [Test] public void HavingANormalRowListWithTwoRows_WhenRemoveFirstRow_ThenCountIs1() { - NormalRow normalRow1 = new NormalRow("value 1"); - NormalRow normalRow2 = new NormalRow("value 2"); - normalRowList.Add(normalRow1); - normalRowList.Add(normalRow2); + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); - normalRowList.RemoveAt(0); + dataRowList.RemoveAt(0); - Assert.That(normalRowList.Count, Is.EqualTo(1)); + Assert.That(dataRowList.Count, Is.EqualTo(1)); } [Test] public void HavingANormalRowListWithTwoRows_WhenRemoveFirstRow_ThenSecondRowIsStillInList() { - NormalRow normalRow1 = new NormalRow("value 1"); - NormalRow normalRow2 = new NormalRow("value 2"); - normalRowList.Add(normalRow1); - normalRowList.Add(normalRow2); + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); - normalRowList.RemoveAt(0); + dataRowList.RemoveAt(0); - Assert.That(normalRowList[0], Is.EqualTo(normalRow2)); + Assert.That(dataRowList[0], Is.EqualTo(dataRow2)); } [Test] public void HavingANormalRowListWithTwoRows_WhenRemoveSecondRow_ThenCountIs1() { - NormalRow normalRow1 = new NormalRow("value 1"); - NormalRow normalRow2 = new NormalRow("value 2"); - normalRowList.Add(normalRow1); - normalRowList.Add(normalRow2); + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); - normalRowList.RemoveAt(1); + dataRowList.RemoveAt(1); - Assert.That(normalRowList.Count, Is.EqualTo(1)); + Assert.That(dataRowList.Count, Is.EqualTo(1)); } [Test] public void HavingANormalRowListWithTwoRows_WhenRemoveSecondRow_ThenFirstRowIsStillInList() { - NormalRow normalRow1 = new NormalRow("value 1"); - NormalRow normalRow2 = new NormalRow("value 2"); - normalRowList.Add(normalRow1); - normalRowList.Add(normalRow2); + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); - normalRowList.RemoveAt(1); + dataRowList.RemoveAt(1); - Assert.That(normalRowList[0], Is.EqualTo(normalRow1)); + Assert.That(dataRowList[0], Is.EqualTo(dataRow1)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveTests.cs index 7740dfb3..214b88a8 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowListTests/RemoveTests.cs @@ -23,76 +23,76 @@ namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.NormalRowListTests public class RemoveTests { private DataGrid dataGrid; - private NormalRowList normalRowList; + private DataRowList dataRowList; [SetUp] public void SetUp() { dataGrid = new DataGrid(); - normalRowList = new NormalRowList(dataGrid); + dataRowList = new DataRowList(dataGrid); } [Test] public void HavingANormalRowListWithOneRow_WhenRemoveTheRow_ThenCountIs0() { - NormalRow normalRow = new NormalRow("value 1"); - normalRowList.Add(normalRow); + DataRow dataRow = new DataRow("value 1"); + dataRowList.Add(dataRow); - normalRowList.Remove(normalRow); + dataRowList.Remove(dataRow); - Assert.That(normalRowList.Count, Is.EqualTo(0)); + Assert.That(dataRowList.Count, Is.EqualTo(0)); } [Test] public void HavingANormalRowListWithTwoRows_WhenRemoveFirstRow_ThenCountIs1() { - NormalRow normalRow1 = new NormalRow("value 1"); - NormalRow normalRow2 = new NormalRow("value 2"); - normalRowList.Add(normalRow1); - normalRowList.Add(normalRow2); + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); - normalRowList.Remove(normalRow1); + dataRowList.Remove(dataRow1); - Assert.That(normalRowList.Count, Is.EqualTo(1)); + Assert.That(dataRowList.Count, Is.EqualTo(1)); } [Test] public void HavingANormalRowListWithTwoRows_WhenRemoveFirstRow_ThenSecondRowIsStillInList() { - NormalRow normalRow1 = new NormalRow("value 1"); - NormalRow normalRow2 = new NormalRow("value 2"); - normalRowList.Add(normalRow1); - normalRowList.Add(normalRow2); + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); - normalRowList.Remove(normalRow1); + dataRowList.Remove(dataRow1); - Assert.That(normalRowList[0], Is.EqualTo(normalRow2)); + Assert.That(dataRowList[0], Is.EqualTo(dataRow2)); } [Test] public void HavingANormalRowListWithTwoRows_WhenRemoveSecondRow_ThenCountIs1() { - NormalRow normalRow1 = new NormalRow("value 1"); - NormalRow normalRow2 = new NormalRow("value 2"); - normalRowList.Add(normalRow1); - normalRowList.Add(normalRow2); + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); - normalRowList.Remove(normalRow2); + dataRowList.Remove(dataRow2); - Assert.That(normalRowList.Count, Is.EqualTo(1)); + Assert.That(dataRowList.Count, Is.EqualTo(1)); } [Test] public void HavingANormalRowListWithTwoRows_WhenRemoveSecondRow_ThenFirstRowIsStillInList() { - NormalRow normalRow1 = new NormalRow("value 1"); - NormalRow normalRow2 = new NormalRow("value 2"); - normalRowList.Add(normalRow1); - normalRowList.Add(normalRow2); + DataRow dataRow1 = new DataRow("value 1"); + DataRow dataRow2 = new DataRow("value 2"); + dataRowList.Add(dataRow1); + dataRowList.Add(dataRow2); - normalRowList.Remove(normalRow2); + dataRowList.Remove(dataRow2); - Assert.That(normalRowList[0], Is.EqualTo(normalRow1)); + Assert.That(dataRowList[0], Is.EqualTo(dataRow1)); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowTests/ConstructorTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowTests/ConstructorTests.cs index 41c3b1a1..4b373227 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowTests/ConstructorTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/NormalRowTests/ConstructorTests.cs @@ -25,11 +25,11 @@ public class ConstructorTests [Test] public void Constructor_sets_ParentRow_for_each_cell() { - NormalCell cell0 = new NormalCell("cell content"); - NormalCell cell1 = new NormalCell("cell content"); - NormalCell cell2 = new NormalCell("cell content"); + DataCell cell0 = new DataCell("cell content"); + DataCell cell1 = new DataCell("cell content"); + DataCell cell2 = new DataCell("cell content"); - NormalRow row = new NormalRow(cell0, cell1, cell2); + DataRow row = new DataRow(cell0, cell1, cell2); Assert.That(cell0.ParentRow, Is.SameAs(row)); Assert.That(cell1.ParentRow, Is.SameAs(row)); @@ -39,11 +39,11 @@ public void Constructor_sets_ParentRow_for_each_cell() [Test] public void Constructor_keeps_the_received_Cell_instances() { - NormalCell cell0 = new NormalCell("cell content"); - NormalCell cell1 = new NormalCell("cell content"); - NormalCell cell2 = new NormalCell("cell content"); + DataCell cell0 = new DataCell("cell content"); + DataCell cell1 = new DataCell("cell content"); + DataCell cell2 = new DataCell("cell content"); - NormalRow row = new NormalRow(cell0, cell1, cell2); + DataRow row = new DataRow(cell0, cell1, cell2); Assert.That(row[0], Is.SameAs(cell0)); Assert.That(row[1], Is.SameAs(cell1)); @@ -53,12 +53,12 @@ public void Constructor_keeps_the_received_Cell_instances() [Test] public void Constructor_created_empty_Cell_if_one_item_is_null() { - NormalCell cell0 = new NormalCell("cell content"); - NormalCell cell2 = new NormalCell("cell content"); + DataCell cell0 = new DataCell("cell content"); + DataCell cell2 = new DataCell("cell content"); - NormalRow row = new NormalRow(cell0, null, cell2); + DataRow row = new DataRow(cell0, null, cell2); - Assert.That(row[1], Is.InstanceOf()); + Assert.That(row[1], Is.InstanceOf()); Assert.That(row[1].IsEmpty, Is.True); } } diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerColumnTests.cs index fdb00518..d5335909 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentPerColumnTests.cs @@ -72,7 +72,7 @@ public void column_0_is_aligned_to_Right_and_cell_1_0_is_aligned_to_Left() dataGrid.Columns.Add(column2); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentTests.cs index 275a0a71..3231b8bb 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/TableTests/CellAlignmentTests.cs @@ -111,7 +111,7 @@ public void cell_1_1_is_alignment_Default_at_cell_creation() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Default), "1,1", "1,2" }); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Default), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = @@ -132,7 +132,7 @@ public void cell_1_1_is_alignment_Left_at_cell_creation() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Left), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = @@ -153,7 +153,7 @@ public void cell_1_1_is_alignment_Center_at_cell_creation() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Center), "1,1", "1,2" }); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Center), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = @@ -174,7 +174,7 @@ public void cell_1_1_is_alignment_Right_at_cell_creation() { DataGrid dataGrid = new DataGrid("This is a cell alignment test"); dataGrid.Rows.Add("0,0", "0,1", "0,2"); - dataGrid.Rows.Add(new NormalCell[] { new NormalCell("1,0", HorizontalAlignment.Right), "1,1", "1,2" }); + dataGrid.Rows.Add(new DataCell[] { new DataCell("1,0", HorizontalAlignment.Right), "1,1", "1,2" }); dataGrid.Rows.Add("2,0", "2,1", "2,2"); string expected = @@ -197,7 +197,7 @@ public void TestCellHorizontalAlign2() dataGrid.Title = "My Title"; dataGrid.Rows.Add("1234567", "123456", "one two"); - dataGrid.Rows.Add(new NormalCell("1", HorizontalAlignment.Center), new NormalCell("asd", HorizontalAlignment.Center), new NormalCell("asas")); + dataGrid.Rows.Add(new DataCell("1", HorizontalAlignment.Center), new DataCell("asd", HorizontalAlignment.Center), new DataCell("asas")); dataGrid.Rows.Add("12", "a", "errr"); string expected = From 0726aa7de5a38f3638bdfd2b1b4dd503ab5b3e69 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Mon, 1 Nov 2021 13:49:25 +0200 Subject: [PATCH 49/57] add new icon. add more comments. add nuget publish scripts. add architecture diagram. --- .gitignore | 1 + doc/architecture.drawio.png | Bin 0 -> 14393 bytes icon/icon-128.png | Bin 0 -> 5272 bytes icon/icon-16.png | Bin 0 -> 865 bytes icon/icon-256.png | Bin 0 -> 15526 bytes icon/icon-32.png | Bin 0 -> 1390 bytes icon/icon-500.png | Bin 0 -> 40472 bytes icon/icon-64.png | Bin 0 -> 2360 bytes icon/icon.xcf | Bin 0 -> 359304 bytes nuget2/.gitignore | 2 + nuget2/ConsoleTools.nuspec | 29 + nuget2/config.ps1 | 30 + nuget2/pack.ps1 | 34 + nuget2/publish.ps1 | 12 + .../ConsoleTools.Controls.Menus.csproj | 24 +- .../ConsoleTools.Controls.Spinners.csproj | 24 +- .../ConsoleTools.Controls.Tables.csproj | 8 +- .../ConsoleTools.Controls.Tables/DataCell.cs | 8 + .../ConsoleTools.Controls.csproj | 80 +-- .../ConsoleTools.Controls/MultiColor.cs | 29 + .../ConsoleTools.Controls/Pause.cs | 2 +- .../ApplicationInformation.cs | 16 + .../ConsoleTools.Core.csproj | 9 +- .../ConsoleWrapper/ConsoleX.cs | 23 +- .../Controls/BlockControl.cs | 19 +- .../ConsoleTools.Core/Controls/Control.cs | 13 +- .../Controls/ControlDisplay.cs | 62 +- .../Controls/ControlLayout.cs | 18 +- .../Controls/LongRunningControl.cs | 17 +- .../ConsoleTools.Core/Controls/Thickness.cs | 12 +- .../ConsoleTools/ConsoleTools.Core/Cursor.cs | 26 +- .../CustomConsole.Write.BothColors.cs | 51 ++ .../CustomConsole.Write.ForegroundColor.cs | 2 +- .../Properties/AssemblyInfo.cs | 39 - ...ConsoleTools.Demo.PauseDemo.NetCore.csproj | 2 +- .../Program.cs | 103 ++- .../ConsoleTools.Demo.PauseDemo/Program.cs | 80 ++- .../ConsoleTools.Mvc/ConsoleTools.Cli.csproj | 6 +- .../Properties/AssemblyInfo.cs | 39 - .../ConsoleTools.Tests.csproj | 35 +- .../ColumnTests.cs | 2 +- .../RowTests.cs | 2 +- .../TitleTests.cs | 2 +- .../ColumnTests.cs | 2 +- .../RowTests.cs | 2 +- .../TitleTests.cs | 2 +- .../Properties/AssemblyInfo.cs | 34 - sources/ConsoleTools/ConsoleTools.sln | 9 +- sources/ConsoleTools/Directory.Build.props | 22 + sources/ConsoleTools/LICENSE.txt | 675 ++++++++++++++++++ sources/ConsoleTools/README.md | 25 + 51 files changed, 1326 insertions(+), 306 deletions(-) create mode 100644 doc/architecture.drawio.png create mode 100644 icon/icon-128.png create mode 100644 icon/icon-16.png create mode 100644 icon/icon-256.png create mode 100644 icon/icon-32.png create mode 100644 icon/icon-500.png create mode 100644 icon/icon-64.png create mode 100644 icon/icon.xcf create mode 100644 nuget2/.gitignore create mode 100644 nuget2/ConsoleTools.nuspec create mode 100644 nuget2/config.ps1 create mode 100644 nuget2/pack.ps1 create mode 100644 nuget2/publish.ps1 create mode 100644 sources/ConsoleTools/ConsoleTools.Controls/MultiColor.cs delete mode 100644 sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs delete mode 100644 sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs rename sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/{BuildFromDataTable => BuildFromDataTableTests}/ColumnTests.cs (99%) rename sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/{BuildFromDataTable => BuildFromDataTableTests}/RowTests.cs (98%) rename sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/{BuildFromDataTable => BuildFromDataTableTests}/TitleTests.cs (98%) rename sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/{BuildFromList => BuildFromListTests}/ColumnTests.cs (99%) rename sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/{BuildFromList => BuildFromListTests}/RowTests.cs (99%) rename sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/{BuildFromList => BuildFromListTests}/TitleTests.cs (98%) delete mode 100644 sources/ConsoleTools/ConsoleTools.Tests/Properties/AssemblyInfo.cs create mode 100644 sources/ConsoleTools/Directory.Build.props create mode 100644 sources/ConsoleTools/LICENSE.txt create mode 100644 sources/ConsoleTools/README.md diff --git a/.gitignore b/.gitignore index e69de29b..e02abfc9 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ + diff --git a/doc/architecture.drawio.png b/doc/architecture.drawio.png new file mode 100644 index 0000000000000000000000000000000000000000..059a194ecb486aa2f9ba57fea6aef18213f89591 GIT binary patch literal 14393 zcmch;XIN8R*9HhNVo<< zQvsEPB1lnb1{4HA5d>zV&-=|g*EciQ{F*=UaLzt!uX3-o_u2O{(by2fdidmF1_lOJ z99G+ufdRtHz`%%xF@ZZ4#(vfe3{1%+9cz+Ln471!D}x9^>+h9_oQ#KG5J?1~Eg~nU zo1~XL2%fvXZj0k}|U9GRh(dO@tEok(ZTHMj{D+$2+>a z`u;0OUP=ZC5V!L5b@2-g0+)v7;73*l+(w|m6?mY4{CgRufII{4X!`qmyIQ$A;XO$r za=P*eMJa>=xGj#ynj7eg$Z3IVZ%?8t_y^?1rPpD%XEPjvQqNko|&VYW1#1M&9-l}E6LIQufZfUz0g2Q zIZaEvg(gPH)yGWU&GE0HA+CWzp1@0geD*5;X=?oN+6G7+zU%PlZ zx(7P?fFYj$y3<7lso<_{;U1(b<8Q3xD`RTv4P3S_#Mcp6@JF;U@TerveqV?p!QaqA zIVe;I2fVH8Wup{I^a$J6UDFdI<8DN-AmIt#0Y*4o7m`Jgc{pAv$SNc-jI1AIWg+ip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ghQA0_>Nt1(IEap}vS^hP@lTI!=p*OuT2M@@kH!~| zI-f=D6@x{e7%HFo_auSGZLt)}VdO(Slspc@=OxulO9x8%+a}f5UC#0`1As+^`IC{k zLB>7nDDbo-^%DvU3?CXeCD*|a zYG0;}^Q%+}K9#_YhGE>?4H9zHqWhm4<;v&_%(T!J2JqT0@G$mE@4uGS=MWSAD zD=Oy8ExvL*gI(9OUmu>kAxZx-0)fjXvH_AEBkp=O0RaO<*BJE7ZSd^mWzGd3#I-mN zabn3WH~9khR*(ARS;1Prw6==|w1M>P-F3^*(4&$`l1YLQQ%&Rvq~=kN2}6>aJgkEd zSOau{RX`h>%#AFst*^dfnEVz9?O+1fug?Avzn=K*+{1+|1P`bH9SsBZYE}EF{{i63 B$jkr$ literal 0 HcmV?d00001 diff --git a/icon/icon-16.png b/icon/icon-16.png new file mode 100644 index 0000000000000000000000000000000000000000..3798be3395a803beeee32d8c083b0d04e61060a2 GIT binary patch literal 865 zcmV-n1D^beP)EX>4Tx04R}tkv&MmKpe$iQ;Sln4t5ZA$WWauh>AE$6^me@v=v%)FuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|=H{g6A|?JWDYS_3;J6>}?mh0_0Yam~RI_UWP&La) z#baVNw<>nOB8XuG&5bWxZD8-pLEHP9LY~pC=`JAGy0|+FmMY5*WBJ(`#607GSt=b4RCM> zj1?(+-Q(RooxS~grq$mM8?JJMMvWY$00006VoOIv00000008+zyMF)x010qNS#tmY zE+YT{E+YYWr9XB6000McNlirueSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00B8kL_t(I%f*v1io#G3hQBu>s3?M9VG|Hi2)RM5#L`0u z)`Epc2&-oZ1agej)+s!LO+XM73oV5Bwg|X}g#}}=1AjAb<}1G80R%t}*f)~{fdO)3 zj96=_P!9uGV@#E0thLkt{tW;i03!0ta=BzapCclSMk7|MRq6dTC4j21*=!II+U+*O z;gHMag5x-d2#du6-}g}wR20=0fU2Teqt$8=h9OZD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V?d00001 diff --git a/icon/icon-500.png b/icon/icon-500.png new file mode 100644 index 0000000000000000000000000000000000000000..3bd72e10cd90abfa0450e9082e9ad7b0ed1c7970 GIT binary patch literal 40472 zcmcG#bx>VF_bqsX1`m?p?hrIM0fM^|+zB4s3GPmC0>OfX;O_43ZUKS?3+^y|zwf=O z-<$bos-}i2>efBCPoI|Ed#|GUe?hi!02C9)NztCM@xeO>}ybX)sk$D|ym{apw z+l9690ws-uik>+pz`Cmeu+!fSq$kG$$7?S{ za=X;3tzncnhoyQ=jJfI=T-zzajNm2^vwGwN;`B#4oV-@M`{$eK#?J(=clSP?(ZG69 zoDxl=MY;#Nn@vygo?wS+Nvnj7hxem3k)2Y`o2IPu;1a)aH(MCU+X?UPF|G{UMmM7t zrOu>@q5CCqD>7#qeE!C~R>h?B%NcIS*^*4!0f*$Pek?30k)SAop`RThiR#ff*z`-W z9yg&xzVW*3jYEciG(Ws%pz6nXLTqp5L{Uw!RiQ(G)Bk*Lg0r^9QiE=)bWbxG)y-q+~&_rh*pGehWgbA(~Ta*mug1 zwq0r`k(cCoMNSxg?GX3eBB~30NEzHeSjg?60r+7wi~-_{U{8p}GCNCnnPFJ|&y2PZ zX27H!OXQ`c*`F6Y1RYwCUkB&5t!-F$FYUM-Ut?MKB9RAu-I3!DVr=Akv9N-Nb!Q5( zy^iN22V)kwqdcAQBxQe?(xt)nq=h^q{`Q3AAHD;R>XD}RJB9GUxMPQNZ#mKAU?AFK z``J}xf%$w*aR{l*I)p%4F_gWOSR|K2mUS@fACffwvfywjgAynOlmV3uc+Zs4gw96XYp z+UdtlqU}Mh6rgj*G+C=A(GwU$PQSUD*U($44<(G}r(?H{C&ta$X`xLr=k&)UbVah{ z2%+m89WdyC~s+Wep1Sr=Kq!>z|YFA&`?P zX6QU}P00L`o`~-(mI9%(O^ibDgE>iw8!g)I?d_$bqw@>PZfYV(N=o|q>zByKkFS3f z7w;2*exwG5hedsS1kcXTm6eqIT3X)I2V!RfW}@W>yGRp@>?h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8tk(y+>nC@*iZ;`^oN%SdkOOc2E9=VfqC zSU7sRu$H7#OFu~s0Hga1#Fs;zDTI>AVg9w}*TRsovaXts+#$L;7hN160911m0e{v9 z_0-Zj39h2Me4y|1xT!KlT03cpFvwIu*|@;}+8Y?bk7Ke=znaJ{N4v*Ia^U8GNIu*- z*S|*)P_+mt9Gs&%Y(jW@-;cTv=A z=7K@`M~J3GW+axw7J=iLgiNymOz{mvEmn`?DU9O-*i1sii_67YPvgTma1DU(6YFu7 ztsW8)oC8&3`k{SM#af?u-f>f9*lY#x?tf*%4Wee~T_iLSU#!&ZLk5WZ}lf(!E1+(@5~|YGFO3m6Gj?nSn)rgrM*NaM$EZT zN9mc5_K;~T7xgeexzG1EG_bU9*_gsGB?hWSORB5oVs{jPRZgmsvTn`;u;Z7(cJ^(9 z#q^^9TJKMXAB2D7IKXVRoo6Bd_`R;bTe$ad$ENbg6F7P0nchc6I^5jh7xMCJ8^m$? z>{M=`1ixXBVF6UL;ey&-F0h6|=>Y11X&n?I1Mo-zLIiOdY?CQVQ7-w9LXR@_PY-1A UMQ45+2EgBS!`s)2uQ){i4`2u81^@s6 literal 0 HcmV?d00001 diff --git a/icon/icon-64.png b/icon/icon-64.png new file mode 100644 index 0000000000000000000000000000000000000000..700be8cde9f8777732cf8be584db068e1df8c231 GIT binary patch literal 2360 zcmV-83CH${P)EX>4Tx04R}tkv&MmKpe$iQ;Sln4t5ZA$WWauh>AE$6^me@v=v%)FuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|=H{g6A|?JWDYS_3;J6>}?mh0_0Yam~RI_UWP&La) z#baVNw<>nOB8XuG&5bWxZD8-pLEHP9LY~pC=`JAGy0|+FmMY5*WBJ(`#607GSt=b4RCM> zj1?(+-Q(RooxS~grq$mM8?JJMMvWY$00006VoOIv00000008+zyMF)x010qNS#tmY zE+YT{E+YYWr9XB6000McNlirueSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00$6BL_t(|+U=WdNR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9hu3qjmvR2`<^w*PHZs67eh*!R{0_4RE1wjYU49c|$pALJ4^_r> zVPg43{2jV*Hf%3`i-0d|&)?}S)yZIx-y`P1#2in5jb`{IQr0NH1Ou5zs}X`azkwVq zQZI1By@SLG{XV%C;upvXggQu(kNFKG^GWP^Nb*bgsB4TE;4kEJl)s7-)H5uHUq{kV z`1g1GLK1Bw*?4N5{6;1>h&NB78NXAwIJO_DGCbO+%a*@S_~`Lw_;(p&di%Y%RXzsP zVjitjS@aX|YlSc2qcUc0S*nzsMn z@NYuH|J(0>xU{LNhiv!!qkizV_66IeP?dk9pa1aCyzMG@UR8~L{-as{m!B^6&zJhY zMje~QmE-(>_e**F-+!&t|GU)RD)p_bKkDzx`5%2#sUOSwW99$*Soxlh{d(ztw$#s; zdb`wrTI#iEe|T)oua zUCrO~8xQt(R>u!~{OFu?EBa}<>r%azW#lEf6oW|{v(v1qx>r6 z3zR>ke1q~D<&ZLe8bfybWi-F*Klwg?xTj00`-A!6Yv1_8FZ}AyedL};c=R59{gY2U z_8^bz<3IW3_nU+3_-h}#_rB^ve|+^5Prj+Tv!DOQd+x68>W_~;{=l8pJ^lO}KYOvd zx1WFJy%(zc`uQtAbH4f){ruPNJX>Ar=U;sCOm%-h-~W-*)dT(f&wl(=^pnN)uVm?nMw6n-~a5G z?fe@LjH<``{^M@vNAKyXxA*;Tbk#fh{>j$uC*01j-rH2~?E8BFK6!919-=%@^Wi!?Xyd7ykKlY9=cBnir}Lp*p5Xa7&qsTC&gVlv4M4F5 z#Woa6QS3&sBE_Z@3sdY(u|CBX70XoY)L^!X6&sA&VB`j)x3Gf$z&Z|3<5Ktk + + + ConsoleTools + $version$ + Dust in the Wind + LICENSE.txt + https://aka.ms/deprecateLicenseUrl + https://github.com/lastunicorn/ConsoleTools + A set of tools and "controls" for the .net Console. It contains: List Input/Output Controls, Text Input/Output Controls, Progress Bar, Spinner, Data Table, Prompter, Menus, etc. + Copyright © Dust in the Wind 2017-2021 + console cli prompter menu progressbar spinner table read write textblock inlinetextblock blockcontrol inlinecontrol + README.md + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nuget2/config.ps1 b/nuget2/config.ps1 new file mode 100644 index 00000000..7c2760ae --- /dev/null +++ b/nuget2/config.ps1 @@ -0,0 +1,30 @@ +$version = "0.5.7" + +$packages = @( + @{ + PackageId = "DustInTheWind.ConsoleTools.Core" + ProjectPath = "..\sources\ConsoleTools\ConsoleTools.Core\ConsoleTools.Core.csproj" + }, + @{ + PackageId = "DustInTheWind.ConsoleTools.Controls" + ProjectPath = "..\sources\ConsoleTools\ConsoleTools.Controls\ConsoleTools.Controls.csproj" + }, + @{ + PackageId = "DustInTheWind.ConsoleTools.Controls.Menus" + ProjectPath = "..\sources\ConsoleTools\ConsoleTools.Controls.Menus\ConsoleTools.Controls.Menus.csproj" + }, + @{ + PackageId = "DustInTheWind.ConsoleTools.Controls.Spinners" + ProjectPath = "..\sources\ConsoleTools\ConsoleTools.Controls.Spinners\ConsoleTools.Controls.Spinners.csproj" + }, + @{ + PackageId = "DustInTheWind.ConsoleTools.Controls.Tables" + ProjectPath = "..\sources\ConsoleTools\ConsoleTools.Controls.Tables\ConsoleTools.Controls.Tables.csproj" + }, + @{ + PackageId = "ConsoleTools" + NuspecPath = "ConsoleTools.nuspec" + } +) + +$packagesDirectory = ".\packages-output" \ No newline at end of file diff --git a/nuget2/pack.ps1 b/nuget2/pack.ps1 new file mode 100644 index 00000000..d135ebfe --- /dev/null +++ b/nuget2/pack.ps1 @@ -0,0 +1,34 @@ +. .\config.ps1 + +if (Test-Path "$packagesDirectory") +{ + Remove-Item "$packagesDirectory" -Recurse +} + +foreach ($package in $packages) +{ + $nuspecExists = $package.NuspecPath -ne $null + + if ($nuspecExists) + { + Write-Output "Nuspec file was specified. Try to generate package using the nuspec file." + $nuspecFilePath = $package.NuspecPath + nuget pack "$nuspecFilePath" -OutputDirectory "$packagesDirectory" -Version "$version" + } + else + { + $projectExists = $package.ProjectPath -ne $null + + if ($projectExists) + { + Write-Output "Project file was specified. Try to generate package using the project file." + $projectPath = $package.ProjectPath + dotnet pack --configuration Release --output "$packagesDirectory" "$projectPath" + } + else + { + $packageId = $package.PackageId + Write-Output "Package $packageId could not be generated. Nether nuspec or project files were provided." + } + } +} \ No newline at end of file diff --git a/nuget2/publish.ps1 b/nuget2/publish.ps1 new file mode 100644 index 00000000..b1ab6e04 --- /dev/null +++ b/nuget2/publish.ps1 @@ -0,0 +1,12 @@ +. .\config.ps1 +. .\nuget-api-key.ps1 + +foreach ($package in $packages) +{ + $packageId = $package.PackageId + $packageFileName = "$packageId.$version.nupkg" + $packagePath = Join-Path -Path "$packagesDirectory" -ChildPath "$packageFileName" + + Write-Output "Publishing package $packagePath..." + #dotnet nuget push "$packagePath" --api-key "$apiKey" --source https://api.nuget.org/v3/index.json +} \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj index d1443f23..9e0bc8a5 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/ConsoleTools.Controls.Menus.csproj @@ -5,31 +5,25 @@ DustInTheWind.ConsoleTools.Controls.Menus DustInTheWind.ConsoleTools.Controls.Menus true - false - false - - - - - - TextMenuResources.resx - True - True - + + TextMenuResources.resx + True + True + - - TextMenuResources.Designer.cs - ResXFileCodeGenerator - + + TextMenuResources.Designer.cs + ResXFileCodeGenerator + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj index 3f477faf..a9ef4e56 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls.Spinners/ConsoleTools.Controls.Spinners.csproj @@ -5,31 +5,25 @@ DustInTheWind.ConsoleTools.Controls.Spinners DustInTheWind.ConsoleTools.Controls.Spinners true - false - false - - - - - - SpinnerResources.resx - True - True - + + SpinnerResources.resx + True + True + - - SpinnerResources.Designer.cs - ResXFileCodeGenerator - + + SpinnerResources.Designer.cs + ResXFileCodeGenerator + diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj index 5117927c..c6bf3b1f 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ConsoleTools.Controls.Tables.csproj @@ -5,16 +5,10 @@ DustInTheWind.ConsoleTools.Controls.Tables DustInTheWind.ConsoleTools.Controls.Tables true - false - false - - - - - + diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs index 0ad5ce02..ffc250d2 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs @@ -161,6 +161,10 @@ public override int CalculatePaddingRight() return paddingRight.Value; } + ///

+ /// Calculates and returns the foreground color for the content displayed in the cell. + /// The value is calculated taking into account also the parent row, parent column and parent table. + /// public override ConsoleColor? CalculateForegroundColor() { ConsoleColor? color = ForegroundColor; @@ -181,6 +185,10 @@ public override int CalculatePaddingRight() return color; } + /// + /// Calculates and returns the background color for the content displayed in the cell. + /// The value is calculated taking into account also the parent row, parent column and parent table. + /// public override ConsoleColor? CalculateBackgroundColor() { ConsoleColor? color = BackgroundColor; diff --git a/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj index b31ee0be..3733a9aa 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj +++ b/sources/ConsoleTools/ConsoleTools.Controls/ConsoleTools.Controls.csproj @@ -5,58 +5,52 @@ DustInTheWind.ConsoleTools.Controls DustInTheWind.ConsoleTools.Controls true - false - false
- + - + + ListInputResources.resx + True + True + + + ValueInputResources.resx + True + True + + + YesNoQuestionResources.resx + True + True + + + PauseResources.resx + True + True + - - ListInputResources.resx - True - True - - - ValueInputResources.resx - True - True - - - YesNoQuestionResources.resx - True - True - - - PauseResources.resx - True - True - - - - - - ListInputResources.Designer.cs - ResXFileCodeGenerator - - - ValueInputResources.Designer.cs - ResXFileCodeGenerator - - - YesNoQuestionResources.Designer.cs - ResXFileCodeGenerator - - - PauseResources.Designer.cs - ResXFileCodeGenerator - + + ListInputResources.Designer.cs + ResXFileCodeGenerator + + + ValueInputResources.Designer.cs + ResXFileCodeGenerator + + + YesNoQuestionResources.Designer.cs + ResXFileCodeGenerator + + + PauseResources.Designer.cs + ResXFileCodeGenerator +
diff --git a/sources/ConsoleTools/ConsoleTools.Controls/MultiColor.cs b/sources/ConsoleTools/ConsoleTools.Controls/MultiColor.cs new file mode 100644 index 00000000..23081eee --- /dev/null +++ b/sources/ConsoleTools/ConsoleTools.Controls/MultiColor.cs @@ -0,0 +1,29 @@ +using System; + +namespace DustInTheWind.ConsoleTools.Controls +{ + public class MultiColor : Control + { + protected override void DoDisplay() + { + CustomConsole.WriteLine("Player", ConsoleColor.Black); + CustomConsole.WriteLine("Player", ConsoleColor.White); + CustomConsole.WriteLine("Player", ConsoleColor.Gray); + CustomConsole.WriteLine("Player", ConsoleColor.DarkGray); + + CustomConsole.WriteLine("Player", ConsoleColor.Blue); + CustomConsole.WriteLine("Player", ConsoleColor.Green); + CustomConsole.WriteLine("Player", ConsoleColor.Cyan); + CustomConsole.WriteLine("Player", ConsoleColor.Red); + CustomConsole.WriteLine("Player", ConsoleColor.Magenta); + CustomConsole.WriteLine("Player", ConsoleColor.Yellow); + + CustomConsole.WriteLine("Player", ConsoleColor.DarkBlue); + CustomConsole.WriteLine("Player", ConsoleColor.DarkGreen); + CustomConsole.WriteLine("Player", ConsoleColor.DarkCyan); + CustomConsole.WriteLine("Player", ConsoleColor.DarkRed); + CustomConsole.WriteLine("Player", ConsoleColor.DarkMagenta); + CustomConsole.WriteLine("Player", ConsoleColor.DarkYellow); + } + } +} diff --git a/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs index b7f111b7..c40ed117 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls/Pause.cs @@ -25,7 +25,7 @@ namespace DustInTheWind.ConsoleTools.Controls { /// - /// A control that displays a message and waits for the user to press any key. + /// A control that displays a message and blocks the console until the user presses a key. /// public class Pause : ErasableControl { diff --git a/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs b/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs index 1a338258..b1523caa 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ApplicationInformation.cs @@ -25,21 +25,37 @@ namespace DustInTheWind.ConsoleTools { + /// + /// Provides information about the current application like product name, version, etc. + /// public class ApplicationInformation { private readonly Assembly assembly; + /// + /// Initializes a new instance of the class. + /// public ApplicationInformation() { assembly = Assembly.GetEntryAssembly(); } + /// + /// Returns the version of the current application. + /// It is retrieved from the entry assembly. + /// + /// A instance containing version information for the current application. public Version GetVersion() { AssemblyName assemblyName = assembly.GetName(); return assemblyName.Version; } + /// + /// Returns the name of the application. + /// It is retrieved from the entry assembly. + /// + /// The name of the current application. public string GetProductName() { AssemblyProductAttribute assemblyProductAttribute = assembly.GetCustomAttributes(typeof(AssemblyProductAttribute)) diff --git a/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj b/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj index 6ad4674f..1ef2e264 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj +++ b/sources/ConsoleTools/ConsoleTools.Core/ConsoleTools.Core.csproj @@ -1,16 +1,11 @@ - + netstandard2.0 DustInTheWind.ConsoleTools DustInTheWind.ConsoleTools.Core true - false - false + This is a set of tools for the .net Console. - - - - diff --git a/sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs b/sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs index 343b7b4b..14229a27 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/ConsoleWrapper/ConsoleX.cs @@ -1,4 +1,25 @@ -using System; +// ConsoleTools +// Copyright (C) 2017-2020 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// -------------------------------------------------------------------------------- +// Bugs or feature requests +// -------------------------------------------------------------------------------- +// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose + +using System; using DustInTheWind.ConsoleTools.Themes; namespace DustInTheWind.ConsoleTools.ConsoleWrapper diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs index a4c72a8d..771973ec 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs @@ -24,14 +24,25 @@ namespace DustInTheWind.ConsoleTools { /// - /// Provides base functionality for a block control like top/bottom margin. - /// A block control does not accept other controls on the same horizontal. - /// It starts from the beginning of the next line if the cursor is in the middle of a line. + /// Provides base functionality for a block control like top and bottom margins, paddings, etc. + /// A block control does not accept other controls on the same horizontal space. + /// It also force the rendering to start from the beginning of the next line if the cursor is + /// in the middle of a line. /// public abstract partial class BlockControl : Control { + /// + /// Gets an instance that represents the display available for the control to write on. + /// It also provides helper methods to write partial or entire rows. + /// protected ControlDisplay ControlDisplay { get; private set; } + /// + /// Gets the calculated layout for the current instance. + /// This value is calculated at the beginning of the display process and it is available throughout + /// the entire display process. + /// Before and after the display has unknown value. + /// protected ControlLayout Layout { get; private set; } /// @@ -102,7 +113,7 @@ private void CalculateLayout() } /// - /// When implemented by an inheritor it displays the content of the control to the console. + /// When implemented by an inheritor, it displays the content of the control to the console. /// protected abstract void DoDisplayContent(ControlDisplay display); } diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs index 4806fa34..41579ee4 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs @@ -26,9 +26,6 @@ namespace DustInTheWind.ConsoleTools /// /// Provides base functionality for a control. /// - /// - /// - /// public abstract class Control { private bool originalCursorVisibility; @@ -86,12 +83,14 @@ public void Display() } /// - /// Displays the margins and the content of the control. + /// When implemented by an inheritor, displays the margins and the content of the control. /// protected abstract void DoDisplay(); /// - /// Method called at the beginning of the method, before doing anything else. + /// Method called at the beginning of the method, before doing anything else + /// to raise the event. + /// When overwritten, the base method must be called in order to allow the event to be raised. /// protected virtual void OnBeforeDisplay() { @@ -99,7 +98,9 @@ protected virtual void OnBeforeDisplay() } /// - /// Method called at the very end of the method, before returning. + /// Method called at the very end of the method, before returning + /// to raise the event. + /// When overwritten, the base method must be called in order to allow the event to be raised. /// protected virtual void OnAfterDisplay() { diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs index 874fac75..57d8eb60 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs @@ -2,13 +2,24 @@ namespace DustInTheWind.ConsoleTools { + /// + /// Represents the display available for a control to write on. + /// It also provides helper methods to write partial or entire rows. + /// public class ControlDisplay { private ConsoleColor? initialForegroundColor; private ConsoleColor? initialBackgroundColor; + /// + /// Gets the number of rows already displayed. + /// public int RowCount { get; private set; } + /// + /// Gets or sets the calculated layout for the current instance. + /// Some details like margin and padding are displayed based on the values provided by this instance. + /// public ControlLayout Layout { get; set; } /// @@ -23,11 +34,24 @@ public class ControlDisplay /// public ConsoleColor? BackgroundColor { get; set; } + /// + /// Writes an entire row using the default + /// and values. + /// The left and right margins and paddings are added automatically. + /// + /// The text to be written as the content of th row. public void WriteRow(string text) { WriteRow(ForegroundColor, BackgroundColor, text); } + /// + /// Writes an entire row using the specified foreground and background values. + /// The left and right margins and paddings are added automatically. + /// + /// The background color to be used for the content of the row. + /// The foreground color to be used for the content of the row. + /// The text representing the content of th row. public void WriteRow(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor, string text) { StartRow(foregroundColor, backgroundColor); @@ -35,17 +59,30 @@ public void WriteRow(ConsoleColor? foregroundColor, ConsoleColor? backgroundColo EndRow(); } + /// + /// Writes an empty row. + /// The left and right margins and paddings are added automatically. + /// public void WriteRow() { StartRow(); EndRow(); } + /// + /// Writes the starting of a row using the default + /// and values. + /// It includes the left margin and padding. + /// public void StartRow() { StartRow(ForegroundColor, BackgroundColor); } + /// + /// Writes the starting of a row using the specified foreground and background values. + /// It includes the left margin and padding. + /// public void StartRow(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor) { WriteOuterLeftEmptySpace(); @@ -87,9 +124,13 @@ private void SetCustomBackgroundColor(ConsoleColor? backgroundColor) } } + /// + /// Writes the ending of a row. + /// It includes the right margin and padding. + /// public void EndRow() { - bool isConsoleRowFilled = FillEmptySpace(); + bool isConsoleRowFull = FillEmptySpace(); WriteRightPadding(); RestoreForegroundColor(); @@ -98,7 +139,7 @@ public void EndRow() WriteRightMargin(); WriteOuterRightEmptySpace(); - if (!isConsoleRowFilled) + if (!isConsoleRowFull) Console.WriteLine(); RowCount++; @@ -124,8 +165,9 @@ private bool FillEmptySpace() string rightContentEmptySpace = new string(' ', emptySpaceRight); CustomConsole.Write(rightContentEmptySpace); - bool isConsoleRowFilled = cursorLeft + emptySpaceRight + paddingRight + marginRight == Console.BufferWidth; - return isConsoleRowFilled; + int currentCursorPosition = cursorLeft + emptySpaceRight + paddingRight + marginRight; + bool isConsoleRowFull = currentCursorPosition == Console.BufferWidth; + return isConsoleRowFull; } private void RestoreForegroundColor() @@ -203,14 +245,18 @@ public void Write(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor, private void WriteOuterLeftEmptySpace() { - int spaces = Layout.OuterEmptySpaceLeft; - Console.Write(new string(' ', spaces)); + int spacesCount = Layout.OuterEmptySpaceLeft; + + if (spacesCount > 0) + Console.Write(new string(' ', spacesCount)); } private void WriteOuterRightEmptySpace() { - int spaces = Layout.OuterEmptySpaceRight; - Console.Write(new string(' ', spaces)); + int spacesCount = Layout.OuterEmptySpaceRight; + + if (spacesCount > 0) + Console.Write(new string(' ', spacesCount)); } private void WriteLeftMargin() diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs index ed52e8e8..d2e290bd 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs @@ -126,11 +126,13 @@ public class ControlLayout /// /// Gets the empty space at the left of the control. + /// This may be greater than 0 when the control is centered on the screen or aligned to the right. /// public int OuterEmptySpaceLeft { get; private set; } /// /// Gets the empty space at the right of the control. + /// This may be greater than 0 when the control is centered on the screen or aligned to the left. /// public int OuterEmptySpaceRight { get; private set; } @@ -290,24 +292,24 @@ private void CalculateActualWidths() private void CalculateInnerEmptySpace() { - int emptySpaceTotal = ActualClientWidth - ActualContentWidth; + int innerEmptySpaceTotal = ActualClientWidth - ActualContentWidth; switch (ContentHorizontalAlignment) { case HorizontalAlignment.Default: case HorizontalAlignment.Left: InnerEmptySpaceLeft = 0; - InnerEmptySpaceRight = emptySpaceTotal; + InnerEmptySpaceRight = innerEmptySpaceTotal; break; case HorizontalAlignment.Center: - double emptySpaceHalf = (double)emptySpaceTotal / 2; + double emptySpaceHalf = (double)innerEmptySpaceTotal / 2; InnerEmptySpaceLeft = (int)Math.Floor(emptySpaceHalf); InnerEmptySpaceRight = (int)Math.Ceiling(emptySpaceHalf); break; case HorizontalAlignment.Right: - InnerEmptySpaceLeft = emptySpaceTotal; + InnerEmptySpaceLeft = innerEmptySpaceTotal; InnerEmptySpaceRight = 0; break; @@ -323,24 +325,24 @@ private void CalculateInnerEmptySpace() private void CalculateOuterEmptySpace() { - int emptySpaceTotal = AvailableWidth - ActualFullWidth; + int outerEmptySpaceTotal = AvailableWidth - ActualFullWidth; switch (calculatedHorizontalAlignment) { case HorizontalAlignment.Default: case HorizontalAlignment.Left: OuterEmptySpaceLeft = 0; - OuterEmptySpaceRight = emptySpaceTotal; + OuterEmptySpaceRight = outerEmptySpaceTotal; break; case HorizontalAlignment.Center: - double emptySpaceHalf = (double)emptySpaceTotal / 2; + double emptySpaceHalf = (double)outerEmptySpaceTotal / 2; OuterEmptySpaceLeft = (int)Math.Floor(emptySpaceHalf); OuterEmptySpaceRight = (int)Math.Ceiling(emptySpaceHalf); break; case HorizontalAlignment.Right: - OuterEmptySpaceLeft = emptySpaceTotal; + OuterEmptySpaceLeft = outerEmptySpaceTotal; OuterEmptySpaceRight = 0; break; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs index 230f9a00..d01eaa1a 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs @@ -123,7 +123,7 @@ private void MoveToNextLineIfNecessary() } /// - /// When implemented by an inheritor it displays the content of the control to the console. + /// When implemented by an inheritor, it displays the content of the control to the console. /// protected abstract void DoDisplayContent(); @@ -143,12 +143,19 @@ private void WriteBottomMargin() OnAfterBottomMargin(); } + /// + /// Displays again the control in the console. + /// This is done only if the control is active. + /// protected void Refresh() { if (IsActive) DoRefresh(); } + /// + /// When implemented by an inheritor, it performs the necessary actions to show the control in the console. + /// protected abstract void DoRefresh(); /// @@ -173,14 +180,20 @@ public void Close() OnClosed(); } + /// + /// Method called at the very beginning of the method. + /// protected virtual void OnClosing() { } + /// + /// When implemented by an inheritor, it performs the necessary actions to close the control. + /// protected abstract void DoClose(); /// - /// Method called at the very end of the method, before returning. + /// Method called at the very end of the method, before returning. /// protected virtual void OnClosed() { diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs index 4d132771..24677018 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs @@ -24,28 +24,32 @@ namespace DustInTheWind.ConsoleTools { + /// + /// Represents the thickness of a rectangle. + /// There can be provided different values for the top, bottom, left and right thicknesses. + /// public struct Thickness : IEquatable { /// - /// Gets the number of empty lines displayed before the content. + /// Gets the top value. /// Default value: 0 /// public int Top { get; } /// - /// Gets the number of empty lines displayed after the content. + /// Gets the bottom value. /// Default value: 0 /// public int Bottom { get; } /// - /// Gets the number of spaces to be written to the left of the content. + /// Gets the left value. /// Default value: 0 /// public int Left { get; } /// - /// Gets the number of spaces to be written to the right of the content. + /// Gets the right value. /// Default value: 0 /// public int Right { get; } diff --git a/sources/ConsoleTools/ConsoleTools.Core/Cursor.cs b/sources/ConsoleTools/ConsoleTools.Core/Cursor.cs index 0c69eb4c..561742a9 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Cursor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Cursor.cs @@ -20,6 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; +using System.Threading.Tasks; namespace DustInTheWind.ConsoleTools { @@ -54,7 +55,7 @@ public static void RunWithoutCursor(Action action) /// /// The type of the value to be returned. /// The function to be executed. - /// + /// The value returned by the executed function. public static T RunWithoutCursor(Func action) { if (action == null) throw new ArgumentNullException(nameof(action)); @@ -71,5 +72,28 @@ public static T RunWithoutCursor(Func action) Console.CursorVisible = initialCursorVisible; } } + + /// + /// Executes asynchronously the specified function while hiding the cursor. + /// + /// The type of the value to be returned. + /// The function to be executed. + /// A instance representing the asynchronous execution. + public static async Task RunWithoutCursorAsync(Func> action) + { + if (action == null) throw new ArgumentNullException(nameof(action)); + + bool initialCursorVisible = Console.CursorVisible; + Console.CursorVisible = false; + + try + { + return await action(); + } + finally + { + Console.CursorVisible = initialCursorVisible; + } + } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs index 71bfe520..046a1efc 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.BothColors.cs @@ -25,6 +25,12 @@ namespace DustInTheWind.ConsoleTools { public partial class CustomConsole { + /// + /// Writes the specified text to the Console using the specified foreground and background colors. + /// + /// The foreground color used to write the text. + /// The background color used to write the text. + /// The text to be written to the Console. public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) { ConsoleColor initialForegroundColor = Console.ForegroundColor; @@ -39,6 +45,14 @@ public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundCo Console.BackgroundColor = initialBackgroundColor; } + /// + /// Writes the text representation of the specified array of objects to the Console + /// using the specified format information and foreground and background colors. + /// + /// The foreground color used to write the text. + /// The background color used to write the text. + /// A composite format string. + /// An array of objects to write using format. public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) { ConsoleColor initialForegroundColor = Console.ForegroundColor; @@ -53,6 +67,13 @@ public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundCo Console.BackgroundColor = initialBackgroundColor; } + /// + /// Writes the text representation of the specified object to the Console + /// using the specified foreground and background colors. + /// + /// The foreground color used to write the text. + /// The background color used to write the text. + /// The value to write. public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) { ConsoleColor initialForegroundColor = Console.ForegroundColor; @@ -67,6 +88,13 @@ public static void Write(ConsoleColor foregroundColor, ConsoleColor backgroundCo Console.BackgroundColor = initialBackgroundColor; } + /// + /// Writes the specified string value, followed by the current line terminator, to the Console + /// using the specified foreground and background colors. + /// + /// The foreground color used to write the text. + /// The background color used to write the text. + /// The text to write. public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text) { ConsoleColor initialForegroundColor = Console.ForegroundColor; @@ -81,6 +109,15 @@ public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgrou Console.BackgroundColor = initialBackgroundColor; } + /// + /// Writes the text representation of the specified array of objects, + /// followed by the current line terminator, to the Console + /// using the specified format information, foreground and background colors. + /// + /// The foreground color used to write the text. + /// The background color used to write the text. + /// A composite format string. + /// An array of objects to write using format. public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string format, params object[] arg) { ConsoleColor initialForegroundColor = Console.ForegroundColor; @@ -95,6 +132,13 @@ public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgrou Console.BackgroundColor = initialBackgroundColor; } + /// + /// Writes the text representation of the specified object, followed by the current line terminator, to the Console + /// using the specified foreground and background colors. + /// + /// The foreground color used to write the text. + /// The background color used to write the text. + /// The value to write. public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, object o) { ConsoleColor initialForegroundColor = Console.ForegroundColor; @@ -109,6 +153,9 @@ public static void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgrou Console.BackgroundColor = initialBackgroundColor; } + /// + /// Executes the specified action while the foreground and background colors are set to the specified values. + /// public static void WithColors(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor, Action action) { if (action == null) throw new ArgumentNullException(nameof(action)); @@ -154,6 +201,10 @@ public static void WithColors(ConsoleColor foregroundColor, ConsoleColor backgro } } + /// + /// Executes the specified function while the foreground and background colors + /// are set to the specified values. + /// public static T WithColors(ConsoleColor? foregroundColor, ConsoleColor? backgroundColor, Func func) { if (func == null) throw new ArgumentNullException(nameof(func)); diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs index 5040b96a..dc557dcc 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.Write.ForegroundColor.cs @@ -68,7 +68,7 @@ public static void Write(ConsoleColor foregroundColor, object o) } /// - /// Writes the specified string value, followed by the current line terminator, to the Console. + /// Writes the specified string value, followed by the current line terminator, to the Console. /// An additional parameter can be specified for the foreground color used to write the text. /// /// The foreground color used to write the text. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs deleted file mode 100644 index f312d496..00000000 --- a/sources/ConsoleTools/ConsoleTools.Core/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose - -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("DustInTheWind.ConsoleTools.Core")] -[assembly: AssemblyDescription("This is a set of tools for the .net Console.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5a50aa3d-e14a-4e0c-bc6a-06aa1d6a5524")] \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj index 633e61c3..c9ea9baf 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net5.0 DustInTheWind.ConsoleTools.Demo.PauseDemo.NetCore diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program.cs index 570abd27..1bac8605 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/Program.cs @@ -16,7 +16,6 @@ using System; using ConsoleTools.Demo.PauseDemo.NetCore.Commands; -using DustInTheWind.ConsoleTools.Controls; using DustInTheWind.ConsoleTools.Controls.Menus; namespace ConsoleTools.Demo.PauseDemo.NetCore @@ -25,14 +24,33 @@ internal class Program { private static void Main() { - Console.SetWindowSize(80, 50); - Console.SetBufferSize(160, 512); + Console.WriteLine($"Window: {Console.WindowWidth} : {Console.WindowHeight}"); + Console.WriteLine($"Buffer: {Console.BufferWidth} : {Console.BufferHeight}"); - DisplayApplicationHeader(); - RunDemos(); + ConsoleColor oldColor = Console.BackgroundColor; + Console.BackgroundColor = ConsoleColor.Blue; - DummyText.Display("- This demo is over.", 3); - Pause.QuickDisplay(); + string lessThanLine = new string('*', 100); + string fullLine = new string('*', 120); + string moreThanLine = new string('*', 140); + + Console.WriteLine(); + Console.WriteLine(lessThanLine); + + Console.WriteLine(); + Console.WriteLine(fullLine); + Console.WriteLine("something"); + + Console.WriteLine(); + Console.WriteLine(moreThanLine); + + Console.BackgroundColor = oldColor; + + //Console.SetWindowSize(80, 50); + //Console.SetBufferSize(160, 512); + + //DisplayApplicationHeader(); + //RunDemos(); } private static void DisplayApplicationHeader() @@ -46,19 +64,68 @@ private static void DisplayApplicationHeader() private static void RunDemos() { - ICommand[] commands = + bool exitWasRequested = false; + + TextMenu textMenu = new TextMenu(); + textMenu.AddItems(new[] { - new DefaultCommand(), - new CustomUnlockKeyCommand(), - new ErasablePauseCommand(), - new CustomMarginsCommand(), - new CustomPaddingsCommand(), - new ForegroundColorCommand(), - new BackgroundColorCommand() - }; + new TextMenuItem + { + Id = "1", + Text = "Default", + Command = new DefaultCommand() + }, + new TextMenuItem + { + Id = "2", + Text = "Custom Unlock Key", + Command = new CustomUnlockKeyCommand() + }, + new TextMenuItem + { + Id = "3", + Text = "Erasable Pause", + Command = new ErasablePauseCommand() + }, + new TextMenuItem + { + Id = "4", + Text = "Custom Margins", + Command = new CustomMarginsCommand() + }, + new TextMenuItem + { + Id = "5", + Text = "Custom Paddings", + Command = new CustomPaddingsCommand() + }, + new TextMenuItem + { + Id = "6", + Text = "Foreground Color", + Command = new ForegroundColorCommand() + }, + new TextMenuItem + { + Id = "7", + Text = "Background Color", + Command = new BackgroundColorCommand() + }, + new TextMenuItem + { + Id = "0", + Text = "Exit", + Command = new ActionCommand(() => + { + exitWasRequested = true; + }) + } + }); - foreach (ICommand command in commands) - command.Execute(); + while (!exitWasRequested) + { + textMenu.Display(); + } } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs index 29a3d4fb..a4484ad8 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo/Program.cs @@ -14,8 +14,6 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using System; -using DustInTheWind.ConsoleTools.Controls; using DustInTheWind.ConsoleTools.Controls.Menus; using DustInTheWind.ConsoleTools.Demo.PauseDemo.Commands; @@ -25,14 +23,11 @@ internal class Program { private static void Main() { - Console.SetWindowSize(80, 50); - Console.SetBufferSize(160, 512); + //Console.SetWindowSize(80, 50); + //Console.SetBufferSize(160, 512); DisplayApplicationHeader(); RunDemos(); - - DummyText.Display("- This demo is over.", 3); - Pause.QuickDisplay(); } private static void DisplayApplicationHeader() @@ -46,19 +41,68 @@ private static void DisplayApplicationHeader() private static void RunDemos() { - ICommand[] commands = + bool exitWasRequested = false; + + TextMenu textMenu = new TextMenu(); + textMenu.AddItems(new[] { - new DefaultCommand(), - new CustomUnlockKeyCommand(), - new ErasablePauseCommand(), - new CustomMarginsCommand(), - new CustomPaddingsCommand(), - new ForegroundColorCommand(), - new BackgroundColorCommand() - }; + new TextMenuItem + { + Id = "1", + Text = "Default", + Command = new DefaultCommand() + }, + new TextMenuItem + { + Id = "2", + Text = "Custom Unlock Key", + Command = new CustomUnlockKeyCommand() + }, + new TextMenuItem + { + Id = "3", + Text = "Erasable Pause", + Command = new ErasablePauseCommand() + }, + new TextMenuItem + { + Id = "4", + Text = "Custom Margins", + Command = new CustomMarginsCommand() + }, + new TextMenuItem + { + Id = "5", + Text = "Custom Paddings", + Command = new CustomPaddingsCommand() + }, + new TextMenuItem + { + Id = "6", + Text = "Foreground Color", + Command = new ForegroundColorCommand() + }, + new TextMenuItem + { + Id = "7", + Text = "Background Color", + Command = new BackgroundColorCommand() + }, + new TextMenuItem + { + Id = "0", + Text = "Exit", + Command = new ActionCommand(() => + { + exitWasRequested = true; + }) + } + }); - foreach (ICommand command in commands) - command.Execute(); + while (!exitWasRequested) + { + textMenu.Display(); + } } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj index 538efc95..7f34d27a 100644 --- a/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj +++ b/sources/ConsoleTools/ConsoleTools.Mvc/ConsoleTools.Cli.csproj @@ -5,13 +5,9 @@ DustInTheWind.ConsoleTools.Mvc DustInTheWind.ConsoleTools.Mvc false - false + This is a framework to help you structure the presentation layer of a Console Application. Similar to ASP.NET MVC. - - - - diff --git a/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs deleted file mode 100644 index f47eb0d8..00000000 --- a/sources/ConsoleTools/ConsoleTools.Mvc/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// -------------------------------------------------------------------------------- -// Bugs or feature requests -// -------------------------------------------------------------------------------- -// Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose - -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("DustInTheWind.ConsoleTools.Mvc")] -[assembly: AssemblyDescription("This is a framework to help you structure the presentation layer of a Console Application. Similar to ASP.NET MVC.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0D02363D-1057-46C1-B0F5-C9D7E40B3348")] \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj index c19726c1..c88c8f53 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj +++ b/sources/ConsoleTools/ConsoleTools.Tests/ConsoleTools.Tests.csproj @@ -1,36 +1,27 @@  - netstandard2.0 + net5.0 DustInTheWind.ConsoleTools.Tests DustInTheWind.ConsoleTools.Tests - false - false - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - + + + + \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTableTests/ColumnTests.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTableTests/ColumnTests.cs index 847985f1..8f8299ba 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTableTests/ColumnTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromDataTable +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromDataTableTests { [TestFixture] public class ColumnTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTableTests/RowTests.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/RowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTableTests/RowTests.cs index ddb470e1..7184015d 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTableTests/RowTests.cs @@ -24,7 +24,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromDataTable +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromDataTableTests { [TestFixture] public class RowTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTableTests/TitleTests.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTableTests/TitleTests.cs index 5a9796fc..00da1d3c 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTable/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromDataTableTests/TitleTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromDataTable +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromDataTableTests { [TestFixture] public class TitleTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/ColumnTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromListTests/ColumnTests.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/ColumnTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromListTests/ColumnTests.cs index 0c258fd6..1fdd02cd 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/ColumnTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromListTests/ColumnTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromList +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromListTests { [TestFixture] public class ColumnTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/RowTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromListTests/RowTests.cs similarity index 99% rename from sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/RowTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromListTests/RowTests.cs index 60448e6e..b6959d49 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/RowTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromListTests/RowTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromList +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromListTests { [TestFixture] public class RowTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/TitleTests.cs b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromListTests/TitleTests.cs similarity index 98% rename from sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/TitleTests.cs rename to sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromListTests/TitleTests.cs index ea0e8030..bd233602 100644 --- a/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromList/TitleTests.cs +++ b/sources/ConsoleTools/ConsoleTools.Tests/Controls/Tables/DataGridTests/BuildFromListTests/TitleTests.cs @@ -23,7 +23,7 @@ using DustInTheWind.ConsoleTools.Controls.Tables; using NUnit.Framework; -namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromList +namespace DustInTheWind.ConsoleTools.Tests.Controls.Tables.DataGridTests.BuildFromListTests { [TestFixture] public class TitleTests diff --git a/sources/ConsoleTools/ConsoleTools.Tests/Properties/AssemblyInfo.cs b/sources/ConsoleTools/ConsoleTools.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 90e9e3d1..00000000 --- a/sources/ConsoleTools/ConsoleTools.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -// ConsoleTools -// Copyright (C) 2017-2020 Dust in the Wind -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("DustInTheWind.ConsoleTools.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8633cd0c-b455-447b-a563-3e2575c0eacb")] \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.sln b/sources/ConsoleTools/ConsoleTools.sln index 843e1bdd..508591f7 100644 --- a/sources/ConsoleTools/ConsoleTools.sln +++ b/sources/ConsoleTools/ConsoleTools.sln @@ -45,7 +45,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Controls.Spinn EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Controls.Menus", "ConsoleTools.Controls.Menus\ConsoleTools.Controls.Menus.csproj", "{439C9C20-BE41-4AE1-83D0-13AF94114EDE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTools.Demo.PauseDemo.NetCore", "ConsoleTools.Demo.PauseDemo.NetCore\ConsoleTools.Demo.PauseDemo.NetCore.csproj", "{1A139874-D3ED-48F0-8AAF-B6390BAF0A23}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTools.Demo.PauseDemo.NetCore", "ConsoleTools.Demo.PauseDemo.NetCore\ConsoleTools.Demo.PauseDemo.NetCore.csproj", "{1A139874-D3ED-48F0-8AAF-B6390BAF0A23}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0119E5F4-08FC-4F5F-B5BB-B2CA46FDF37F}" + ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props + LICENSE.txt = LICENSE.txt + README.md = README.md + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/sources/ConsoleTools/Directory.Build.props b/sources/ConsoleTools/Directory.Build.props new file mode 100644 index 00000000..e4ccf9a2 --- /dev/null +++ b/sources/ConsoleTools/Directory.Build.props @@ -0,0 +1,22 @@ + + + + Dust in the Wind + Console Tools + Copyright © Dust in the Wind 2017-2021 + 0.5.7.0 + en + git + LICENSE.txt + README.md + + https://github.com/lastunicorn/ConsoleTools + https://github.com/lastunicorn/ConsoleTools + + + + + + + + diff --git a/sources/ConsoleTools/LICENSE.txt b/sources/ConsoleTools/LICENSE.txt new file mode 100644 index 00000000..733c0723 --- /dev/null +++ b/sources/ConsoleTools/LICENSE.txt @@ -0,0 +1,675 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + diff --git a/sources/ConsoleTools/README.md b/sources/ConsoleTools/README.md new file mode 100644 index 00000000..8648357f --- /dev/null +++ b/sources/ConsoleTools/README.md @@ -0,0 +1,25 @@ +# Donations + +If you like my work and want to support me, you can buy me a coffee: + +[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Y8Y62EZ8H) + +# Console Tools + +A set of tools and "controls" for the .net Console. They help displaying and reading data to/from the user. + +_**Note**: Until reaching the version 1.0.0 the controls may change dramatically and will not ensure backwards compatibility._ + + +## Bugs and feature requests + +Please add a **[new issue](https://github.com/lastunicorn/ConsoleTools/issues/new/choose)** if: +- you found a bug; +- you see an improvement that can be done; +- you think of a control that is cool to add. + + +## Most cool controls +There is a data grid control that can display tabular data, there is a progress bar, a spinner, menus, etc. + +All controls have configurable top and bottom margins and paddings. From 505aa72e1f926412c3044973bca174744f5b8ef3 Mon Sep 17 00:00:00 2001 From: Iuga Alexandru Date: Mon, 1 Nov 2021 17:33:08 +0200 Subject: [PATCH 50/57] Update netframework.yml --- .github/workflows/netframework.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/netframework.yml b/.github/workflows/netframework.yml index 51f4fafa..a9af5dcc 100644 --- a/.github/workflows/netframework.yml +++ b/.github/workflows/netframework.yml @@ -16,22 +16,22 @@ jobs: build: # The type of runner that the job will run on runs-on: windows-latest + name: Main Build # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - name: Check out repository + uses: actions/checkout@v2 - name: Setup msbuild - uses: microsoft/setup-msbuild@v1 + uses: actions/setup-dotnet@v1.7.2 - - name: Setup NuGet - # You may pin to the exact commit or the version. - # uses: NuGet/setup-nuget@255f46e14d51fbc603743e2aa2907954463fbeb9 - uses: NuGet/setup-nuget@v1.0.2 - - - name: Restore NuGet packages - run: nuget restore ./sources/ConsoleTools/ConsoleTools.sln - - - name: Build the solution - run: msbuild ./sources/ConsoleTools/ConsoleTools.sln + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Test + run: dotnet test --no-restore --verbosity normal From 0ff008c875558dd21185017056b7aaddb4438856 Mon Sep 17 00:00:00 2001 From: Iuga Alexandru Date: Mon, 1 Nov 2021 17:36:55 +0200 Subject: [PATCH 51/57] Update netframework.yml --- .github/workflows/netframework.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/netframework.yml b/.github/workflows/netframework.yml index a9af5dcc..2f269a99 100644 --- a/.github/workflows/netframework.yml +++ b/.github/workflows/netframework.yml @@ -28,10 +28,10 @@ jobs: uses: actions/setup-dotnet@v1.7.2 - name: Install dependencies - run: dotnet restore + run: dotnet restore /sources/ConsoleTools/ConsoleTools.sln - - name: Build - run: dotnet build --configuration Release --no-restore + - name: Build + run: dotnet build --configuration Release --no-restore /sources/ConsoleTools/ConsoleTools.sln - name: Test - run: dotnet test --no-restore --verbosity normal + run: dotnet test --no-restore --verbosity normal /sources/ConsoleTools/ConsoleTools.sln From 1eb42c81bb32c7d98b5b089932061dac67f821be Mon Sep 17 00:00:00 2001 From: Iuga Alexandru Date: Mon, 1 Nov 2021 17:38:40 +0200 Subject: [PATCH 52/57] Update netframework.yml --- .github/workflows/netframework.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/netframework.yml b/.github/workflows/netframework.yml index 2f269a99..293b7181 100644 --- a/.github/workflows/netframework.yml +++ b/.github/workflows/netframework.yml @@ -28,10 +28,10 @@ jobs: uses: actions/setup-dotnet@v1.7.2 - name: Install dependencies - run: dotnet restore /sources/ConsoleTools/ConsoleTools.sln + run: dotnet restore "sources/ConsoleTools/ConsoleTools.sln" - name: Build - run: dotnet build --configuration Release --no-restore /sources/ConsoleTools/ConsoleTools.sln + run: dotnet build --configuration Release --no-restore "sources/ConsoleTools/ConsoleTools.sln" - name: Test - run: dotnet test --no-restore --verbosity normal /sources/ConsoleTools/ConsoleTools.sln + run: dotnet test --no-restore --verbosity normal "sources/ConsoleTools/ConsoleTools.sln" From 687e09d5e86ba9e0e7ebb29b9d15bbde92e60f85 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Tue, 14 Dec 2021 08:04:40 +0200 Subject: [PATCH 53/57] add drawio diagram --- doc/controls.drawio.png | Bin 0 -> 79669 bytes nuget2/pack.ps1 | 35 ++++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 doc/controls.drawio.png diff --git a/doc/controls.drawio.png b/doc/controls.drawio.png new file mode 100644 index 0000000000000000000000000000000000000000..451a05aaa3edd2a5dc1f6c6b4e67427e8b2a3ebe GIT binary patch literal 79669 zcmeFZc{tSX|1XXx?X;;RlBi^xF@}_7jCBlS9fk-qhFO_m#*nR5NkSVE<(+*gLbCR5 zL6M{=d$OcL$iAI>EN$m}zvp+(U%%^IpRO*(YwqQ_KJMrJyr1{$JjO(S{hFO?czAf$ z8yXhLLmE~x%2pp$mPJz*t_0TSWVv;TR zfj9Fp(stG3;4K*}nyE3%65?gzW#DV-gmPE3(1Vy5?1KPVBgjx49U|G5?Ts?>qQfyx zc#<*Q!iea~f*ZjpMk+=~gewN<+L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RJ424e9TX{{X~&I4%n~du!%?+MYM-p17%fW;OCP5b)2FrUP8O8mPpz Z&6TK>-VN`JH8+6InUl6BYAw8y{|yOFSWo}} literal 0 HcmV?d00001 diff --git a/nuget2/pack.ps1 b/nuget2/pack.ps1 index d135ebfe..c5d5af37 100644 --- a/nuget2/pack.ps1 +++ b/nuget2/pack.ps1 @@ -1,32 +1,37 @@ . .\config.ps1 -if (Test-Path "$packagesDirectory") -{ +function PipePropertyTest { + param + ( + [parameter(ValueFromPipelineByPropertyName)][int]$intP, + [parameter(ValueFromPipelineByPropertyName)][string]$stringP + ) + Write-host "Int: $intP was recieved" -ForegroundColor Green + Write-host "String: $stringP was recieved" -ForegroundColor magenta +} + + +if (Test-Path "$packagesDirectory") { Remove-Item "$packagesDirectory" -Recurse } -foreach ($package in $packages) -{ - $nuspecExists = $package.NuspecPath -ne $null +foreach ($package in $packages) { + $nuspecExists = $null -ne $package.NuspecPath - if ($nuspecExists) - { - Write-Output "Nuspec file was specified. Try to generate package using the nuspec file." + if ($nuspecExists) { + Write-Output "Nuspec file was provided. Try to generate package using the nuspec file." $nuspecFilePath = $package.NuspecPath nuget pack "$nuspecFilePath" -OutputDirectory "$packagesDirectory" -Version "$version" } - else - { - $projectExists = $package.ProjectPath -ne $null + else { + $projectExists = $null -ne $package.ProjectPath - if ($projectExists) - { + if ($projectExists) { Write-Output "Project file was specified. Try to generate package using the project file." $projectPath = $package.ProjectPath dotnet pack --configuration Release --output "$packagesDirectory" "$projectPath" } - else - { + else { $packageId = $package.PackageId Write-Output "Package $packageId could not be generated. Nether nuspec or project files were provided." } From 2239feff052e0a18c9a791d4efc81947d5b30ea3 Mon Sep 17 00:00:00 2001 From: lastunicorn Date: Sun, 27 Feb 2022 10:29:14 +0200 Subject: [PATCH 54/57] renamed the row anc cell classes. code cleanup. r --- .../MenuItems/LabelMenuItem.cs | 2 +- .../ConsoleTools.Controls.Tables/CellBase.cs | 6 +- .../ClassDiagram1.cd | 32 ++++----- .../{DataCell.cs => ContentCell.cs} | 44 ++++++------ .../{DataRow.cs => ContentRow.cs} | 70 +++++++++--------- .../{DataRowList.cs => ContentRowList.cs} | 72 +++++++++---------- .../ConsoleTools.Controls.Tables/DataGrid.cs | 16 ++--- .../DataGridBuilderFromDataTable.cs | 2 +- .../DataGridBuilderFromObject.cs | 8 +-- .../RenderingModel/DataGridXBuilder.cs | 2 +- .../RenderingModel/RowX.cs | 10 +-- .../ConsoleTools.Core/Controls/AlignedText.cs | 4 +- .../BlockControl.MarginsAndPaddings.cs | 2 +- .../BlockControl.WidthAndAlignment.cs | 2 +- .../Controls/BlockControl.cs | 2 +- .../ConsoleTools.Core/Controls/Control.cs | 2 +- .../Controls/ControlDisplay.cs | 2 +- .../Controls/ControlLayout.cs | 2 +- .../Controls/ErasableControl.cs | 2 +- .../Controls/HorizontalAlignment.cs | 2 +- .../Controls/IRepeatableSupport.cs | 2 +- .../Controls/InlineControl.cs | 2 +- .../Controls/InlineTextBlock.cs | 2 +- .../ConsoleTools.Core/Controls/Location.cs | 2 +- .../Controls/LongRunningControl.cs | 2 +- .../Controls/MultilineText.cs | 2 +- .../ConsoleTools.Core/Controls/Size.cs | 2 +- .../ConsoleTools.Core/Controls/Thickness.cs | 2 +- ...tomConsole.WriteAligned.BackgroundColor.cs | 1 + .../CustomConsole.WriteAligned.BothColors.cs | 1 + ...ustomConsole.WriteAligned.DefaultColors.cs | 1 + ...tomConsole.WriteAligned.ForegroundColor.cs | 1 + ...ConsoleTools.Demo.PauseDemo.NetCore.csproj | 1 - .../ConsoleTools.Demo.PrompterDemo.csproj | 4 -- .../ConsoleTools.Tests.csproj | 1 - .../BuildFromDataTableTests/ColumnTests.cs | 1 + .../BuildFromDataTableTests/RowTests.cs | 1 + .../BuildFromDataTableTests/TitleTests.cs | 1 + .../BuildFromListTests/ColumnTests.cs | 1 + .../BuildFromListTests/RowTests.cs | 1 + .../BuildFromListTests/TitleTests.cs | 1 + .../CalculatePaddingLeftTests.cs | 36 +++++----- .../CalculatePaddingRightTests.cs | 36 +++++----- ...nstructorMultilineTextAndAlignmentTests.cs | 11 +-- .../ConstructorMultilineTextTests.cs | 11 +-- .../ConstructorNoParamsTests.cs | 11 +-- .../ConstructorObjectAndAlignmentTests.cs | 11 +-- .../NormalCellTests/ConstructorObjectTests.cs | 11 +-- .../ConstructorStringAndAlignmentTests.cs | 11 +-- .../NormalCellTests/ConstructorStringTests.cs | 11 +-- .../AddCellEnumerationTests.cs | 30 ++++---- .../NormalRowListTests/AddCellsTests.cs | 36 +++++----- .../NormalRowListTests/AddNormalRowTests.cs | 24 +++---- .../AddStringEnumerationTests.cs | 14 ++-- .../NormalRowListTests/AddStringsTests.cs | 16 ++--- .../Tables/NormalRowListTests/ClearTests.cs | 22 +++--- .../NormalRowListTests/ConstructorTests.cs | 4 +- .../NormalRowListTests/RemoveAtTests.cs | 60 ++++++++-------- .../Tables/NormalRowListTests/RemoveTests.cs | 60 ++++++++-------- .../Tables/NormalRowTests/ConstructorTests.cs | 24 +++---- .../CellXTests/RenderTextTests.cs | 1 + .../RowXTests/CalculateLayoutTests.cs | 1 + .../TableTests/CellAlignmentPerColumnTests.cs | 3 +- .../TableTests/CellAlignmentPerTableTests.cs | 1 + .../Tables/TableTests/CellAlignmentTests.cs | 11 +-- .../Tables/TableTests/ConstructorTests.cs | 1 + .../Tables/TableTests/HeaderAlignmentTests.cs | 1 + .../Tables/TableTests/TitleAlignmentTests.cs | 1 + .../AlignedTextTests/SpaceLeftTests.cs | 1 + .../AlignedTextTests/ToStringTests.cs | 1 + ...tualClientWidthTests_NoWidthConstraints.cs | 1 + ...ualContentWidthTests_NoWidthConstraints.cs | 1 + ...ActualFullWidthTests_NoWidthConstraints.cs | 1 + .../ActualWidthTests_NoWidthConstraints.cs | 1 + .../ControlLayoutTests/MarginTests.cs | 1 + .../ControlLayoutTests/PaddingTests.cs | 1 + .../Constructor_EmptyTests.cs | 1 + .../Constructor_InitializeLinesTests.cs | 1 + .../Constructor_InitializeSizeTests.cs | 1 + .../Constructor_RawTextTests.cs | 1 + .../MultilineTextTests/GetLinesTest.cs | 1 + ...mplicitConversionFromMultilineTextTests.cs | 1 + .../ImplicitConversionToMultilineTextTests.cs | 1 + .../Controls/SizeTests/ConstructorTests.cs | 1 + .../SizeTests/InflateWithNumberTests.cs | 1 + .../Core/Controls/SizeTests/IsEmptyTests.cs | 1 + sources/ConsoleTools/ConsoleTools.sln | 29 -------- 87 files changed, 415 insertions(+), 407 deletions(-) rename sources/ConsoleTools/ConsoleTools.Controls.Tables/{DataCell.cs => ContentCell.cs} (85%) rename sources/ConsoleTools/ConsoleTools.Controls.Tables/{DataRow.cs => ContentRow.cs} (77%) rename sources/ConsoleTools/ConsoleTools.Controls.Tables/{DataRowList.cs => ContentRowList.cs} (77%) diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs index 1bb01f1c..6247abbc 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Menus/MenuItems/LabelMenuItem.cs @@ -77,7 +77,7 @@ public bool IsVisible ///

/// Gets or sets the horizontal alignment of the current instance inside the menu. - /// Default value: . + /// Default value: . /// public HorizontalAlignment HorizontalAlignment { get; set; } = HorizontalAlignment.Default; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs index a48c5eed..b7b3c840 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/CellBase.cs @@ -31,17 +31,17 @@ public abstract class CellBase /// /// Gets the default horizontal alignment for a cell. /// - public static HorizontalAlignment DefaultHorizontalAlignment { get; } = HorizontalAlignment.Left; + public static HorizontalAlignment DefaultHorizontalAlignment => HorizontalAlignment.Left; /// /// Gets the default left padding applied for a cell. /// - public static int DefaultPaddingLeft { get; } = 1; + public static int DefaultPaddingLeft => 1; /// /// Gets the default left padding applied for a cell. /// - public static int DefaultPaddingRight { get; } = 1; + public static int DefaultPaddingRight => 1; /// /// Gets or sets the content of the cell. diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd index 0652fa77..e6423850 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ClassDiagram1.cd @@ -12,7 +12,14 @@ - + + + + + + + + @@ -22,13 +29,6 @@ - - - - - - - AACIAwIAAAWAAEAkCUAAAQhCFICEAAAAABAAAIgACAQ= DataGrid.cs @@ -36,9 +36,9 @@ + - @@ -66,11 +66,11 @@ TitleCell.cs - + AAIAAAAAAAAAABAACABABAQAAAAAAAAECAAAEABAAAA= - NormalRowList.cs + ContentRowList.cs @@ -89,11 +89,11 @@ BorderTemplate.cs - + AAAAAAEAAgAAABAACAAAgAACAAAAAAAAAAAAAAAAAAA= - NormalRow.cs + ContentRow.cs @@ -135,11 +135,11 @@ HeaderCell.cs - + - AAQAYAAAACAAABAAABEAABAAAAgAAAAEAAAABAACAAA= - NormalCell.cs + AAQAYAAAACAAABAAABAIABAAAAgAAAAEAAAABAACAAA= + ContentCell.cs diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ContentCell.cs similarity index 85% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/ContentCell.cs index ffc250d2..e254beb6 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataCell.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ContentCell.cs @@ -26,77 +26,77 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// /// Represents a cell that contains data. /// - public class DataCell : CellBase + public class ContentCell : CellBase { /// /// Gets or sets the row that contains the current cell. /// - public DataRow ParentRow { get; internal set; } + public ContentRow ParentRow { get; internal set; } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// empty content. /// - public DataCell() + public ContentCell() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it. /// /// The text displayed in the cell. - public DataCell(string text) + public ContentCell(string text) : base(text) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it and its horizontal alignment. /// /// The text displayed in the cell. /// The horizontal alignment of the content of the new cell. - public DataCell(string text, HorizontalAlignment horizontalAlignment) + public ContentCell(string text, HorizontalAlignment horizontalAlignment) : base(text, horizontalAlignment) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it. /// /// - public DataCell(MultilineText text) + public ContentCell(MultilineText text) : base(text) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the text contained by it and its horizontal alignment. /// /// /// The horizontal alignment of the content of the new cell. - public DataCell(MultilineText text, HorizontalAlignment horizontalAlignment) + public ContentCell(MultilineText text, HorizontalAlignment horizontalAlignment) : base(text, horizontalAlignment) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// an object representing the content. /// - public DataCell(object content) + public ContentCell(object content) : base(content) { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// an object representing the content and its horizontal alignment. /// - public DataCell(object content, HorizontalAlignment horizontalAlignment) + public ContentCell(object content, HorizontalAlignment horizontalAlignment) : base(content, horizontalAlignment) { } @@ -266,20 +266,20 @@ private HorizontalAlignment CalculateHorizontalAlignmentAtTableLevel() } /// - /// Converts a into a instance. + /// Converts a into a instance. /// /// The text to be converted. - public static implicit operator DataCell(string text) + public static implicit operator ContentCell(string text) { MultilineText multilineText = new MultilineText(text); - return new DataCell(multilineText); + return new ContentCell(multilineText); } /// - /// Converts a into its representation. + /// Converts a into its representation. /// - /// The to be converted. - public static implicit operator string(DataCell cell) + /// The to be converted. + public static implicit operator string(ContentCell cell) { return cell.Content?.ToString() ?? string.Empty; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ContentRow.cs similarity index 77% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/ContentRow.cs index 0cbc3622..fa6bfeb6 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRow.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ContentRow.cs @@ -28,12 +28,12 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables /// /// Represents a row in the class. /// - public class DataRow : RowBase + public class ContentRow : RowBase { /// /// Gets the list of cells contained by the row. /// - private readonly List cells = new List(); + private readonly List cells = new List(); /// /// Gets the number of cells contained by the current instance. @@ -46,53 +46,53 @@ public class DataRow : RowBase /// The zero-based index of the cell to get or set. /// The cell at the specified index. /// - public DataCell this[int index] + public ContentCell this[int index] { get => cells[index]; set => cells[index] = value; } /// - /// Initializes a new instance of the class with default values. + /// Initializes a new instance of the class with default values. /// - public DataRow() + public ContentRow() { } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of cells. /// /// The list of cells that will be contained by the new row. - public DataRow(IEnumerable cells) + public ContentRow(IEnumerable cells) { if (cells == null) return; - foreach (DataCell cell in cells) + foreach (ContentCell cell in cells) AddCell(cell); } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of cells. /// /// The list of cells that will be contained by the new row. - public DataRow(params DataCell[] cells) + public ContentRow(params ContentCell[] cells) { if (cells == null) return; - foreach (DataCell cell in cells) + foreach (ContentCell cell in cells) AddCell(cell); } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of texts representing the cells content. /// /// The list of texts that will be placed in cells. - public DataRow(IEnumerable cellContents) + public ContentRow(IEnumerable cellContents) { if (cellContents == null) return; @@ -102,11 +102,11 @@ public DataRow(IEnumerable cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of texts representing the cells content. /// /// The list of texts that will be placed in cells. - public DataRow(params string[] cellContents) + public ContentRow(params string[] cellContents) { if (cellContents == null) return; @@ -116,11 +116,11 @@ public DataRow(params string[] cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public DataRow(IEnumerable cellContents) + public ContentRow(IEnumerable cellContents) { if (cellContents == null) return; @@ -130,11 +130,11 @@ public DataRow(IEnumerable cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public DataRow(params MultilineText[] cellContents) + public ContentRow(params MultilineText[] cellContents) { if (cellContents == null) return; @@ -144,11 +144,11 @@ public DataRow(params MultilineText[] cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public DataRow(IEnumerable cellContents) + public ContentRow(IEnumerable cellContents) { if (cellContents == null) return; @@ -158,11 +158,11 @@ public DataRow(IEnumerable cellContents) } /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the list of objects representing the cells content. /// /// The list of objects that will be placed in cells. - public DataRow(params object[] cellContents) + public ContentRow(params object[] cellContents) { if (cellContents == null) return; @@ -172,13 +172,13 @@ public DataRow(params object[] cellContents) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// - public void AddCell(DataCell cell) + public void AddCell(ContentCell cell) { if (cell == null) { - DataCell newCell = new DataCell + ContentCell newCell = new ContentCell { ParentRow = this }; @@ -192,11 +192,11 @@ public void AddCell(DataCell cell) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// public void AddCell(string cellContent) { - DataCell newCell = new DataCell + ContentCell newCell = new ContentCell { ParentRow = this }; @@ -208,11 +208,11 @@ public void AddCell(string cellContent) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// public void AddCell(MultilineText cellContent) { - DataCell newCell = new DataCell + ContentCell newCell = new ContentCell { ParentRow = this }; @@ -224,11 +224,11 @@ public void AddCell(MultilineText cellContent) } /// - /// Adds a new cell to the current instance of . + /// Adds a new cell to the current instance of . /// public void AddCell(object cellContent) { - DataCell newCell = new DataCell + ContentCell newCell = new ContentCell { ParentRow = this }; @@ -240,10 +240,10 @@ public void AddCell(object cellContent) } /// - /// Returns the index of the specified cell or null if the instance - /// is not found in the current instance. + /// Returns the index of the specified cell or null if the instance + /// is not found in the current instance. /// - public int? IndexOfCell(DataCell cell) + public int? IndexOfCell(ContentCell cell) { int indexOfCell = cells.IndexOf(cell); return indexOfCell == -1 ? (int?)null : indexOfCell; diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ContentRowList.cs similarity index 77% rename from sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs rename to sources/ConsoleTools/ConsoleTools.Controls.Tables/ContentRowList.cs index cd4f50e6..1e50b369 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataRowList.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/ContentRowList.cs @@ -26,13 +26,13 @@ namespace DustInTheWind.ConsoleTools.Controls.Tables { /// - /// Contains the list of s displayed by the table. + /// Contains the list of s displayed by the table. /// - public class DataRowList : IEnumerable + public class ContentRowList : IEnumerable { private readonly DataGrid parentDataGrid; - private readonly List rows = new List(); + private readonly List rows = new List(); /// /// Gets the number of rows contained in the current instance. @@ -40,21 +40,21 @@ public class DataRowList : IEnumerable public int Count => rows.Count; /// - /// Gets the at the specified index. + /// Gets the at the specified index. /// If the index is outside of the bounds of the list, null is returned. /// - /// The index of the to return. - /// The at the specified index. - public DataRow this[int rowIndex] => rowIndex >= 0 && rowIndex < rows.Count + /// The index of the to return. + /// The at the specified index. + public ContentRow this[int rowIndex] => rowIndex >= 0 && rowIndex < rows.Count ? rows[rowIndex] : null; /// - /// Initializes a new instance of the class with + /// Initializes a new instance of the class with /// the that owns it. /// /// The that owns the new instance. - public DataRowList(DataGrid parentDataGrid) + public ContentRowList(DataGrid parentDataGrid) { this.parentDataGrid = parentDataGrid ?? throw new ArgumentNullException(nameof(parentDataGrid)); } @@ -65,7 +65,7 @@ public DataRowList(DataGrid parentDataGrid) /// The row to be added. /// The added row. /// - public DataRow Add(DataRow row) + public ContentRow Add(ContentRow row) { if (row == null) throw new ArgumentNullException(nameof(row)); @@ -80,11 +80,11 @@ public DataRow Add(DataRow row) /// /// The list of cells of the new row. /// The newly created row. - public DataRow Add(IEnumerable cells) + public ContentRow Add(IEnumerable cells) { if (cells == null) throw new ArgumentNullException(nameof(cells)); - DataRow row = new DataRow(cells) + ContentRow row = new ContentRow(cells) { ParentDataGrid = parentDataGrid }; @@ -98,11 +98,11 @@ public DataRow Add(IEnumerable cells) /// /// The list of cells of the new row. /// The newly created row. - public DataRow Add(params DataCell[] cells) + public ContentRow Add(params ContentCell[] cells) { if (cells == null) throw new ArgumentNullException(nameof(cells)); - DataRow row = new DataRow(cells) + ContentRow row = new ContentRow(cells) { ParentDataGrid = parentDataGrid }; @@ -116,17 +116,17 @@ public DataRow Add(params DataCell[] cells) /// /// The list of cell contents of the new row. /// The newly created row. - public DataRow Add(IEnumerable cellContents) + public ContentRow Add(IEnumerable cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + ContentRow row = new ContentRow { ParentDataGrid = parentDataGrid }; foreach (string text in cellContents) - row.AddCell(new DataCell(text)); + row.AddCell(new ContentCell(text)); rows.Add(row); @@ -138,17 +138,17 @@ public DataRow Add(IEnumerable cellContents) ///
/// The list of cell contents of the new row. /// The newly created row. - public DataRow Add(params string[] cellContents) + public ContentRow Add(params string[] cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + ContentRow row = new ContentRow { ParentDataGrid = parentDataGrid }; foreach (string text in cellContents) - row.AddCell(new DataCell(text)); + row.AddCell(new ContentCell(text)); rows.Add(row); @@ -160,17 +160,17 @@ public DataRow Add(params string[] cellContents) ///
/// The list of cell contents of the new row. /// The newly created row. - public DataRow Add(IEnumerable cellContents) + public ContentRow Add(IEnumerable cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + ContentRow row = new ContentRow { ParentDataGrid = parentDataGrid }; foreach (MultilineText text in cellContents) - row.AddCell(new DataCell(text)); + row.AddCell(new ContentCell(text)); rows.Add(row); @@ -182,17 +182,17 @@ public DataRow Add(IEnumerable cellContents) /// /// The list of cell contents of the new row. /// The newly created row. - public DataRow Add(params MultilineText[] cellContents) + public ContentRow Add(params MultilineText[] cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + ContentRow row = new ContentRow { ParentDataGrid = parentDataGrid }; foreach (MultilineText text in cellContents) - row.AddCell(new DataCell(text)); + row.AddCell(new ContentCell(text)); rows.Add(row); @@ -204,17 +204,17 @@ public DataRow Add(params MultilineText[] cellContents) /// /// The list of cell contents of the new row. /// The newly created row. - public DataRow Add(IEnumerable cellContents) + public ContentRow Add(IEnumerable cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + ContentRow row = new ContentRow { ParentDataGrid = parentDataGrid }; foreach (object cellContent in cellContents) - row.AddCell(new DataCell(cellContent)); + row.AddCell(new ContentCell(cellContent)); rows.Add(row); @@ -226,17 +226,17 @@ public DataRow Add(IEnumerable cellContents) /// /// The list of cell contents of the new row. /// The newly created row. - public DataRow Add(params object[] cellContents) + public ContentRow Add(params object[] cellContents) { if (cellContents == null) throw new ArgumentNullException(nameof(cellContents)); - DataRow row = new DataRow + ContentRow row = new ContentRow { ParentDataGrid = parentDataGrid }; foreach (object cellContent in cellContents) - row.AddCell(new DataCell(cellContent)); + row.AddCell(new ContentCell(cellContent)); rows.Add(row); @@ -253,11 +253,11 @@ public void RemoveAt(int index) } /// - /// Removes the first occurrence of the instance from the list. + /// Removes the first occurrence of the instance from the list. /// /// true if item is successfully removed; otherwise, false. /// This method also returns false if item was not found in the list. - public bool Remove(DataRow row) + public bool Remove(ContentRow row) { return rows.Remove(row); } @@ -271,9 +271,9 @@ public void Clear() } /// - /// Returns an enumerator that iterates through the s contained by the current instance. + /// Returns an enumerator that iterates through the s contained by the current instance. /// - public IEnumerator GetEnumerator() + public IEnumerator GetEnumerator() { return rows.GetEnumerator(); } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs index 579dcfb9..dd6a2256 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGrid.cs @@ -63,7 +63,7 @@ public MultilineText Title /// /// Gets or sets the horizontal alignment for the content of the cells contained by the current data grid. /// - public HorizontalAlignment CellHorizontalAlignment { get; set; } = ConsoleTools.HorizontalAlignment.Default; + public HorizontalAlignment CellHorizontalAlignment { get; set; } = Controls.HorizontalAlignment.Default; /// /// Gets or sets the padding applied to the left side of every cell. @@ -96,14 +96,14 @@ private set /// /// Gets the list of rows contained by the current data grid. /// - public DataRowList Rows { get; } + public ContentRowList Rows { get; } /// /// Gets the row at the specified index. /// /// The zero-based index of the row to get. /// The row at the specified index. - public DataRow this[int rowIndex] => Rows[rowIndex]; + public ContentRow this[int rowIndex] => Rows[rowIndex]; /// /// Gets the cell at the specified location. @@ -111,7 +111,7 @@ private set /// The zero-based row index of the cell to get. /// The zero-based column index of the cell to get. /// The cell at the specified location. - public DataCell this[int rowIndex, int columnIndex] => Rows[rowIndex][columnIndex]; + public ContentCell this[int rowIndex, int columnIndex] => Rows[rowIndex][columnIndex]; /// /// Gets an object representing the border of the data grid. @@ -254,7 +254,7 @@ public bool DisplayBorderBetweenRows /// public DataGrid() { - Rows = new DataRowList(this); + Rows = new ContentRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(); @@ -267,7 +267,7 @@ public DataGrid() /// public DataGrid(string title) { - Rows = new DataRowList(this); + Rows = new ContentRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); @@ -280,7 +280,7 @@ public DataGrid(string title) /// public DataGrid(MultilineText title) { - Rows = new DataRowList(this); + Rows = new ContentRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); @@ -293,7 +293,7 @@ public DataGrid(MultilineText title) /// public DataGrid(object title) { - Rows = new DataRowList(this); + Rows = new ContentRowList(this); Columns = new ColumnList(this); HeaderRow = new HeaderRow(Columns); TitleRow = new TitleRow(title); diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs index 10c8dc9f..9a874d15 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromDataTable.cs @@ -42,7 +42,7 @@ public DataGridBuilderFromDataTable(DataTable dataTable) foreach (System.Data.DataRow dataRow in dataTable.Rows) { - DataRow row = new DataRow(dataRow.ItemArray); + ContentRow row = new ContentRow(dataRow.ItemArray); DataGrid.Rows.Add(row); } } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs index 3cac3858..dfc7479a 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/DataGridBuilderFromObject.cs @@ -68,7 +68,7 @@ public void Add(object item) if (item == null) return; - DataRow dataRow = new DataRow(); + ContentRow contentRow = new ContentRow(); foreach (MemberInfo memberInfo in members) { @@ -77,19 +77,19 @@ public void Add(object item) case FieldInfo fieldInfo: { object value = fieldInfo.GetValue(item); - dataRow.AddCell(value); + contentRow.AddCell(value); break; } case PropertyInfo propertyInfo: { object value = propertyInfo.GetValue(item); - dataRow.AddCell(value); + contentRow.AddCell(value); break; } } } - DataGrid.Rows.Add(dataRow); + DataGrid.Rows.Add(contentRow); } } } \ No newline at end of file diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs index d7a3543f..5280fbee 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/DataGridXBuilder.cs @@ -35,7 +35,7 @@ internal class DataGridXBuilder public HeaderRow HeaderRow { get; set; } - public DataRowList Rows { get; set; } + public ContentRowList Rows { get; set; } public DataGridBorder DataGridBorder { get; set; } diff --git a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs index 7fcda380..9e3290aa 100644 --- a/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs +++ b/sources/ConsoleTools/ConsoleTools.Controls.Tables/RenderingModel/RowX.cs @@ -89,16 +89,16 @@ public void Render(ITablePrinter tablePrinter, List cellWidths) } } - public static RowX CreateFrom(DataRow dataRow) + public static RowX CreateFrom(ContentRow contentRow) { - if (dataRow == null) throw new ArgumentNullException(nameof(dataRow)); + if (contentRow == null) throw new ArgumentNullException(nameof(contentRow)); RowX rowX = new RowX { - Border = dataRow.ParentDataGrid?.Border?.IsVisible == true - ? DataGridBorderX.CreateFrom(dataRow.ParentDataGrid.Border) + Border = contentRow.ParentDataGrid?.Border?.IsVisible == true + ? DataGridBorderX.CreateFrom(contentRow.ParentDataGrid.Border) : null, - Cells = dataRow + Cells = contentRow .Select(CellX.CreateFrom) .ToList() }; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs index 2f11cdfe..edc5a35e 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/AlignedText.cs @@ -22,7 +22,7 @@ using System; using System.Text; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Represents a text that can be horizontally aligned into a space. @@ -66,7 +66,7 @@ public int Width /// /// Gets or sets the horizontal alignment to be applied if the property - /// is set on . + /// is set on . /// public HorizontalAlignment DefaultHorizontalAlignment { get; set; } = HorizontalAlignment.Left; diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs index d85ab355..4b32ae76 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.MarginsAndPaddings.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { partial class BlockControl { diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs index 3901c63e..dd2954ea 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.WidthAndAlignment.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { partial class BlockControl { diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs index 771973ec..ff7c4ea1 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/BlockControl.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Provides base functionality for a block control like top and bottom margins, paddings, etc. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs index 41579ee4..4e6d85e0 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Control.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Provides base functionality for a control. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs index 57d8eb60..5a16a3c9 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlDisplay.cs @@ -1,6 +1,6 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Represents the display available for a control to write on. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs index d2e290bd..218400b8 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/ControlLayout.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Calculates the space needed for each component of the control: each margin, padding, content dimensions, empty spaces, etc. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs index 0f982f8e..ee68cac1 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/ErasableControl.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Provides functionality of erasing the control after it is displayed. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs index 96b1d444..b461d64a 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/HorizontalAlignment.cs @@ -19,7 +19,7 @@ // -------------------------------------------------------------------------------- // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Specifies the horizontal position of an element in a container. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs index 20a6c46e..e64cabee 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/IRepeatableSupport.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Must be implemented by a control in order to offer additional support when used in the . diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs index ea4c3ec9..9c27c8d3 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineControl.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Base class for a control displayed inline. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs index a7d3a5aa..f478aced 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/InlineTextBlock.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Represents a text to be displayed in the console. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs index ab2dfef4..ae7c8bbd 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Location.cs @@ -21,7 +21,7 @@ using System.Globalization; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Represents a location in the 2D plane. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs index d01eaa1a..df2f7f5b 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/LongRunningControl.cs @@ -21,7 +21,7 @@ using System; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Provides base functionality for a control that continues to run after it is displayed, until it is explicitly closed. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs index c2c69794..d2323c4d 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/MultilineText.cs @@ -25,7 +25,7 @@ using System.Collections.ObjectModel; using System.Linq; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Represents a text on multiple lines. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs index f4daa2b9..ee44b517 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Size.cs @@ -21,7 +21,7 @@ using System.Globalization; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Represents the size of a rectangle. diff --git a/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs b/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs index 24677018..e6a261c4 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/Controls/Thickness.cs @@ -22,7 +22,7 @@ using System; using System.Globalization; -namespace DustInTheWind.ConsoleTools +namespace DustInTheWind.ConsoleTools.Controls { /// /// Represents the thickness of a rectangle. diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs index 14a3bf13..bb681afe 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BackgroundColor.cs @@ -20,6 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools { diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs index b17ad38e..db4cdc54 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.BothColors.cs @@ -20,6 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools { diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs index e234d8b5..0d064ecc 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.DefaultColors.cs @@ -20,6 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools { diff --git a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs index 52f86821..269347de 100644 --- a/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs +++ b/sources/ConsoleTools/ConsoleTools.Core/CustomConsole.WriteAligned.ForegroundColor.cs @@ -20,6 +20,7 @@ // Note: For any bug or feature request please add a new issue on GitHub: https://github.com/lastunicorn/ConsoleTools/issues/new/choose using System; +using DustInTheWind.ConsoleTools.Controls; namespace DustInTheWind.ConsoleTools { diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj index c9ea9baf..74a382c8 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.PauseDemo.NetCore/ConsoleTools.Demo.PauseDemo.NetCore.csproj @@ -13,7 +13,6 @@ - diff --git a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/ConsoleTools.Demo.PrompterDemo.csproj b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/ConsoleTools.Demo.PrompterDemo.csproj index f296e681..47c1b52d 100644 --- a/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/ConsoleTools.Demo.PrompterDemo.csproj +++ b/sources/ConsoleTools/ConsoleTools.Demo.PrompterDemo/ConsoleTools.Demo.PrompterDemo.csproj @@ -90,10 +90,6 @@ {975d695d-1fd2-446f-bd7c-0f7839c1559d} ConsoleTools.Core - - {08C40188-94F1-47EE-AAAA-08A372BCA026} - ConsoleTools.Controls.Tables -