Exemple #1
0
        private void StylingForm()
        {
            FormBorderStyle = FormBorderStyle.None;

            Width  = Screen.PrimaryScreen.WorkingArea.Width;
            Height = Screen.PrimaryScreen.WorkingArea.Height;

            pnDisplay.BackColor = this.BackColor;

            LibraryModule.makePictureBoxRound(picAccount);
        }
 private void frmClear()
 {
     txtName.Clear();
     txtPhone.Clear();
     txtAddress.Clear();
     picLibrarian.Image    = Properties.Resources.Cover;
     picLibrarian.Width    = picLibrarian.Height = 100;
     picLibrarian.Location = new Point(92, 145);
     picLibrarian.SizeMode = PictureBoxSizeMode.CenterImage;
     LibraryModule.makePictureBoxRound(picLibrarian);
     btnBrowse.Visible     = true;
     recRoundPic.Visible   = true;
     pnIdGenerated.Visible = false;
 }
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Filter = "JPEG|*.jpg;*.jpeg|PNG|*.png";
            fileDialog.ShowDialog();
            if (!string.IsNullOrEmpty(fileDialog.FileName))
            {
                picLibrarian.Image    = Image.FromFile(fileDialog.FileName);
                picLibrarian.Width    = picLibrarian.Height = 185;
                picLibrarian.Location = new Point(48, 119);
                picLibrarian.SizeMode = PictureBoxSizeMode.Zoom;
                LibraryModule.makePictureBoxRound(picLibrarian);
                btnBrowse.Visible   = false;
                recRoundPic.Visible = false;
            }
        }