Ejemplo n.º 1
0
        public async Task ProcessConversation()
        {
            await SpeechHelper.QuestionSource();

            var source = await SpeechHelper.GetUserResponseAsync();

            await SpeechHelper.QuestionTarget();

            var target = await SpeechHelper.GetUserResponseAsync();

            await SpeechHelper.QuestionWeight();

            var weight = await SpeechHelper.GetUserResponseAsync();

            await SpeechHelper.QuestionType();

            var type = await SpeechHelper.GetUserResponseAsync();

            await SpeechHelper.QuestionSource();

            var isLoadHour = await SpeechHelper.GetIntentByResponseAsync() == SpeechHelper.Intent.AfirmativeAnswer;

            _route = new Route
            {
                Source   = source,
                Target   = target,
                Weight   = weight,
                Type     = type,
                LoadHour = isLoadHour
            };


            var navigationParams = new NavigationParameters
            {
                { "Route", _route }
            };

            await _navigationService.NavigateAsync("PlanningDetailPage", navigationParams);
        }