Beispiel #1
0
        static int Main(string[] args)
        {
            // Verify if enough arguments have been given...
              if (args.Length != 4)
              {
            ShowUsage();
            return 1;
              }

              // Parse arguments
              string src = args[0];
              string dst = args[1];
              TimeSpan start = ParseTime(args[2]);
              TimeSpan end = ParseTime(args[3]);

              // If source file doesn't exist, exit with an error
              if (!File.Exists(src))
              {
            Console.WriteLine(src + " doesn't exist");
            return 1;
              }

              // If destination file exist, delete it
              if (File.Exists(dst))
            File.Delete(dst);

              // Cut the file
              SBECutter cutter = new SBECutter();
              cutter.DoCut(src, dst, start, end);
              cutter.Dispose();

              return 0;
        }
Beispiel #2
0
        static int Main(string[] args)
        {
            // Verify if enough arguments have been given...
            if (args.Length != 4)
            {
                ShowUsage();
                return(1);
            }

            // Parse arguments
            string   src   = args[0];
            string   dst   = args[1];
            TimeSpan start = ParseTime(args[2]);
            TimeSpan end   = ParseTime(args[3]);

            // If source file doesn't exist, exit with an error
            if (!File.Exists(src))
            {
                Console.WriteLine(src + " doesn't exist");
                return(1);
            }

            // If destination file exist, delete it
            if (File.Exists(dst))
            {
                File.Delete(dst);
            }

            // Cut the file
            SBECutter cutter = new SBECutter();

            cutter.DoCut(src, dst, start, end);
            cutter.Dispose();

            return(0);
        }