Exemplo n.º 1
0
 public void Execute(string[] args)
 {
     if (args.Length == 0)
     {
         DateChanger.ShowHelp();
         return;
     }
     Change(args[0]);
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                Console.WriteLine("Usage: CAMTOOLS HELP [DATEFROMEXIF]");
                return;
            }
            var tool     = args[0].ToLowerInvariant();
            var showHelp = false;

            if (tool == "help")
            {
                args = args.Skip(1).ToArray();
                if (args.Length == 0)
                {
                    Console.WriteLine("Usage: CAMTOOLS HELP [DATEFROMEXIF]");
                    return;
                }
                showHelp = true;
            }

            switch (args[0].ToLowerInvariant())
            {
            case "datefromexif":
                if (showHelp)
                {
                    DateChanger.ShowHelp(); return;
                }
                new DateChanger().Execute(args.Skip(1).ToArray());
                return;

            default:
                Console.WriteLine($"Unknown tool '{args[0]}'");
                return;
            }
        }