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