private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { new Action(() => { _handDataSource.Stop(); _factory.Dispose(); }).BeginInvoke(null, null); }