private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { OpenDMS.Storage.Security.User user = null; TxtGroups.Invoke(new MethodInvoker(delegate { user = (OpenDMS.Storage.Security.User)comboBox1.SelectedItem; TxtFirstName.Text = user.FirstName; TxtMiddleName.Text = user.MiddleName; TxtLastName.Text = user.LastName; TxtPassword.Text = "<encrypted>"; TxtGroups.Text = ""; })); if (user.Groups != null) { for (int i = 0; i < user.Groups.Count; i++) { TxtGroups.Invoke(new MethodInvoker(delegate { TxtGroups.Text += user.Groups[i] + "\r\n"; })); } } }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { OpenDMS.Storage.Security.Group group = null; TxtGroups.Invoke(new MethodInvoker(delegate { group = (OpenDMS.Storage.Security.Group)comboBox1.SelectedItem; })); TxtGroups.Invoke(new MethodInvoker(delegate { TxtGroups.Text = ""; })); TxtUsers.Invoke(new MethodInvoker(delegate { TxtUsers.Text = ""; })); if (group.Groups != null) { for (int i = 0; i < group.Groups.Count; i++) { TxtGroups.Invoke(new MethodInvoker(delegate { TxtGroups.Text += group.Groups[i] + "\r\n"; })); } } if (group.Users != null) { for (int i = 0; i < group.Users.Count; i++) { TxtUsers.Invoke(new MethodInvoker(delegate { TxtUsers.Text += group.Users[i] + "\r\n"; })); } } }