Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            if (ApiKeysIncorrect())
            {
                MessageBox.Show(
                    "You seem to be missing an API-key. Check your API-key settings in App.config...",
                    "API-keys",
                    MessageBoxButton.OK,
                    MessageBoxImage.Error);
                Application.Current.Shutdown();
            }

            SetupWebcamImageDirectory();

            SpeechRecognitionViewModel = new SpeechRecognitionViewModel();

            _webCamera = new WebCam();
            _webCamera.InitializeWebCam(ref WebCameraImage);

            DataContext = this;
        }
Ejemplo n.º 2
0
 private void MainWindow_OnClosing(object sender, CancelEventArgs e)
 {
     SpeechRecognitionViewModel.Dispose();
 }