diff --git a/PROMS/Volian.Base.Library/VlnSettings.cs b/PROMS/Volian.Base.Library/VlnSettings.cs index c5eb0eed..0ed7c558 100644 --- a/PROMS/Volian.Base.Library/VlnSettings.cs +++ b/PROMS/Volian.Base.Library/VlnSettings.cs @@ -79,9 +79,22 @@ namespace Volian.Base.Library } set { _ComparePROMStoPROMSPDF = value; } } + public static string GetCommand(string commandName, string def) + { + string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray()); + foreach (string parameter in parameters) + { + if (parameter.ToUpper().StartsWith("/" + commandName.ToUpper() + "=")) + { + return parameter.Substring(commandName.Length + 2); + } + } + return def; + } private static void LoadOperatingMode() { string opMode = ConfigurationManager.AppSettings["OperatingMode"]; + opMode = GetCommand("MODE",opMode); if (opMode != null && opMode != "") { _DebugMode = opMode.ToUpper() == "DEBUG";