Beispiel #1
0
        public void ParseCmdLine(string[] args)
        {
            m_config = new BulkerConfig();

            CmdLineConfig cfg = new CmdLineConfig(new CmdLineSwitch[]
            {
                new CmdLineSwitch("R", false, false, "Record file", "Record file", null),
                new CmdLineSwitch("L", false, false, "Log file", "Log file", null),
                new CmdLineSwitch("C", false, false, "Cover source full path to root", "Cover source full path to root", null),
                new CmdLineSwitch("B", true, false, "Bulk update books", "Bulk update books", null),
                new CmdLineSwitch("Bs", true, false, "Update book summary (force)", "Summary", null),
                new CmdLineSwitch("D", true, false, "Bulk update dvds", "Bulk update dvds", null),
                new CmdLineSwitch("Ds", true, false, "Update dvd summary (force)", "Summary", null),
                new CmdLineSwitch("PW", true, false, "Show password", "show password for debugging purposes", null),
            });

            CmdLine cmdLine = new CmdLine(cfg);

            string sError;

            if (!cmdLine.FParse(args, m_config, null, out sError))
            {
                cmdLine.Usage(ConsoleWriteDelegate);
            }
        }