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); } }
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. //} }
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. } }
public void CallCompleted2(ApiResponse result) { Debug.WriteLine(result.GetTypedResponse<GetEventResponse>().title); }
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; } }
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. } }
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. } }