コード例 #1
0
ファイル: Home.cs プロジェクト: JustRyanW/Uni-Visual-Studio
        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();
            }
        }