Exemple #1
0
 // General actions
 public async Task DescribeExecute()
 {
     await RunTaskAsync(async() =>
     {
         await VoiceInterface.StopListening();
         await VoiceInterface.SayDescriptionOfSomeone(CurrentPerson);
         await VoiceInterface.ListeningWhatToDo();
     });
 }
Exemple #2
0
 public async Task CallSomeoneExecute()
 {
     await RunTaskAsync(async() =>
     {
         await VoiceInterface.StopListening();
         await VoiceInterface.SayNotAvailableService();
         await VoiceInterface.ListeningWhatToDo();
     });
 }
Exemple #3
0
 public async Task GoToReservationPageExecute()
 {
     await RunTaskAsync(async() =>
     {
         await VoiceInterface.StopListening();
         await VoiceInterface.SayNotAvailableService();
         await VoiceInterface.ListeningWhatToDo();
     });
 }
Exemple #4
0
        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;
                    }
                });
            });
        }