private void StopVideoCapture() { StartToolStripMenuItem.Enabled = true; StopToolStripMenuItem.Enabled = false; VideoCaptureCancellationTokenSource?.Cancel(); VideoCapture.Stop(); }
private void StopCaptureButton_Click(object sender, EventArgs e) { StopCaptureButton.Enabled = false; AddImageButton.Enabled = false; StartCaptureButton.Enabled = true; UserImagesDataGridView.Enabled = true; VideoCapture.Stop(); VideoCaptureCancellationTokenSource?.Cancel(); }