public MainWindow() { InitializeComponent(); superheroe = Superheroe.GetSample(); GridBot.DataContext = superheroe; fotoImage.DataContext = superheroe; }
public MainWindow() { InitializeComponent(); Super = Superheroe.GetSample(); DatosEstaticosDockPanel.DataContext = Super; DataContext = Resources["config"]; }
public MainWindow() { InitializeComponent(); heroe = Superheroe.GetSample(); FotoImage.DataContext = heroe; HeroeGrid.DataContext = heroe; }
public pestañaSuperheroes() { InitializeComponent(); List <Superheroe> superheroes = Superheroe.GetSamples(); superheroesDockPanel.DataContext = superheroes; }
public MainWindow() { superheroes = Superheroe.GetSamples(); Indice = 0; InitializeComponent(); ActualizaContador(); }
public void ReiniciarSuperHeroe() { superheroe = new Superheroe() { Heroe = true }; }
public MainWindow() { InitializeComponent(); heroeNuevo = Superheroe.GetSample(); InformacionGrid.DataContext = heroeNuevo; DaredevilImage.DataContext = heroeNuevo; }
public MainWindow() { InitializeComponent(); heroe = Superheroe.GetSample(); leerGrid.DataContext = heroe; }
public MainWindow() { InitializeComponent(); heroes = Superheroe.GetSamples(); BindingDelObjeto(1); ActualizaIndice(1); }
public void BindingDelObjeto(int indice) { indice--; pestaña1DockPanel.DataContext = heroes[indice]; heroe = new Superheroe(); pestaña2Grid.DataContext = heroe; heroe.Heroe = true; }
public MainWindowVM() { _servicio = new ServicioSuperheroe(); listaSuperHeroes = _servicio.ObtenerPersonas(); superheroe = new Superheroe(); contador = "1"; max = listaSuperHeroes.Count().ToString(); }
private void aceptarBoton_Click(object sender, RoutedEventArgs e) { lista.Add(superheroe); pagTotalTextBlock.Text = lista.Count.ToString(); MessageBox.Show("Superhéroe insertado con éxito", "Superhéroes", MessageBoxButton.OK, MessageBoxImage.Information); superheroe = new Superheroe(); nuevoHeroeGrid.DataContext = superheroe; }
public MainWindow() { InitializeComponent(); listaSuperheroes = Superheroe.GetSamples(); superheroeDockPanel.DataContext = listaSuperheroes.FirstOrDefault(); actualTextBlock.Text = "1"; totalTextBlock.Text = listaSuperheroes.Count.ToString(); }
public MainWindow() { InitializeComponent(); heroe = Superheroe.GetSample(); TextBlockNombre.DataContext = heroe; TextBlockEnemigo.DataContext = heroe; TextBlockVengador.DataContext = heroe; ImageSuperheroe.DataContext = heroe; }
public MainWindow() { InitializeComponent(); superheroes = Superheroe.GetSamples(); contenedorSuperheroe.DataContext = superheroes; actualTextBlock.Text = "1"; totalTextBlock.Text = superheroes.Count.ToString(); superheroe = new Superheroe(); contenedorNuevoSuperheroe.DataContext = superheroe; }
public static Superheroe GetSample() { Superheroe heroe = new Superheroe(); heroe.Nombre = "Daredevil"; heroe.Enemigo = "Kingping"; heroe.Foto = @"https://dam.smashmexico.com.mx/wp-content/uploads/2018/08/27150601/daredevilbio_portada.jpg"; heroe.Vengador = false; return(heroe); }
public void HeroeAnterior() { int aux = int.Parse(contador); if (aux > 1) { superheroe = listaSuperHeroes[aux - 1]; aux++; contador = aux.ToString(); } }
public static Superheroe GetSample() { Superheroe heroe = new Superheroe(); heroe.Nombre = "Daredevil"; heroe.Enemigo = "Kingping"; heroe.Foto = ""; heroe.Vengador = false; return(heroe); }
public void HeroeSiguiente() { int aux = int.Parse(contador); int maxAux = int.Parse(max); if (aux <= maxAux - 1) { superheroe = listaSuperHeroes[aux]; aux++; contador = aux.ToString(); } }
private void CrearButton_Click(object sender, RoutedEventArgs e) { Superheroe superheroe = (Resources["nuevo"] as Superheroe); superheroes.Add(superheroe); Resources.Remove("nuevo"); Resources.Add("nuevo", new Superheroe { Heroe = true }); MessageBox.Show("Heroe añadido con exito", "Aviso", MessageBoxButton.OK, MessageBoxImage.Information); actualizarVentana(); }
public MainWindow() { InitializeComponent(); heroesDock.DataContext = lista; pagActualTextBlock.Text = "1"; pagTotalTextBlock.Text = lista.Count.ToString(); //Nuevo superheroe = new Superheroe(); nuevoHeroeGrid.DataContext = superheroe; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { Superheroe superheroe = (Superheroe)value; if (superheroe.Heroe) { return("PaleGreen"); } else { return("IndianRed"); } }
public static List <Superheroe> GetSamples() { List <Superheroe> ejemplos = new List <Superheroe>(); Superheroe ironman = new Superheroe("Ironman", @"https://sm.ign.com/ign_latam/screenshot/default/ybbpqktez5whedr0-1592031889_31aa.jpg", true, false, true, false); Superheroe kingpin = new Superheroe("Kingpin", @"https://www.comicbasics.com/wp-content/uploads/2017/09/Kingpin.jpg", false, false, false, true); Superheroe spiderman = new Superheroe("Spiderman", @"https://wipy.tv/wp-content/uploads/2019/08/destino-de-%E2%80%98Spider-Man%E2%80%99-en-los-Comics.jpg", true, true, true, false); ejemplos.Add(ironman); ejemplos.Add(kingpin); ejemplos.Add(spiderman); return(ejemplos); }
internal ObservableCollection <Superheroe> ObtenerPersonas() { ObservableCollection <Superheroe> ejemplos = new ObservableCollection <Superheroe>(); Superheroe ironman = new Superheroe("Ironman", @"https://sm.ign.com/ign_latam/screenshot/default/ybbpqktez5whedr0-1592031889_31aa.jpg", true, false, true, false); Superheroe kingpin = new Superheroe("Kingpin", @"https://www.comicbasics.com/wp-content/uploads/2017/09/Kingpin.jpg", false, false, false, true); Superheroe spiderman = new Superheroe("Spiderman", @"https://wipy.tv/wp-content/uploads/2019/08/destino-de-%E2%80%98Spider-Man%E2%80%99-en-los-Comics.jpg", true, true, true, false); ejemplos.Add(ironman); ejemplos.Add(kingpin); ejemplos.Add(spiderman); return(ejemplos); }
private void aceptarButton_Click(object sender, RoutedEventArgs e) { superheroe.Nombre = nombreTextBox.Text; superheroe.Imagen = rutaImagenTextBox.Text; if ((bool)villanoRadioButton.IsChecked) { superheroe.Vengador = false; superheroe.Xmen = false; superheroe.Heroe = false; } else { superheroe.Vengador = (bool)vengadoresCheckBox.IsChecked; superheroe.Xmen = (bool)xmenCheckBox.IsChecked; superheroe.Heroe = true; superheroe.Villano = false; } superheroes.Add(superheroe); MessageBox.Show("Superhéroe insertado con exito", "Superhéroes", MessageBoxButton.OK, MessageBoxImage.Information); totalTextBlock.Text = superheroes.Count.ToString(); superheroe = new Superheroe(); contenedorNuevoSuperheroe.DataContext = superheroe; }
private void LimpiarFormulario() { heroe = new Superheroe(); pestaña2Grid.DataContext = heroe; heroe.Heroe = true; }
private void limpiarButton_Click(object sender, RoutedEventArgs e) { superheroe = new Superheroe(); contenedorNuevoSuperheroe.DataContext = superheroe; }