using compabetov2.database.modelos; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace compabetov2.admin { public partial class editar : Form { private Producto producto; private crud ventanaPadre; private string imagePath; public editar (Producto producto, crud ventanaPadre) { imagePath = Path.Combine(Application.StartupPath, "Resources", producto.img); InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.Filter = "Archivos de imagen (*.jpg, *.jpeg, *.png, *.bmp)|*.jpg;*.jpeg;*.png;*.bmp"; openFileDialog1.Title = "Seleccionar imagen"; if (openFileDialog1.ShowDialog() == DialogResult.OK) { imagePath = openFileDialog1.FileName; lbImg.Text = $"Imagen: {Path.GetFileName(imagePath)}"; } } private void editar_Load(object sender, EventArgs e) { } private void pictureBox2_Click(object sender, EventArgs e) { } } }