Exemplo n.º 1
0
 public void m_ConverterJobCallback(int code, XaraAutomation.ConversionJob job)
 {
     // NOTE: This function will be called from the worker thread not the UI thread
     if (job != null)
     {
         string jobnum  = string.Format("{0} of {1}", job.SequenceNumber + 1, this.m_total_jobs);
         string infile  = System.IO.Path.GetFileName(job.InputFile);
         string outfile = System.IO.Path.GetFileName(job.OutputFile);
         this.SetStatusFromThread("Running", jobnum, infile, outfile);
     }
     else
     {
         this.SetStatusFromThread("N/A", "N/A", "N/A", "N/A");
     }
 }
Exemplo n.º 2
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);

            XaraAutomation.ConversionJob [] jobs = new XaraAutomation.ConversionJob [input_files.Count];

            int index = 0;

            foreach (string input_file in input_files)
            {
                // Create the Job object
                XaraAutomation.ConversionJob job = new XaraAutomation.ConversionJob(
                    input_file,
                    CalculateOutputFilename(input_file, inpath, outpath, co),
                    index,
                    co);

                // Place it in the list
                jobs[index] = job;

                index++;
            }
            return(jobs);
        }