Beispiel #1
0
        }// PutValuesinPage

        private void PutInPermissions(NamedPermissionSet ps)
        {
            // Display the various permissions in the currently selected permission set
            m_lvPermissions.Items.Clear();
            if (ps != null)
            {
                IEnumerator permEnumerator = ps.GetEnumerator();
                while (permEnumerator.MoveNext())
                {
                    IPermission  perm        = (IPermission)permEnumerator.Current;
                    int          nImageIndex = DeterminePermissionIcon(perm);
                    ListViewItem lvi         = new ListViewItem(Security.GetDisplayStringForPermission(perm), nImageIndex);
                    m_lvPermissions.Items.Add(lvi);
                }
            }
        }// PutInPermissions
Beispiel #2
0
        }// onChange

        void onViewPermsClick(Object o, EventArgs e)
        {
            int iIndex = 0;

            if (m_lvPermissions.SelectedIndices.Count > 0 && m_npsCurPermSet != null)
            {
                // Set cursor to wait cursor
                IntPtr hOldCursor = SetCursorToWait();

                IEnumerator permEnumerator = m_npsCurPermSet.GetEnumerator();
                while (permEnumerator.MoveNext() && iIndex != m_lvPermissions.SelectedIndices[0])
                {
                    iIndex++;
                }


                new CReadOnlyPermission((IPermission)permEnumerator.Current).ShowDialog();

                SetCursor(hOldCursor);
            }
        } // onViewPermsClick