Exemplo n.º 1
0
 private void ShowCustomizeView()
 {
     cpv          = new CustomizeProfileView();
     cpv.TopLevel = false;
     pnlMain.Controls.Clear();
     pnlMain.Controls.Add(cpv);
     cpv.Size = this.Size;
     cpv.Show();
 }
Exemplo n.º 2
0
 public CustomizeProfileView()
 {
     InitializeComponent();
     cpv            = this;
     staticPanel    = pnlBg;
     staticFullName = txtFullName;
     staticUserName = txtUserName;
     staticAvatar   = avatar;
 }
Exemplo n.º 3
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;
        }
Exemplo n.º 4
0
        private void colorPanel_Click(object sender, EventArgs e)
        {
            Panel p = (Panel)sender;

            //SelectColor(p);
            CustomizeProfileView.FormPanel().BackColor = p.BackColor;
            CustomizeProfileView.FullName().BackColor  = p.BackColor;
            CustomizeProfileView.UserName().BackColor  = p.BackColor;
            //this.BackColor = p.BackColor;
        }
Exemplo n.º 5
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;
            }
        }