예제 #1
0
        // 配置摄像头
        private void EditCamera()
        {
            cameraToEdit = multiplexer.LastClicked.Camera;
            if (cameraToEdit == null)
            {
                MessageBox.Show("你当前没有选中摄像头!");
                return;
            }

            摄像头配置窗体 form = new 摄像头配置窗体();

            //设置提供商
            form.VideoProviders      = config.providers;
            form.CheckCameraFunction = new CheckCameraHandler(CheckCamera);
            //设置摄像头
            form.Camera = cameraToEdit = multiplexer.LastClicked.Camera;

            //注册apply事件
            form.Apply += new EventHandler(editCamera_Apply);
            if (form.ShowDialog() == DialogResult.OK)
            {
                runningPool.Remove(cameraToEdit);        //先把摄像头移除,以防前后两个同时存在。
                finalizationPool.Remove(cameraToEdit);
                cameraToEdit = form.Camera;
                OpenCamera();
            }
        }
예제 #2
0
        // 配置摄像头
        private void EditCamera()
        {
            cameraToEdit = multiplexer.LastClicked.Camera;
            if (cameraToEdit == null)
            {
                MessageBox.Show("你当前没有选中摄像头!");
                return;
            }

            摄像头配置窗体 form = new 摄像头配置窗体();
            //设置提供商
            form.VideoProviders = config.providers;
            form.CheckCameraFunction = new CheckCameraHandler(CheckCamera);
            //设置摄像头
            form.Camera = cameraToEdit = multiplexer.LastClicked.Camera;

            //注册apply事件
            form.Apply += new EventHandler(editCamera_Apply);   
            if (form.ShowDialog() == DialogResult.OK)
            {
                runningPool.Remove(cameraToEdit);        //先把摄像头移除,以防前后两个同时存在。
                finalizationPool.Remove(cameraToEdit);
                cameraToEdit = form.Camera;
                OpenCamera();
            }
        }