Exemplo n.º 1
0
 /// <summary>
 /// Executes specified tool bar task.
 /// </summary>
 /// <param name="taskID">Task ID.</param>
 private void SwitchToolBarTask(string taskID)
 {
     if (taskID == "add")
     {
         wfrm_Security_IPSecurityEntry frm = new wfrm_Security_IPSecurityEntry(m_pVirtualServer);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadSecurity(frm.SecurityEntryID);
         }
     }
     else if (taskID == "edit")
     {
         IPSecurity securityEntry          = (IPSecurity)m_pIPSecurity.SelectedItems[0].Tag;
         wfrm_Security_IPSecurityEntry frm = new wfrm_Security_IPSecurityEntry(m_pVirtualServer, securityEntry);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadSecurity(frm.SecurityEntryID);
         }
     }
     else if (taskID == "delete")
     {
         IPSecurity securityEntry = (IPSecurity)m_pIPSecurity.SelectedItems[0].Tag;
         if (MessageBox.Show(this, "Are you sure you want to delete IP Security entry '" + securityEntry.Description + "' !", "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             securityEntry.Owner.Remove(securityEntry);
             m_pIPSecurity.SelectedItems[0].Remove();
         }
     }
     else if (taskID == "refresh")
     {
         LoadSecurity("");
     }
 }
Exemplo n.º 2
0
 private void m_pIPSecurity_DoubleClick(object sender, EventArgs e)
 {
     if (m_pIPSecurity.Items.Count > 0 && m_pIPSecurity.SelectedItems.Count > 0)
     {
         IPSecurity securityEntry          = (IPSecurity)m_pIPSecurity.SelectedItems[0].Tag;
         wfrm_Security_IPSecurityEntry frm = new wfrm_Security_IPSecurityEntry(m_pVirtualServer, securityEntry);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadSecurity(frm.SecurityEntryID);
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Executes specified tool bar task.
 /// </summary>
 /// <param name="taskID">Task ID.</param>
 private void SwitchToolBarTask(string taskID)
 {
     if(taskID == "add"){
         wfrm_Security_IPSecurityEntry frm = new wfrm_Security_IPSecurityEntry(m_pVirtualServer);
         if(frm.ShowDialog(this) == DialogResult.OK){
             LoadSecurity(frm.SecurityEntryID);
         }
     }
     else if(taskID == "edit"){
         IPSecurity securityEntry = (IPSecurity)m_pIPSecurity.SelectedItems[0].Tag;
         wfrm_Security_IPSecurityEntry frm = new wfrm_Security_IPSecurityEntry(m_pVirtualServer,securityEntry);
         if(frm.ShowDialog(this) == DialogResult.OK){
             LoadSecurity(frm.SecurityEntryID);
         }
     }
     else if(taskID == "delete"){
         IPSecurity securityEntry = (IPSecurity)m_pIPSecurity.SelectedItems[0].Tag;
         if(MessageBox.Show(this,"Are you sure you want to delete IP Security entry '" + securityEntry.Description + "' !","Confirm Delete",MessageBoxButtons.YesNo,MessageBoxIcon.Question,MessageBoxDefaultButton.Button2) == DialogResult.Yes){
             securityEntry.Owner.Remove(securityEntry);
             m_pIPSecurity.SelectedItems[0].Remove();
         }
     }
     else if(taskID == "refresh"){                
         LoadSecurity("");
     }
 }
Exemplo n.º 4
0
 private void m_pIPSecurity_DoubleClick(object sender, EventArgs e)
 {             
     if(m_pIPSecurity.Items.Count > 0 && m_pIPSecurity.SelectedItems.Count > 0){
         IPSecurity securityEntry = (IPSecurity)m_pIPSecurity.SelectedItems[0].Tag;
         wfrm_Security_IPSecurityEntry frm = new wfrm_Security_IPSecurityEntry(m_pVirtualServer,securityEntry);
         if(frm.ShowDialog(this) == DialogResult.OK){
             LoadSecurity(frm.SecurityEntryID);
         }
     }
 }