private void m_pIPSecurity_DoubleClick(object sender, EventArgs e)
 {
     if (this.m_pIPSecurity.Items.Count > 0 && this.m_pIPSecurity.SelectedItems.Count > 0)
     {
         IPSecurity securityEntry = (IPSecurity)this.m_pIPSecurity.SelectedItems[0].Tag;
         AddEditIPSecurityEntryForm addEditIPSecurityEntryForm = new AddEditIPSecurityEntryForm(this.m_pVirtualServer, securityEntry);
         if (addEditIPSecurityEntryForm.ShowDialog(this) == DialogResult.OK)
         {
             this.LoadSecurity(addEditIPSecurityEntryForm.SecurityEntryID);
         }
     }
 }
 private void SwitchToolBarTask(string taskID)
 {
     if (taskID == "add")
     {
         AddEditIPSecurityEntryForm addEditIPSecurityEntryForm = new AddEditIPSecurityEntryForm(this.m_pVirtualServer);
         if (addEditIPSecurityEntryForm.ShowDialog(this) == DialogResult.OK)
         {
             this.LoadSecurity(addEditIPSecurityEntryForm.SecurityEntryID);
             return;
         }
     }
     else if (taskID == "edit")
     {
         IPSecurity securityEntry = (IPSecurity)this.m_pIPSecurity.SelectedItems[0].Tag;
         AddEditIPSecurityEntryForm addEditIPSecurityEntryForm2 = new AddEditIPSecurityEntryForm(this.m_pVirtualServer, securityEntry);
         if (addEditIPSecurityEntryForm2.ShowDialog(this) == DialogResult.OK)
         {
             this.LoadSecurity(addEditIPSecurityEntryForm2.SecurityEntryID);
             return;
         }
     }
     else if (taskID == "delete")
     {
         IPSecurity iPSecurity = (IPSecurity)this.m_pIPSecurity.SelectedItems[0].Tag;
         if (MessageBox.Show(this, "Are you sure you want to delete IP Security entry '" + iPSecurity.Description + "' !", "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             iPSecurity.Owner.Remove(iPSecurity);
             this.m_pIPSecurity.SelectedItems[0].Remove();
             return;
         }
     }
     else if (taskID == "refresh")
     {
         this.LoadSecurity("");
     }
 }