void CreateNewUser_Click(object sender, EventArgs e) { frmUser NewUser = new frmUser(); if (NewUser.ShowDialog() == DialogResult.Cancel) { return; } UpdateUserList(); }
void EditUser_Click(object sender, EventArgs e) { if (lstUserList.SelectedItems.Count == 0) { return; } frmUser EditUser = new frmUser(lstUserList.SelectedItems[0].SubItems[0].Text); if (EditUser.ShowDialog() == DialogResult.Cancel) { return; } UpdateUserList(); }