public formMain() { InitializeComponent(); worker = new ThreadWorker(); worker.pictureProcessed += new ThreadWorker.pictureProcessedEventHandler(worker_pictureProcessed); worker.pictureProcessingComplete += new ThreadWorker.pictureProcessingCompleteEventHandler(worker_pictureProcessingComplete); }
void worker_pictureProcessed(object sender, ThreadWorker.PictureProcessedEventArgs e) { imgCanvas.Image.Dispose(); imgCanvas.Image = e.processedImage; }