Skip to content

Commit

Permalink
[UPD] Change terminal table to use Unicode chars
Browse files Browse the repository at this point in the history
  • Loading branch information
geoperez committed Sep 16, 2019
1 parent ced960b commit 6995fb1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Swan.Lite/Swan.Lite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Swan.Lite</AssemblyName>
<CodeAnalysisRuleSet>..\..\StyleCop.Analyzers.ruleset</CodeAnalysisRuleSet>
<Version>2.2.0</Version>
<Version>2.2.1</Version>
<Authors>Unosquare</Authors>
<PackageIconUrl>https://github.com/unosquare/swan/raw/master/swan-logo-32.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/unosquare/swan</PackageProjectUrl>
Expand Down
22 changes: 11 additions & 11 deletions src/Swan.Lite/Terminal.Graphics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ public static partial class Terminal
/// </summary>
private static class Table
{
public static void Vertical() => Write((byte)179, Settings.BorderColor);
public static void Vertical() => Write('\u2502', Settings.BorderColor);

public static void RightTee() => Write((byte)180, Settings.BorderColor);
public static void RightTee() => Write('\u2524', Settings.BorderColor);

public static void TopRight() => Write((byte)191, Settings.BorderColor);
public static void TopRight() => Write('\u2510', Settings.BorderColor);

public static void BottomLeft() => Write((byte)192, Settings.BorderColor);
public static void BottomLeft() => Write('\u2514', Settings.BorderColor);

public static void BottomTee() => Write((byte)193, Settings.BorderColor);
public static void BottomTee() => Write('\u2534', Settings.BorderColor);

public static void TopTee() => Write((byte)194, Settings.BorderColor);
public static void TopTee() => Write('\u252c', Settings.BorderColor);

public static void LeftTee() => Write((byte)195, Settings.BorderColor);
public static void LeftTee() => Write('\u251c', Settings.BorderColor);

public static void Horizontal(int length) => Write((byte)196, Settings.BorderColor, length);
public static void Horizontal(int length) => Write(new string('\u2500', length), Settings.BorderColor);

public static void Tee() => Write((byte)197, Settings.BorderColor);
public static void Tee() => Write('\u253c', Settings.BorderColor);

public static void BottomRight() => Write((byte)217, Settings.BorderColor);
public static void BottomRight() => Write('\u2518', Settings.BorderColor);

public static void TopLeft() => Write((byte)218, Settings.BorderColor);
public static void TopLeft() => Write('\u250C', Settings.BorderColor);
}
}
}
2 changes: 1 addition & 1 deletion src/Swan.Lite/Terminal.Interaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public static ConsoleKeyInfo ReadPrompt(

var inputLeft = Settings.UserOptionText.Length + 3;

SetCursorPosition(inputLeft, CursorTop - 2);
SetCursorPosition(inputLeft, CursorTop - 1);
var userInput = ReadKey(true);
Write(userInput.Key.ToString(), ConsoleColor.Gray);

Expand Down

0 comments on commit 6995fb1

Please sign in to comment.