예제 #1
0
        private void brnProfile_Click(object sender, EventArgs e)
        {
            // Go to profile
            Hide();
            frmProfile profile = new frmProfile(UserManager.user);

            profile.ShowDialog();
        }
예제 #2
0
        private void btnCancel_Click(object sender, EventArgs e)
        {
            // Go to the profile page
            Hide();
            frmProfile profile = new frmProfile(user, popout);

            profile.ShowDialog();
        }
예제 #3
0
        private void btnProfile_Click(object sender, EventArgs e)
        {
            // Open a profile window of the selected user
            User selectedUser = (User)dgvList.CurrentRow.DataBoundItem;

            Hide();
            frmProfile profile = new frmProfile(selectedUser, true);

            profile.ShowDialog();
        }
예제 #4
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            // Checks if all the user data is valid
            if (user.ValidateAndAssign(
                    txtUsername.Text,
                    txtBio.Text,
                    txtFirstname.Text,
                    txtLastname.Text,
                    txtEmail.Text,
                    (int)nudAge.Value,
                    cbxGender.SelectedIndex
                    ))
            {
                // Save the users and go back to the profile
                UserManager.WriteUsers();

                Hide();
                frmProfile profile = new frmProfile(user, popout);
                profile.ShowDialog();
            }
        }