public void PrepareJobs(string inpath, string outpath, ConversionOptions co) { Tracing.StartMethodTrace(); Log("Searching for RIFs in {0}", inpath); this.m_jobs = GenerateJobs(inpath, "*.rif", outpath, co); Log("{0} RIF files to convert", this.m_jobs.Length); Tracing.EndMethodTrace(); }
public ConversionJob(string inf, string outf, int index, ConversionOptions o) { WindowsAutomation.IO.VerifyFileExists(inf); this.InputFile = inf; this.OutputFile = outf; this.SequenceNumber = index; this.Options = o; System.IO.FileInfo fi = new System.IO.FileInfo(this.InputFile); this.InputFilesize = fi.Length; }
public void PrepareJobs( string inpath, string outpath , ConversionOptions co) { Tracing.StartMethodTrace(); Log( "Searching for RIFs in {0}", inpath ); this.m_jobs = GenerateJobs( inpath , "*.rif", outpath , co); Log("{0} RIF files to convert", this.m_jobs.Length ); Tracing.EndMethodTrace(); }
public ConversionJob( string inf, string outf, int index, ConversionOptions o ) { WindowsAutomation.IO.VerifyFileExists( inf ); this.InputFile = inf; this.OutputFile =outf; this.SequenceNumber=index; this.Options = o; System.IO.FileInfo fi = new System.IO.FileInfo( this.InputFile ); this.InputFilesize = fi.Length; }
public static ConversionJob [] GenerateJobs(string inpath, string search_pattern, string outpath, ConversionOptions co) { System.Collections.ArrayList input_files = WindowsAutomation.IO.GetFilesRecursive(inpath, search_pattern, true); PainterAutomation.ConversionJob [] jobs = new PainterAutomation.ConversionJob [input_files.Count]; int index = 0; foreach (string input_file in input_files) { // Create the Job object PainterAutomation.ConversionJob job = new PainterAutomation.ConversionJob( input_file, CalculateOutputFilename(input_file, inpath, outpath, co), index, co); // Place it in the list jobs[index] = job; index++; } return(jobs); }
public static string CalculateOutputFilename(string infname, string inroot, string outroot, ConversionOptions co) { string basename = System.IO.Path.GetFileName(infname); string relpath = infname.Substring(inroot.Length + 1); string outfname = System.IO.Path.Combine(outroot, relpath); string ext = co.Format.FilenameExtension; outfname = System.IO.Path.ChangeExtension(outfname, ext); return(outfname); }
public static ConversionJob [] GenerateJobs( string inpath, string search_pattern, string outpath, ConversionOptions co) { System.Collections.ArrayList input_files = WindowsAutomation.IO.GetFilesRecursive( inpath, search_pattern , true ); PainterAutomation.ConversionJob [] jobs = new PainterAutomation.ConversionJob [input_files.Count ] ; int index=0; foreach (string input_file in input_files) { // Create the Job object PainterAutomation.ConversionJob job = new PainterAutomation.ConversionJob( input_file, CalculateOutputFilename( input_file, inpath , outpath, co), index, co ); // Place it in the list jobs[index]=job; index++; } return jobs; }
public static string CalculateOutputFilename( string infname , string inroot, string outroot, ConversionOptions co) { string basename = System.IO.Path.GetFileName(infname); string relpath = infname.Substring( inroot.Length+1 ); string outfname = System.IO.Path.Combine( outroot, relpath ); string ext=co.Format.FilenameExtension; outfname = System.IO.Path.ChangeExtension( outfname , ext); return outfname; }