Exemplo n.º 1
0
        private static void HandleInput(string[] args)
        {
            for (int i = 0; i < args.Length; i++)
            {
                switch (args[i])
                {
                case "-c":
                case "--config":
                    try
                    {
                        AppHelpers.GetConfigInput(args[i + 1]);
                    }
                    catch
                    { }
                    break;

                case "--input-splitter":
                    string?videoInputPath            = null;
                    string?videoOutputDirectoryInput = null;
                    try
                    {
                        videoInputPath            = args[i + 1];
                        videoOutputDirectoryInput = args[i + 2];
                    }
                    catch
                    { System.Console.WriteLine("--input-splitter {video-path} {output-dir}"); }
                    InputSplitter.Run(videoInputPath, videoOutputDirectoryInput);
                    break;

                case "--output-combiner":
                    string?oldVideo = null;
                    string?newVideo = null;
                    try
                    {
                        oldVideo = args[i + 1];
                        newVideo = args[i + 2];
                    }
                    catch
                    { System.Console.WriteLine("--output-combiner {old-video} {new-video}"); }
                    OutputCombiner.Run(oldVideo, newVideo);
                    break;

                default:
                    break;
                }
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            if (args.Length != 0)
            {
                HandleInput(args);
                return;
            }

            WelcomePrint();

            bool running = true;

            do
            {
                var input = GetMainMenuOptionChoice();
                switch (input)
                {
                case 1:
                    InputSplitter.Run();
                    break;

                case 2:
                    OutputCombiner.Run();
                    break;

                case 3:
                    JobModifier.Run();
                    break;

                case 4:
                    System.Console.WriteLine("Not implemented");
                    break;

                case 0:
                default:
                    ExitPrint();
                    running = false;
                    break;
                }
            } while (running);
        }