From 6842192141a713aa72bbc076ada5a26e236899ad Mon Sep 17 00:00:00 2001 From: Mark Summerville Date: Sun, 29 Apr 2018 14:49:53 +0800 Subject: [PATCH] Updates for #378 --- TVRename#/App/CommandLineArgs.cs | 6 ++++-- TVRename#/App/Program.cs | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/TVRename#/App/CommandLineArgs.cs b/TVRename#/App/CommandLineArgs.cs index 13329d0d1..762790882 100644 --- a/TVRename#/App/CommandLineArgs.cs +++ b/TVRename#/App/CommandLineArgs.cs @@ -20,6 +20,7 @@ public enum MissingFolderBehavior Create } + public bool Help { get; } public bool Hide { get; } public MissingFolderBehavior MissingFolder { get; set; } // TODO: Make read only public bool RenameCheck { get; } @@ -38,6 +39,7 @@ public enum MissingFolderBehavior /// The command line arguments. public CommandLineArgs(ReadOnlyCollection args) { + this.Help = args.Contains("/?", StringComparer.OrdinalIgnoreCase); this.Hide = args.Contains("/hide", StringComparer.OrdinalIgnoreCase); this.RenameCheck = !args.Contains("/norenamecheck", StringComparer.OrdinalIgnoreCase); this.Quit = args.Contains("/quit", StringComparer.OrdinalIgnoreCase); @@ -76,11 +78,11 @@ public static string Helptext() output.AppendLine("/hide will hide the UI"); output.AppendLine("/unattended same as /hide"); output.AppendLine(""); - output.AppendLine("/recover will Recover will load a dialog box that enables the user to recover a prior TVDB.xml or TVRenameSettings.xml file"); + output.AppendLine("/recover will load a dialog box that enables the user to recover a prior TVDB.xml or TVRenameSettings.xml file"); output.AppendLine("/userfilepath:BLAH Sets a custom folder path for the settings files."); output.AppendLine("/createmissing will Create folders if they are missing."); output.AppendLine("/ignoremissing will Ignore missing folders."); - output.AppendLine("/norenamecheck will Allows a request to an existing TV Rename session to scan without renaming."); + output.AppendLine("/norenamecheck requests an existing TV Rename session to scan without renaming."); output.AppendLine(""); output.AppendLine("Further information is available at http://www.tvrename.com/cmd-line"); diff --git a/TVRename#/App/Program.cs b/TVRename#/App/Program.cs index 81324e58d..de56c20c5 100644 --- a/TVRename#/App/Program.cs +++ b/TVRename#/App/Program.cs @@ -32,8 +32,9 @@ private static void Main(string[] args) if (args.Contains("/?", StringComparer.OrdinalIgnoreCase)) { Logger.Info(CommandLineArgs.Helptext()); - Console.WriteLine(CommandLineArgs.Helptext()); - } + Console.Out.WriteLine(CommandLineArgs.Helptext()); + return; + } // Check if an application instance is already running Mutex mutex = new Mutex(true, "TVRename", out bool newInstance);