public MainBackgroundWorker(string templatesPath) { this.templatesPath = templatesPath; WorkerReportsProgress = true; // // Create the background workers. // this.validatorBackgroundWorker = new ValidatorBackgroundWorker(); this.validatorBackgroundWorker.WorkerReportsProgress = true; this.xsltProcessor = new XsltProcessor(); // // Assign methods to handle these events. // DoWork += HandleDoWork; this.validatorBackgroundWorker.ProgressChanged += ValidatorBackgroundWorkerHandleProgressChanged; this.validatorBackgroundWorker.RunWorkerCompleted += ValidatorBackgroundWorkerHandleRunWorkerCompleted; this.xsltProcessor.ProgressChanged += XsltProcessorHandleProgressChanged; this.xsltProcessor.ProcessingCompleted += XsltProcessorHandleRunWorkerCompleted; }
public MainBackgroundWorker(string templatesPath) { this.templatesPath = templatesPath; WorkerReportsProgress = true; // // Create the background workers. // this.validatorBackgroundWorker = new ValidatorBackgroundWorker(); this.validatorBackgroundWorker.WorkerReportsProgress = true; this.xsltProcessor = new XsltProcessor(); // // Assign methods to handle these events. // DoWork += HandleDoWork; this.validatorBackgroundWorker.ProgressChanged += ValidatorBackgroundWorkerHandleProgressChanged; this.validatorBackgroundWorker.RunWorkerCompleted += ValidatorBackgroundWorkerHandleRunWorkerCompleted; this.xsltProcessor.ProgressChanged += XsltProcessorHandleProgressChanged; this.xsltProcessor.ProcessingCompleted += XsltProcessorHandleRunWorkerCompleted; }