Example #1
0
        private void cmdSelectSecurityGroups_Click(object sender, EventArgs e)
        {
            frmSelectSecurityGroups selectSecurityGroups = new frmSelectSecurityGroups();

            selectSecurityGroups.UserID      = UserID;
            selectSecurityGroups.FormClosed += SelectSecurityGroupsFormClosed;
            selectSecurityGroups.Show();
        }
Example #2
0
        private void cmdSelectSG_Click(object sender, EventArgs e)
        {
            frmSelectSecurityGroups selectSGs = new frmSelectSecurityGroups();

            selectSGs.PreselectedSecurityGroups = lstSecurityGroups.Items.Cast <ListViewItem>().Select(lvi => lvi.Text).ToList();
            selectSGs.FormClosed += SelectSGsFormClosed;
            selectSGs.Show();
        }
Example #3
0
        private void SelectSGsFormClosed(object sender, FormClosedEventArgs e)
        {
            frmSelectSecurityGroups selectSGs = (frmSelectSecurityGroups)sender;

            lstSecurityGroups.Items.Clear();

            foreach (string securityGroup in selectSGs.PreselectedSecurityGroups)
            {
                ListViewItem item = new ListViewItem();
                item.ImageKey = "permission";
                item.Text     = securityGroup;

                lstSecurityGroups.Items.Add(item);
            }

            DetectExistingOrNew(sender, e);
        }