private void disableScanPanel()
 {
     if (cameraEnabled)
     {
         WebcamInput.DisableWebcam();
         Current.scanPictureBox.Image = null;
         cameraEnabled              = false;
         activateScanButton.Text    = enabledButtonText;
         useWebcamPragueBox.Enabled = true;
         cameraUrlBox.Enabled       = !useWebcamPragueBox.Checked;
     }
 }
 /// <summary>
 /// Dispose the input of the webcam when form is closed
 /// Author: Deividas Brazenas
 /// </summary>
 private void FormFaceDetection_FormClosing(object sender, FormClosedEventArgs e)
 {
     try
     {
         WebcamInput.DisableWebcam();
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception);
         throw;
     }
 }