Beispiel #1
0
        private void SelectAvatar(object sender, EventArgs e)
        {
            CircularPictureBox pictureBox = (CircularPictureBox)sender;
            string             picName    = pictureBox.Tag.ToString().Substring(pictureBox.Tag.ToString().LastIndexOf(".") + 1);

            CustomizeProfileView.Avatar().Image = pictureBox.Image;
            CustomizeProfileView.Avatar().Tag   = picName + "1111";
            Profile.Avatar       = picName;
            Profile.CustomAvatar = false;
        }
Beispiel #2
0
        private void lblChoosePicture_Click(object sender, EventArgs e)
        {
            // open file dialog
            OpenFileDialog open = new OpenFileDialog();

            // image filters
            open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
            if (open.ShowDialog() == DialogResult.OK)
            {
                // display image in picture box
                CustomizeProfileView.Avatar().Image = new Bitmap(open.FileName);
                CustomizeProfileView.Avatar().Tag   = open.FileName;
                //Profile.Avatar = open.FileName;
                Profile.CustomAvatar     = true;
                Profile.CustomAvatarPath = open.FileName;
                // image file path
                //textBox1.Text = open.FileName;
            }
        }