/// <summary>
 /// Executes specified tool bar task.
 /// </summary>
 /// <param name="taskID">Task ID.</param>
 private void SwitchToolBarTask(string taskID)
 {
     if (taskID == "add")
     {
         wfrm_UsersAndGroups_Group frm = new wfrm_UsersAndGroups_Group(m_pVirtualServer);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadGroups("");
         }
     }
     else if (taskID == "edit")
     {
         Group group = (Group)m_pGroups.SelectedItems[0].Tag;
         wfrm_UsersAndGroups_Group frm = new wfrm_UsersAndGroups_Group(m_pVirtualServer, group);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadGroups(frm.GroupID);
         }
     }
     else if (taskID == "delete")
     {
         Group group = (Group)m_pGroups.SelectedItems[0].Tag;
         if (MessageBox.Show(this, "Are you sure you want to delete Group '" + group.GroupName + "' !", "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             group.Owner.Remove(group);
             LoadGroups("");
         }
     }
     else if (taskID == "refresh")
     {
         LoadGroups("");
     }
 }
 private void m_pGroups_DoubleClick(object sender, EventArgs e)
 {
     if (m_pGroups.SelectedItems.Count > 0)
     {
         Group group = (Group)m_pGroups.SelectedItems[0].Tag;
         wfrm_UsersAndGroups_Group frm = new wfrm_UsersAndGroups_Group(m_pVirtualServer, group);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadGroups(frm.GroupID);
         }
     }
 }
 /// <summary>
 /// Executes specified tool bar task.
 /// </summary>
 /// <param name="taskID">Task ID.</param>
 private void SwitchToolBarTask(string taskID)
 {
     if(taskID == "add"){
         wfrm_UsersAndGroups_Group frm = new wfrm_UsersAndGroups_Group(m_pVirtualServer);
         if(frm.ShowDialog(this) == DialogResult.OK){
             LoadGroups("");
         }
     }
     else if(taskID == "edit"){
         Group group = (Group)m_pGroups.SelectedItems[0].Tag;                
         wfrm_UsersAndGroups_Group frm = new wfrm_UsersAndGroups_Group(m_pVirtualServer,group);
         if(frm.ShowDialog(this) == DialogResult.OK){
             LoadGroups(frm.GroupID);
         }
     }
     else if(taskID == "delete"){
         Group group = (Group)m_pGroups.SelectedItems[0].Tag; 
         if(MessageBox.Show(this,"Are you sure you want to delete Group '" + group.GroupName + "' !","Confirm Delete",MessageBoxButtons.YesNo,MessageBoxIcon.Question,MessageBoxDefaultButton.Button2) == DialogResult.Yes){
             group.Owner.Remove(group);
             LoadGroups("");
         }
     }
     else if(taskID == "refresh"){                
         LoadGroups("");
     }
 }
 private void m_pGroups_DoubleClick(object sender,EventArgs e)
 {
     if(m_pGroups.SelectedItems.Count > 0){
         Group group = (Group)m_pGroups.SelectedItems[0].Tag;                
         wfrm_UsersAndGroups_Group frm = new wfrm_UsersAndGroups_Group(m_pVirtualServer,group);
         if(frm.ShowDialog(this) == DialogResult.OK){
             LoadGroups(frm.GroupID);
         }
     }
 }