private void Close() { try { imageProvider.Close(); } catch (Exception e) { LogError(e, imageProvider.GetLastErrorMessage()); } }
/* Closes the image provider and handles exceptions. */ private void CloseTheImageProvider() { /* Close the image provider. */ try { m_imageProvider.Close(); } catch (Exception e) { ShowException(e, m_imageProvider.GetLastErrorMessage()); } }
public void Close() { Stop(); try { imageProvider.Close(); } catch (Exception e) { LogError(e, imageProvider.GetLastErrorMessage()); } }
/// <summary> /// Closes the image provider safely. /// </summary> public void Close() { try { ImageProvider.Close(); HasStarted = false; } catch (Exception ex) { log.Fatal("ERROR while closing device with Index " + Index); log.Fatal("Device Info: " + FullName); log.Fatal("Exception: " + ex.ToString()); OnErrorReceived?.Invoke(this, ex); } }
public override void Connect() { //Stop,and Close m_imageProvider.Stop(); m_imageProvider.Close(); setStatus(GrabInstruction.Connect, GrabStage.Closed, GrabState.Idle); Status.IsConnection = false; List <DeviceEnumerator.Device> list = DeviceEnumerator.EnumerateDevices(); var device = list.FirstOrDefault(); if (device != null) { m_imageProvider.Open(device.Index); setStatus(GrabInstruction.Connect, GrabStage.Connected, GrabState.Idle); Status.IsConnection = true; } }
public void CloseCamera() { m_imageProvider.Stop(); m_imageProvider.Close(); }
//释放句柄元素 private void CloseTheImageProvider() { /* Close the image provider. */ m_imageProvider.Close(); }