示例#1
0
        private void Window_Loaded_Settings()
        {
            InputSelection impdevform = new InputSelection();

            impdevform.Owner = this;
            if ((bool)impdevform.ShowDialog())
            {
                captureDevice           = impdevform.CaptureDevice;
                captureDevice.NewFrame += new NewFrameEventHandler(captureDevice_NewFrame);
                buttonVideoProperties.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
            }
            else
            {
                if (Microsoft.Windows.Controls.MessageBox.Show("No video devices connected.\nTry again?", "No devices", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    Window_Loaded_Settings();
                    return;
                }
                else
                {
                    Application.Current.Shutdown();
                }
            }
        }
示例#2
0
        private void Window_Loaded_Settings()
        {
            InputSelection impdev = new InputSelection();

                captureDevice = impdev.CaptureDevice;
                captureDevice.NewFrame += new NewFrameEventHandler(captureDevice_NewFrame);
                captureDevice.Start();
        }