void ReleaseDesignerOutlets() { if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } if (BtnFlash != null) { BtnFlash.Dispose(); BtnFlash = null; } if (BtnCapture != null) { BtnCapture.Dispose(); BtnCapture = null; } if (BtnFilter != null) { BtnFilter.Dispose(); BtnFilter = null; } if (CameraController != null) { CameraController.Dispose(); CameraController = null; } }
//接続されている全てのビデオデバイス情報を格納する変数 // private FilterInfoCollection videoDevices; //使用するビデオデバイス // private VideoCaptureDevice videoDevice; // ビデオデバイスの機能を格納する配列 // private VideoCapabilities[] videoCapabilities; //ウィンドウが生成された時 private void FrmFootSwitchApp_Load(object sender, EventArgs e) { this.getCameraInfo(); //videoSource = new VideoCaptureDevice(videoDevices[cmbCamera.SelectedIndex].MonikerString); //videoSource.NewFrame += new NewFrameEventHandler(videoRendering); //this.CloseVideoSource(); //videoSource.Start(); //FilterInfoCollection videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); //m_VideoSource = new VideoCaptureDevice(videoDevices[0].MonikerString); //m_VideoSource.NewFrame += new NewFrameEventHandler(VideoDevice_NewFrame); //m_VideoSource.Start(); BtnCapture.Focus(); }