private void buttonTomarImagen_Click(object sender, RoutedEventArgs e) { var camWindow = new CamWindow(); if (camWindow.ShowDialog() == true) { imageBitmap = camWindow.ImageBitmap; //imageBytes = camWindow.ImageBytes; imageSocio.Source = camWindow.ImageSource; } }
private void buttonCargarImagen_Click(object sender, RoutedEventArgs e) { var camWindow = new CamWindow(); if (camWindow.ShowDialog() == true) { var imageBitmap = camWindow.ImageBitmap; imageSocio.Source = camWindow.ImageSource; string directory = System.IO.Directory.GetCurrentDirectory(); string id_s = (socio.Id).ToString(); string img_path = System.IO.Path.Combine(directory, @"imagenes\" + id_s + "_256.dat"); imageBitmap.Save(img_path); Actualizar = true; buttonCargarImagen.IsEnabled = false; buttonCargarImagen.Visibility = System.Windows.Visibility.Hidden; } }