private void Page_Loaded(object sender, RoutedEventArgs e) { LoadSitu.Loadsitu(CreateSituation.lst_situ, "Situationen.xml"); LstVw_Situation.ItemsSource = CreateSituation.lst_situ; LstVw_Situation.Items.Refresh(); recEngine.SetInputToDefaultAudioDevice(); }
private void Page_Loaded(object sender, RoutedEventArgs e) { FileInfo myFile = new FileInfo("Situationen.xml"); if (myFile.Exists) { LoadSitu.Loadsitu(lst_situ, "Situationen.xml"); } LstVw_Name.ItemsSource = lst_situ; }
private void Page_Loaded(object sender, RoutedEventArgs e) { LoadSitu.Loadsitu(CreateSituation.lst_situ, "Situationen.xml"); LstVw_Situation.ItemsSource = CreateSituation.lst_situ; LstVw_Situation.Items.Refresh(); Choices commands = new Choices(); commands.Add(new string[] { "say hello", "print my name" }); GrammarBuilder gBuilder = new GrammarBuilder(); gBuilder.Append(commands); Grammar grammar = new Grammar(gBuilder); recEngine.LoadGrammarAsync(grammar); recEngine.SetInputToDefaultAudioDevice(); recEngine.SpeechRecognized += RecEngine_SpeechRecognized; }