// 相机丢失回调 private void OnConnectLoss(object sender, EventArgs e) { m_dev.ShutdownGrab(); m_dev.Dispose(); m_dev = null; this.Invoke(new Action(() => { btnOpen.Enabled = true; btnClose.Enabled = false; btnSoftwareTrigger.Enabled = false; })); }
/// <summary> /// 相机丢失回调 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void OnConnectLoss(object sender, EventArgs e) { m_dev.ShutdownGrab(); m_dev.Dispose(); m_dev = null; if (event_OnConnectLoss != null) { event_OnConnectLoss(); } }