Esempio n. 1
0
        private void btnPhoto_Click(object sender, EventArgs e)
        {
            MyUtils myUtils = new MyUtils();
            string  sPath   = myUtils.PhotoPath();

            if (sPath != string.Empty)
            {
                byte[]       img = myUtils.GetPhoto(sPath);
                MemoryStream ms  = new MemoryStream();
                ms.Write(img, 0, img.Length);
                Image imgPhoto = Image.FromStream(ms);
                pbxLogo.Image = imgPhoto;
                tbxPhoto.Text = sPath;
            }
        }
Esempio n. 2
0
        private void pictureBox1_DoubleClick(object sender, EventArgs e)
        {
            MyUtils myUtils = new MyUtils();
            string  sPath   = myUtils.PhotoPath();

            if (sPath != string.Empty)
            {
                byte[]       img = myUtils.GetPhoto(sPath);
                MemoryStream ms  = new MemoryStream();
                ms.Write(img, 0, img.Length);
                Image imgPhoto = Image.FromStream(ms);
                pictureBox1.Image = imgPhoto;
                pictureBox1.Text  = sPath;
                btnOK.Enabled     = true;
                newPic            = true;
            }
        }