void Buscar_Loaded(object sender, RoutedEventArgs e) { xmlReader xml = new xmlReader(Application.GetResourceStream(new Uri("lugares.xml", System.UriKind.Relative))); List<string> nombres = xml.listaNombreLocales(); List<string> comunas = xml.listaComunasLocales(); listaNombresVista.ItemsSource = nombres; listaLugarVista.ItemsSource = comunas; listaNombresVista.Tap += listaNombresVista_Tap; listaLugarVista.Tap += listaLugarVista_Tap; }
private void cargarPushPin() { xmlReader xml = new xmlReader(Application.GetResourceStream(new Uri("lugares.xml", System.UriKind.Relative))); List<Pushpin> listaPushPinxml = xml.listarPushPin(); foreach (Pushpin push in listaPushPinxml) { push.Tap += push_Tap; mapa.Children.Add(push); } }
private void llenarVentana(string buscar) { xmlReader xml = new xmlReader(Application.GetResourceStream(new Uri("lugares.xml", System.UriKind.Relative))); List<Tienda> listaTienea = xml.retornarHtml(buscar); int contador = 1; foreach (Tienda tienda in listaTienea) { TextBlock txtTituloLocal = new TextBlock(); txtTituloLocal.Text = "Tienda " + contador; txtTituloLocal.FontSize = 36; TextBlock txtLabelNombreLocal = new TextBlock(); txtLabelNombreLocal.Text = "Nombre del Local:"; TextBlock txtNombreLocal = new TextBlock(); txtNombreLocal.Text = tienda.NomLocal; TextBlock txtLabelComunaLocal = new TextBlock(); txtLabelComunaLocal.Text = "Comuna:"; TextBlock txtComunaLocal = new TextBlock(); txtComunaLocal.Text = tienda.NomComuna; TextBlock txtLabelDescripcionLocal = new TextBlock(); txtLabelDescripcionLocal.Text = "Desripcion:"; TextBlock txtDescripcionLocal; if (tienda.Descripcion != "") { txtDescripcionLocal = new TextBlock(); txtDescripcionLocal.Text = tienda.Descripcion; } else { txtDescripcionLocal = new TextBlock(); txtDescripcionLocal.Text = "No Existe Descripcion"; } TextBlock txtHorarioLocal = new TextBlock(); txtHorarioLocal.Text = tienda.Horario; TextBlock txtLabelComoLlegarLocal = new TextBlock(); txtLabelComoLlegarLocal.Text = "Direccion:"; TextBlock txtComoLlegarLocal = new TextBlock(); txtComoLlegarLocal.Text = tienda.ComoLlegar; txtTituloLocal.Foreground = new SolidColorBrush(Colors.Black); txtTituloLocal.FontWeight = FontWeights.Bold; txtLabelNombreLocal.Foreground = new SolidColorBrush(Colors.Black); txtLabelNombreLocal.FontWeight = FontWeights.Bold; txtNombreLocal.Foreground = new SolidColorBrush(Colors.Black); txtNombreLocal.FontWeight = FontWeights.Bold; txtComunaLocal.Foreground = new SolidColorBrush(Colors.Black); txtComunaLocal.FontWeight = FontWeights.Bold; txtLabelComunaLocal.Foreground = new SolidColorBrush(Colors.Black); txtLabelComunaLocal.FontWeight = FontWeights.Bold; txtLabelDescripcionLocal.Foreground = new SolidColorBrush(Colors.Black); txtLabelDescripcionLocal.FontWeight = FontWeights.Bold; txtDescripcionLocal.Foreground = new SolidColorBrush(Colors.Black); txtDescripcionLocal.FontWeight = FontWeights.Bold; txtHorarioLocal.Foreground = new SolidColorBrush(Colors.Black); txtHorarioLocal.FontWeight = FontWeights.Bold; txtLabelComoLlegarLocal.Foreground = new SolidColorBrush(Colors.Black); txtLabelComoLlegarLocal.FontWeight = FontWeights.Bold; txtComoLlegarLocal.Foreground = new SolidColorBrush(Colors.Black); txtComoLlegarLocal.FontWeight = FontWeights.Bold; panelCentral.Children.Add(txtTituloLocal); panelCentral.Children.Add(txtLabelNombreLocal); panelCentral.Children.Add(txtNombreLocal); panelCentral.Children.Add(txtLabelComunaLocal); panelCentral.Children.Add(txtComunaLocal); panelCentral.Children.Add(txtLabelDescripcionLocal); panelCentral.Children.Add(txtDescripcionLocal); panelCentral.Children.Add(txtHorarioLocal); panelCentral.Children.Add(txtLabelComoLlegarLocal); panelCentral.Children.Add(txtComoLlegarLocal); contador++; } }