Exemple #1
0
        public static void Main(string[] args)
        {
            ILogger        logger  = new Logger();
            GeneralOptions options = OptionsFactory.GetToolOptions(args, logger);

            if (!string.IsNullOrEmpty(options.ParsingError))
            {
                Console.Write("tbstools: ");
                Console.WriteLine(options.ParsingError);
                Console.WriteLine("Try 'tbs --help' for more information.");
                return;
            }

            if (options.ShowHelp)
            {
                ShowHelp(options.HelpText);
            }
            else
            if (options.Process == null)
            {
                Console.Write("tbs: ");
                Console.WriteLine("No tool selected.");
                Console.WriteLine("Try 'tbs --help' for more information.");
            }
            else
            {
                options.Process.Start();
            }

            Console.ResetColor();
            Console.WriteLine("");
            Console.WriteLine("Press enter to close.");
            Console.ReadLine();
        }