Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow the GUI to handle command-line args like the console application #41

Merged
merged 3 commits into from
Oct 20, 2020

Conversation

mwanchap
Copy link
Contributor

@mwanchap mwanchap commented Oct 11, 2020

  • All arguments supported by the console application are now supported by the GUI. For example, to check some of the shorter System namespace directories in your GAC:
    PathLengthCheckerGUI.exe RootDirectory=C:\Windows\Microsoft.NET\ RootDirectoryReplacement=D:\ SearchOption=All TypesToInclude=OnlyDirectories SearchPattern=System.* MinLength=30 MaxLength=40 Output=All
  • The GUI will also display the same argument usage text as the console application if incorrect arguments are provided.
  • Still supports the root directory argument alone (e.g. via dropping a folder onto PathLengthCheckerGUI.exe as in PR feat: Enable providing root directory to GUI app via command-line or drag-and-drop #40) or via the newly-supported RootDirectory parameter. Using either results in the search running using defaults for everything else. For example:
    • Directory alone: PathLengthCheckerGUI.exe C:\path\to\root
    • RootDirectory parameter: PathLengthCheckerGUI.exe RootDirectory=C:\path\to\root
  • Moved argument parsing and usage info text into ArgumentParser.cs to allow both to be used from either the console application or the GUI.
  • Changed OutputType to a property of PathLengthSearchOptions (rather than just being a string in Program.cs) so the GUI can use it too.

Matt Wanchap added 3 commits October 10, 2020 20:18
…mentParser, and added a method to set the UI control statue based on the arguments provided
@mwanchap
Copy link
Contributor Author

Oh, I forgot to update the readme. I'll do that in my next PR ;)

@deadlydog
Copy link
Owner

Thanks for the PR. I'll try and review it in the next couple days 👍

@deadlydog
Copy link
Owner

Sorry, it's been a busy week and I was sick over the weekend, but this is still on my radar.

@deadlydog
Copy link
Owner

Looks good 👍Thanks for the PR :)

@deadlydog deadlydog merged commit 0e1905a into deadlydog:master Oct 20, 2020
@deadlydog
Copy link
Owner

Oh, I forgot to update the readme. I'll do that in my next PR ;)

Hey @mwanchap just curious if you still planned to do this or not. If not, I don't mind doing it, but if you need another PR for hacktoberfest I'll leave it for you :)

@mwanchap
Copy link
Contributor Author

mwanchap commented Oct 25, 2020

Yep, just about to! Thanks for your patience, my wife and I just got back from our first real holiday since 2020 became deep-fried nonsense, and I'm still catching up on notifications and such...
Edit: Bah! I forgot that GitHub doesn't automagically squash commits in PRs like Azure Devops can. Apologies for cluttering up your master branch, I should have rebased this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants