private void closeCameraViewEvent(object source, FormClosingEventArgs eventArgs) { CameraView src = (CameraView)source; stopRecordingCameraView(src); src.m_Camera.stopCameraCapture(); }
private void startRecordingCameraView(CameraView cv) { try { cv.m_Camera.startVideoOutput(this.m_OutputPath + cv.m_Camera.m_CameraName + ".avi", m_VideoOutputWidth, m_VideoOutputHeight); } catch (Exception e) { MessageBox.Show("Could not start recording. Please ensure a cameria is opened."); } }
private void stopRecordingCameraView(CameraView cv) { try { cv.m_Camera.stopVideoOutput(); } catch (Exception e) { MessageBox.Show("Unable to stop recording. Please ensure recording has started."); } }
private void deleteCameraToolStripMenuItem_Click(object sender, EventArgs e) { CameraView activeChild = (CameraView)this.ActiveMdiChild; try { activeChild.Close(); updateMDIWindowList(); } catch (Exception ex) { MessageBox.Show("Could not close the camera. Please ensure a camera is open."); } }
private void createCameraViewerForm(Shinigami_Security_Viewer.SSV.SSV_Camera cameraObject) { CameraView childForm = new CameraView(cameraObject); childForm.MdiParent = this; childForm.FormClosing += new FormClosingEventHandler(closeCameraViewEvent); childForm.Show(); if (m_AutoRecord) { startRecordingCameraView(childForm); } }