Skip to content

Commit

Permalink
➕Add Symbolic Styles Text for Console.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayanFiroozi committed Jun 13, 2023
1 parent 5dd7ffc commit 2a4d15a
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 24 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# FluentConsole.Net Change Log :
</br>

## ✔ 1.1.8562 ( 2023-06-13 )
* Add Symbolic Styles Text for Console (Only alphabets and numbers are available).


## ✔ 1.1.8562 ( 2023-06-11 )
* Add **FastConsole** feature to print message(s) very easy :
- **PrintText**(string text, bool IncludeDateTime = true)
Expand Down
14 changes: 3 additions & 11 deletions FluentConsole.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,16 @@
<ApplicationIcon>command.ico</ApplicationIcon>
<PackageIcon>command.png</PackageIcon>
<Title>FluentConsole.Net , Using .Net Console In Elegant Way !</Title>
<Version>1.0.8562.1</Version>
<Version>1.0.8564</Version>
<Authors>Shayan Firoozi &lt;shayan.firoozi@gmail.com&gt;</Authors>
<Company>TrendSoft®</Company>
<Description>Using .Net Console with fluent builder interface with many extension methods.</Description>
<Copyright>Copyright © 2023 TrendSoft® (MIT License)</Copyright>
<PackageProjectUrl>https://github.com/ShayanFiroozi/FluentConsole.Net</PackageProjectUrl>
<RepositoryUrl>https://github.com/ShayanFiroozi/FluentConsole.Net</RepositoryUrl>
<PackageReadmeFile>README-Nuget.md</PackageReadmeFile>
<PackageReleaseNotes>✔ 1.1.8562.1 ( 2023-06-11 ) - BugFixed verison of 1.1.8562

➕ Add "FastConsole" class to print message(s) very easy :

→ PrintText(string text, bool IncludeDateTime = true)
→ PrintInfo(string info, bool IncludeDateTime = true)
→ PrintWarning(string warning, bool IncludeDateTime = true)
→ PrintError(string error, bool IncludeDateTime = true)
→ PrintDebug(string error, bool IncludeDateTime = true)
→ PrintException(Exception exception, bool IncludeDateTime = true, bool JsonFormat = true)</PackageReleaseNotes>
<PackageReleaseNotes>## ✔ 1.1.8562 ( 2023-06-13 )
➕ Add Symbolic Styles for Console (Only alphabets and numbers are available).</PackageReleaseNotes>
<PackageTags>console;csharp;dotnet;net7;net6;net48;fluent;helper;c#</PackageTags>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
25 changes: 17 additions & 8 deletions FluentConsole.TestApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,23 @@ internal static class Program

static async Task Main(string[] args)
{
// Symbolic Style
FluentConsole.FastConsole.PrintSymbolicText("ABCDEFGHIJKLMNOPQRSTUVWXYZ", FontStyle.StyleA, ConsoleColor.DarkCyan);
FluentConsole.Console.AddLineBreak().Print();
FluentConsole.FastConsole.PrintSymbolicText("123456789", FontStyle.StyleA, ConsoleColor.Yellow);
FluentConsole.Console.AddLineBreak().Print();
FluentConsole.FastConsole.PrintSymbolicText(@" ! @ # $ % ^ & * ( ) _ + = - / . , ? > < \ | "" : ; ' ] [ ' ", FontStyle.StyleA, ConsoleColor.Yellow);

Console.ReadKey();
// Symbolic Stylish Text

FluentConsole.Console.AddLineBreak(3).Print();

FluentConsole.FastConsole.PrintSymbolicText("Fluent Console For .Net", FontStyle.StyleA, ConsoleColor.DarkCyan);

FluentConsole.Console.AddLineBreak(3).Print();

FluentConsole.FastConsole.PrintSymbolicText("I AM A STYLISH TEXT", FontStyle.StyleA, ConsoleColor.Yellow);


FluentConsole.Console
.AddLineBreak(3)
.WithFontColor(ConsoleColor.Green)
.WriteLine("Press any key to start printing test !").Print();

FluentConsole.Console.ReadKey();


FluentConsole.AttachLogger(fastLogger);
Expand Down
15 changes: 12 additions & 3 deletions Helpers/Style/StyleHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,25 @@ public static string GetSymbolicText(FontStyle fontStyle, string text)

foreach (char character in text)
{
if (char.IsWhiteSpace(character))
{
line1 += " ";
line2 += " ";

continue;
}


if (!char.IsLetterOrDigit(character)) continue;

try

{

string wholeSmbolicText = GetSymbolicAlphabet(fontStyle, char.ToUpper(character));
string wholeSymbolicText = GetSymbolicAlphabet(fontStyle, char.ToUpper(character));

string part1 = wholeSmbolicText.Split('²')[0] + ' ';
string part2 = wholeSmbolicText.Split('²')[1] + ' ';
string part1 = wholeSymbolicText.Split('²')[0] + ' ';
string part2 = wholeSymbolicText.Split('²')[1] + ' ';

line1 += part1;
line2 += part2;
Expand Down
2 changes: 1 addition & 1 deletion Helpers/Style/Styles/StyleA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void InitializeStyle()


// F
StyleHelper.AddAlphabet(FontStyle.StyleA, 'F', "█▀²█▀");
StyleHelper.AddAlphabet(FontStyle.StyleA, 'F', "█▀²█▀");


// G
Expand Down
8 changes: 8 additions & 0 deletions README-Nuget.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ greatest.WriteLineOnConsole();

```

- **Symbolic Print with Style** methods 👇

```csharp

FluentConsole.FastConsole.PrintSymbolicText("I AM A STYLISH TEXT", FontStyle.StyleA, ConsoleColor.DarkCyan);

```


## GitHub Repository
Please visit FluentConsole.Net Github repository for source code and more info : [**FluentConsole.Net On GitHub**](https://github.com/ShayanFiroozi/FluentConsole.Net)
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,15 @@ greatest.WriteLineOnConsole();
FluentConsole.FastConsole.PrintInfo("This is a Fast Info Text !");

```

- **Symbolic Print with Style** methods 👇


```csharp

FluentConsole.FastConsole.PrintSymbolicText("I AM A STYLISH TEXT", FontStyle.StyleA, ConsoleColor.DarkCyan);

```


<br/>

Expand Down

0 comments on commit 2a4d15a

Please sign in to comment.