private void LoadPrivileges(IEnumerable<SecurityPrivilegeMetadata> privileges)
        {
            var items = new List<ListViewItem>();

            foreach (var privilege in privileges.ToList().OrderBy(a => a.Name))
            {
                var pmd = new SecurityPrivilegeInfo(privilege);

                var item = new ListViewItem(pmd.Name) { Tag = pmd };
                AddSecondarySubItems(typeof(SecurityPrivilegeInfo), ListViewColumnsSettings.PrivFirstColumns, lvcSettings.PrivSelectedAttributes, pmd, item);

                items.Add(item);
            }

            privilegeListView.Items.Clear();
            privilegeListView.Items.AddRange(items.ToArray());
        }
Пример #2
0
 public void Remove(SecurityPrivilegeInfo info)
 {
     list.Remove(info);
 }
 public void Remove(SecurityPrivilegeInfo info)
 {
     list.Remove(info);
 }
Пример #4
0
 public void Add(SecurityPrivilegeInfo info)
 {
     list.Add(info);
 }
 public void Add(SecurityPrivilegeInfo info)
 {
     list.Add(info);
 }