private void StopVideoCapture()
        {
            StartToolStripMenuItem.Enabled = true;
            StopToolStripMenuItem.Enabled  = false;

            VideoCaptureCancellationTokenSource?.Cancel();
            VideoCapture.Stop();
        }
コード例 #2
0
        private void StopCaptureButton_Click(object sender, EventArgs e)
        {
            StopCaptureButton.Enabled      = false;
            AddImageButton.Enabled         = false;
            StartCaptureButton.Enabled     = true;
            UserImagesDataGridView.Enabled = true;

            VideoCapture.Stop();

            VideoCaptureCancellationTokenSource?.Cancel();
        }