Пример #1
0
        private void btn_cam_Click(object sender, EventArgs e)
        {
            //this.Hide();
            pbFotoUser.Image = Image.FromFile(foto_perfil);
            string id    = txt_id.Text;
            string lugar = "bodega";
            Form   frm   = new Form_Tomar_Foto(id, lugar);

            frm.ShowDialog();
            path_foto = "bodega/" + id + ".png";
            if (File.Exists(path_foto))
            {
                pbFotoUser.Image = Image.FromFile(path_foto);
            }
            else
            {
                pbFotoUser.Image = Image.FromFile(foto_perfil);
            }



            //this.Show();

            //string id = txt_id.Text;
            //string path = "bodega/";
            //pbFotoUser.Image.Save(path+id+".png",ImageFormat.Jpeg);

            //inicio_cam();
        }
        private void btn_tomarfoto_Click(object sender, EventArgs e)
        {
            //this.Hide();
            pb.Image = Image.FromFile(foto_perfil);
            string id    = txt_cedula.Text;
            string lugar = "usuarios";
            Form   frm   = new Form_Tomar_Foto(id, lugar);

            frm.ShowDialog();
            path = "usuarios/" + id + ".png";
            if (File.Exists(path))
            {
                pb.Image = Image.FromFile(path);
            }
            else
            {
                pb.Image = Image.FromFile(foto_perfil);
            }
        }