Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
		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();
		}
Exemplo n.º 4
0
		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;

		}
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
		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;
		}
Exemplo n.º 8
0
		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;
		}