public void StartCamera() { var data = new CameraURLBuilderData { DeviceTypeFilter = DiscoverDeviceType.USB }; var myCameraBuilder = new CameraURLBuilderWF(data); var result = myCameraBuilder.ShowDialog(); if (result != System.Windows.Forms.DialogResult.OK) { return; } camera = new OzekiCamera(myCameraBuilder.CameraURL); camera.Start(); }
private void btn_btn_Compose_Click(object sender, EventArgs e) { var data = new CameraURLBuilderData { DeviceTypeFilter = DiscoverDeviceType.USB }; _myCameraUrlBuilder = new CameraURLBuilderWF(data); var result = _myCameraUrlBuilder.ShowDialog(); if (result != DialogResult.OK) { return; } textBox1.Text = _myCameraUrlBuilder.CameraURL; btn_Connect.Enabled = true; }
public bool StartCamera() { if (Instance.IsLocalCameraUsed == false) { var data = new CameraURLBuilderData { DeviceTypeFilter = DiscoverDeviceType.USB }; var myCameraBuilder = new CameraURLBuilderWF(data); var result = myCameraBuilder.ShowDialog(); if (result != System.Windows.Forms.DialogResult.OK) { return(false); } camera = new OzekiCamera(myCameraBuilder.CameraURL); camera.Start(); } return(true); }
public MotionForm() { //this.FormClosing += MotionForm_Closing; InitializeComponent(); Log.OnLogMessageReceived += Log_OnLogMessageReceived; cci1 = new CameraConfigurationItem("1", videoViewerWF1); cci1.CameraStateChanged += OnCameraStateChanged; cci1.VideoCapturingStateChanged += OnVideoCapturingStateChanged; cci1.VideoViewerVisible = viewCameraCb1.Checked; cci2 = new CameraConfigurationItem("2", videoViewerWF2); cci2.CameraStateChanged += OnCameraStateChanged; cci2.VideoCapturingStateChanged += OnVideoCapturingStateChanged; cci2.VideoViewerVisible = viewCameraCb2.Checked; var data = new CameraURLBuilderData { IPCameraEnabled = false }; cameraUrlBuilder = new CameraURLBuilderWF(data); }
private void Compose() { var data = new CameraURLBuilderData { DeviceTypeFilter = DiscoverDeviceType.USB }; _myCameraUrlBuilder = new CameraURLBuilderWPF(data); var result = _myCameraUrlBuilder.ShowDialog(); if (result != true) { return; } CameraUrl = _myCameraUrlBuilder.CameraURL; OnPropertyChanged("CameraUrl"); InvokeGuiThread(() => { ConnectButton.IsEnabled = true; }); }