private void OnEventError() { if (toupcam_ != null) { toupcam_.Close(); toupcam_ = null; } MessageBox.Show("Error"); }
public bool CloseCamera() { try { stopLiveMode(); myCamera.Close(); return(true); } catch (Exception ex) { return(false); } }