private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { _imageProducer.Cleanup(); _buttonListener.Cleanup(); _consumer.Interrupt(); _printManager.Cleanup(); }
private void Tester_Closing(object sender, System.ComponentModel.CancelEventArgs e) { _consumer.Interrupt(); _imageProducer.Cleanup(); _consumer.Join(); _consumer = null; }