Пример #1
0
 private void btnRemoveUser_Click(object sender, System.EventArgs e)
 {
     if (MOG_Prompt.PromptResponse("User Removal Confirmation", "Are you sure you want to remove the selected user(s)?", MOGPromptButtons.YesNo) == MOGPromptResult.Yes)
     {
         foreach (ListViewItem item in this.lvUsers.SelectedItems)
         {
             if (String.Compare(item.Text, "Admin", true) == 0)
             {
                 MOG_Prompt.PromptMessage("User Removal Error", "You cannot remove the Admin user.");
             }
             else
             {
                 if (mProject != null)
                 {
                     if (mProject.UserRemove(item.Text))
                     {
                         lvUsers.Items.Remove(item);
                     }
                 }
             }
         }
     }
 }