Skip to content

Commit

Permalink
- Splash added
Browse files Browse the repository at this point in the history
  • Loading branch information
sLill committed Dec 26, 2024
1 parent b26d480 commit d6d730e
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 15 deletions.
17 changes: 11 additions & 6 deletions WindowsGrep/WindowsGrep.Core/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions WindowsGrep/WindowsGrep.Core/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ReadMe" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\ReadMe.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
<data name="Help" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Help.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
</data>
<data name="Splash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Splash.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
</data>
</root>
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

================= Windows Grep =================

-h --help : Show all commands
-r --recursive : Recursive search
-d --directory= : Target directory (surround with ' or ")
Expand Down
10 changes: 10 additions & 0 deletions WindowsGrep/WindowsGrep.Core/Properties/Resources/Splash.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
██╗ ██╗██╗███╗ ██╗██████╗ ██████╗ ██╗ ██╗███████╗ ██████╗ ██████╗ ███████╗██████╗
██║ ██║██║████╗ ██║██╔══██╗██╔═══██╗██║ ██║██╔════╝ ██╔════╝ ██╔══██╗██╔════╝██╔══██╗
██║ █╗ ██║██║██╔██╗ ██║██║ ██║██║ ██║██║ █╗ ██║███████╗ ██║ ███╗██████╔╝█████╗ ██████╔╝
██║███╗██║██║██║╚██╗██║██║ ██║██║ ██║██║███╗██║╚════██║ ██║ ██║██╔══██╗██╔══╝ ██╔═══╝
╚███╔███╔╝██║██║ ╚████║██████╔╝╚██████╔╝╚███╔███╔╝███████║ ╚██████╔╝██║ ██║███████╗██║
╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝

Help (-h)
Author: Sam Lill 2024
Source: https://github.com/sLill/Windows-Grep
10 changes: 8 additions & 2 deletions WindowsGrep/WindowsGrep.Core/Utils/ConsoleUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,15 @@ public static (NativeCommandType? CommandType, string CommandParameter) ParseNat
return default;
}

public static void PublishReadMe()
public static void PublishSplash()
{
string readMe = Properties.Resources.ReadMe;
string splash = Properties.Resources.Splash;
Console.WriteLine(splash);
}

public static void PublishHelp()
{
string readMe = Properties.Resources.Help;
Console.WriteLine(readMe + Environment.NewLine);
}

Expand Down
2 changes: 1 addition & 1 deletion WindowsGrep/WindowsGrep.Engine/GrepEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static async Task BeginProcessGrepCommandAsync(GrepCommand grepCommand, C
switch (grepCommand.CommandType)
{
case GrepCommandType.Help:
ConsoleUtils.PublishReadMe();
ConsoleUtils.PublishHelp();
break;

case GrepCommandType.Query:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace WindowsGrep.Test;

public class ContextTests : TestBase
public class RecursiveTests : TestBase
{
#region Fields..
private string _flagDescriptorShort;
Expand Down
2 changes: 1 addition & 1 deletion WindowsGrep/WindowsGrep/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private static void Initialize(string[] args)

// Publish ReadMe
if (args.Length == 0)
ConsoleUtils.PublishReadMe();
ConsoleUtils.PublishSplash();

// Override the default behavior for the Ctrl+C shortcut if the application was not ran from the command line
if (Environment.UserInteractive)
Expand Down

0 comments on commit d6d730e

Please sign in to comment.