Exemplo n.º 1
0
        public static string AboutString()
        {
            var    copyright = OSUtilities.AssemblyCopyright();
            var    version   = OSUtilities.AssemblyVersion();
            string text      = "vJoyIOFeeder for Gamoover by B. Maurin (njz3)\n";

            text += copyright;
            text += "\nVersion " + version.ToString();
            text += "\nRunning mode is " + vJoyManager.Config.Hardware.TranslatingModes.ToString();
            return(text);
        }
Exemplo n.º 2
0
        public static bool ParseCommandLine(string[] commandLine, out Dictionary <string, object> outputArgs)
        {
            outputArgs = new Dictionary <string, object>();
            // Parse command line arguments and fill application settings
            for (int i = 0; i < commandLine.Length; i++)
            {
                switch (commandLine[i])
                {
                case "-c":
                case "--controlset":
                    if ((i + 1) < commandLine.Length)
                    {
                        outputArgs.Add("controlset", commandLine[i + 1]);
                        i++;
                    }
                    break;

                case "-l":
                case "--logfile":
                    if ((i + 1) < commandLine.Length)
                    {
                        outputArgs.Add("logfile", true);
                        i++;
                    }
                    break;

                case "-h":
                case "--help":
                case "/?":
                default:
                    // Display help message
                    Console.WriteLine(OSUtilities.AboutString());
                    Console.WriteLine("Usage:");
                    Console.WriteLine(" -c --controlset <uniquename>: name to a " +
                                      "unique configuration file");
                    Console.WriteLine(" -l --logfile: force log to DEBUG and output to file");
                    Console.WriteLine(" -h --help: display this message");

                    // Leave
                    return(false);
                }
            }
            return(true);
        }