// General actions public async Task DescribeExecute() { await RunTaskAsync(async() => { await VoiceInterface.StopListening(); await VoiceInterface.SayDescriptionOfSomeone(CurrentPerson); await VoiceInterface.ListeningWhatToDo(); }); }
public async Task CallSomeoneExecute() { await RunTaskAsync(async() => { await VoiceInterface.StopListening(); await VoiceInterface.SayNotAvailableService(); await VoiceInterface.ListeningWhatToDo(); }); }
public async Task GoToReservationPageExecute() { await RunTaskAsync(async() => { await VoiceInterface.StopListening(); await VoiceInterface.SayNotAvailableService(); await VoiceInterface.ListeningWhatToDo(); }); }
protected override async Task OnLoadedAsync() { await VoiceInterface.ListeningWhatToDo(); Messenger.Default.Register <SpeechResultGeneratedMessage>(this, async e => { await DispatcherHelper.RunAsync(async() => { switch (e.Result.Constraint.Tag) { case "constraint_events": await GoToEventPageExecute(); break; case "constraint_description": await DescribeExecute(); break; case "constraint_abord_words": await GoBackToMainPageExecute(); break; case "constraint_sandwich": await GoToSandwichPageExecute(); break; case "constraint_calling": await CallSomeoneExecute(); break; case "constraint_reservation": await GoToReservationPageExecute(); break; } }); }); }