当前位置: 首页>>代码示例>>C#>>正文


C# ApiResponse.GetTypedResponse方法代码示例

本文整理汇总了C#中ApiResponse.GetTypedResponse方法的典型用法代码示例。如果您正苦于以下问题:C# ApiResponse.GetTypedResponse方法的具体用法?C# ApiResponse.GetTypedResponse怎么用?C# ApiResponse.GetTypedResponse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ApiResponse的用法示例。


在下文中一共展示了ApiResponse.GetTypedResponse方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CallCompleted

        public void CallCompleted(ApiResponse result)
        {
            RadioGroup radioGrupo = new RadioGroup();
            List<GetSurveyQuestionsResponse> response = result.GetTypedResponse<List<GetSurveyQuestionsResponse>>();

            foreach (GetSurveyQuestionsResponse item in response)
            {

                radioGrupo = new RadioGroup();
                radioGrupo.Text(item.des);
                radioGrupo.IdPregunta = item.qid;
                foreach (var itemAnswers in item.answers)
                {
                    RadioButton radio = new RadioButton();
                    radio.Style = App.Current.Resources["RadioBridgstone"] as Style; ;
                    radio.Content = itemAnswers.des;
                    radio.Name = itemAnswers.aid.ToString();
                    radio.Margin = new Thickness(10, 0, 0, 0);
                    radio.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x47, 0x44, 0x44));
                    radio.BorderBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0x8C, 0x8A, 0x8B));
                    radioGrupo.addChildren(radio);
                }
                stackBody.Children.Add(radioGrupo);
            }
        }
开发者ID:amasolini,项目名称:brid-wp,代码行数:25,代码来源:Encuesta.xaml.cs

示例2: CallCompleted

        public void CallCompleted(ApiResponse result)
        {
            int dia = 0;
            DateTime comienzoEvento;
            Accordion accActual = new Accordion();
            RowAccordion fila;
            List<GetScheduleResponse> response = result.GetTypedResponse<List<GetScheduleResponse>>();

            comienzoEvento = SettingsManager.EventSingleton.start;

            foreach (GetScheduleResponse item in response)
            {
                if (item.day != dia)
                {
                    accActual = new Accordion();

                    accActual.Titulo = comienzoEvento.AddDays(dia).ToString("dd MMMM yyyy", new CultureInfo("es-ES"));
                    accActual.Descripcion = item.place;

                    stackBody.Children.Add(accActual);

                    fila = accActual.AddRow();
                    fila.Hora = item.start;
                    fila.Titulo = item.title;
                    fila.Descripcion = item.place;
                }
                else
                {

                    fila = accActual.AddRow();
                    fila.Hora = item.start;
                    fila.Titulo = item.title;
                    fila.Descripcion = item.place;
                }
                dia = item.day;
            }

            //if (!string.IsNullOrEmpty(response.name))
            //{
            // TODO: Save the information in the localstorage.

            //SettingsManager.LoggedUserSingleton = response;
            //SettingsManager.SaveSetting(SettingsManager.SettingsConstants.LOGGED_USER.ToString(), JsonConvert.SerializeObject(response));

            //Frame.Navigate(typeof(Home));

            //}
            //else
            //{
            //    // TODO: Display an error.
            //}
        }
开发者ID:amasolini,项目名称:brid-wp,代码行数:52,代码来源:Agenda.xaml.cs

示例3: CallCompleted

        public void CallCompleted(ApiResponse result)
        {
            SetAssistResponse response = result.GetTypedResponse<SetAssistResponse>();

            if (!string.IsNullOrEmpty(response.name))
            {
                // TODO: Save the information in the localstorage.
                SettingsManager.LoggedUserSingleton = response;
                SettingsManager.SaveSetting(SettingsManager.SettingsConstants.LOGGED_USER.ToString(), JsonConvert.SerializeObject(response));

                Frame.Navigate(typeof(Home));

            }
            else
            {
                // TODO: Display an error.
            }
        }
开发者ID:amasolini,项目名称:brid-wp,代码行数:18,代码来源:Login.xaml.cs

示例4: CallCompleted2

 public void CallCompleted2(ApiResponse result)
 {
     Debug.WriteLine(result.GetTypedResponse<GetEventResponse>().title);
 }
开发者ID:amasolini,项目名称:brid-wp,代码行数:4,代码来源:MainPage.xaml.cs

示例5: CallCompleted

        private async void CallCompleted(ApiResponse result)
        {
            SetUserQuestionRequest response = result.GetTypedResponse<SetUserQuestionRequest>();
            txtMensaje.Text = "";

            var dialog = new MessageDialog("Consulta enviada con éxito.");
            dialog.Commands.Add(new UICommand { Label = "Volver", Id = 0 });

            // Handles the messagedialog answer.
            var res = await dialog.ShowAsync();
            if ((int)res.Id == 0)
            {
                Frame.Navigate(typeof(Home));
                return;
            }

        }
开发者ID:amasolini,项目名称:brid-wp,代码行数:17,代码来源:Consultas.xaml.cs

示例6: CallNotificationsCompleted

        public void CallNotificationsCompleted(ApiResponse result)
        {
            List<GetNotificationsResponse> response = result.GetTypedResponse<List<GetNotificationsResponse>>();
            if (response != null)
            {
                //TODO: Save the information in the localstorage.
                SettingsManager.NotificationsSingleton = response;

                if (response.Count > 0) response.Remove(response.Last());
                SettingsManager.SaveSetting(SettingsManager.SettingsConstants.NOTIFICATIONS.ToString(), JsonConvert.SerializeObject(response));
            }
            else
            {
                // TODO: Display an error.
            }
        }
开发者ID:amasolini,项目名称:brid-wp,代码行数:16,代码来源:App.xaml.cs

示例7: CallCompleted

 public void CallCompleted(ApiResponse result)
 {
     GetEventResponse response = result.GetTypedResponse<GetEventResponse>();
     if (response != null)
     {
         //TODO: Save the information in the localstorage.
         SettingsManager.EventSingleton = response;
         SettingsManager.SaveSetting(SettingsManager.SettingsConstants.EVENT.ToString(), JsonConvert.SerializeObject(response));
     }
     else
     {
         // TODO: Display an error.
     }
 }
开发者ID:amasolini,项目名称:brid-wp,代码行数:14,代码来源:App.xaml.cs


注:本文中的ApiResponse.GetTypedResponse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。