private void btnUser_Click(object sender, EventArgs e) { if (listGroups.SelectedItems.Count < 1) { return; } string groupname = listGroups.SelectedItems[0].Text; FormAddUser f = new FormAddUser(groupname); f.ShowDialog(); UpdateUsers(groupname); }
private void 修改ToolStripMenuItem_Click(object sender, EventArgs e) { if (listUsers.SelectedItems.Count < 1 || listGroups.SelectedItems.Count < 1) { return; } string groupname = listGroups.SelectedItems[0].Text; string username = listUsers.SelectedItems[0].Text; FormAddUser f = new FormAddUser(groupname, username); f.ShowDialog(); UpdateUsers(groupname); }